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.
1375
1381
1389
1390/// A structure to represent a key event.
1391///
1392/// Sending `FlutterKeyEvent` via `FlutterEngineSendKeyEvent` results in a
1393/// corresponding `FlutterKeyEvent` to be dispatched in the framework. It is
1394/// embedder's responsibility to ensure the regularity of sent events, since the
1395/// framework only performs simple one-to-one mapping. The events must conform
1396/// the following rules:
1397///
1398/// * Each key press sequence shall consist of one key down event (`kind` being
1399/// `kFlutterKeyEventTypeDown`), zero or more repeat events, and one key up
1400/// event, representing a physical key button being pressed, held, and
1401/// released.
1402/// * All events throughout a key press sequence shall have the same `physical`
1403/// and `logical`. Having different `character`s is allowed.
1404///
1405/// A `FlutterKeyEvent` with `physical` 0 and `logical` 0 is an empty event.
1406/// This is the only case either `physical` or `logical` can be 0. An empty
1407/// event must be sent if a key message should be converted to no
1408/// `FlutterKeyEvent`s, for example, when a key down message is received for a
1409/// key that has already been pressed according to the record. This is to ensure
1410/// some `FlutterKeyEvent` arrives at the framework before raw key message.
1411/// See https://github.com/flutter/flutter/issues/87230.
1412typedef struct {
1413 /// The size of this struct. Must be sizeof(FlutterKeyEvent).
1415 /// The timestamp at which the key event was generated. The timestamp should
1416 /// be specified in microseconds and the clock should be the same as that used
1417 /// by `FlutterEngineGetCurrentTime`.
1419 /// The event kind.
1421 /// The USB HID code for the physical key of the event.
1422 ///
1423 /// For the full definition and list of pre-defined physical keys, see
1424 /// `PhysicalKeyboardKey` from the framework.
1425 ///
1426 /// The only case that `physical` might be 0 is when this is an empty event.
1427 /// See `FlutterKeyEvent` for introduction.
1428 uint64_t physical;
1429 /// The key ID for the logical key of this event.
1430 ///
1431 /// For the full definition and a list of pre-defined logical keys, see
1432 /// `LogicalKeyboardKey` from the framework.
1433 ///
1434 /// The only case that `logical` might be 0 is when this is an empty event.
1435 /// See `FlutterKeyEvent` for introduction.
1436 uint64_t logical;
1437 /// Null-terminated character input from the event. Can be null. Ignored for
1438 /// up events.
1439 const char* character;
1440 /// True if this event does not correspond to a native event.
1441 ///
1442 /// The embedder is likely to skip events and/or construct new events that do
1443 /// not correspond to any native events in order to conform the regularity
1444 /// of events (as documented in `FlutterKeyEvent`). An example is when a key
1445 /// up is missed due to loss of window focus, on a platform that provides
1446 /// query to key pressing status, the embedder might realize that the key has
1447 /// been released at the next key event, and should construct a synthesized up
1448 /// event immediately before the actual event.
1449 ///
1450 /// An event being synthesized means that the `timestamp` might greatly
1451 /// deviate from the actual time when the event occurs physically.
1453 /// The source device for the key event.
1456
1457typedef void (*FlutterKeyEventCallback)(bool /* handled */,
1458 void* /* user_data */);
1459
1463
1464typedef struct {
1465 /// The size of this struct. Must be sizeof(FlutterPlatformMessage).
1467 const char* channel;
1468 const uint8_t* message;
1470 /// The response handle on which to invoke
1471 /// `FlutterEngineSendPlatformMessageResponse` when the response is ready.
1472 /// `FlutterEngineSendPlatformMessageResponse` must be called for all messages
1473 /// received by the embedder. Failure to call
1474 /// `FlutterEngineSendPlatformMessageResponse` will cause a memory leak. It is
1475 /// not safe to send multiple responses on a single response object.
1478
1480 const FlutterPlatformMessage* /* message*/,
1481 void* /* user data */);
1482
1483typedef void (*FlutterDataCallback)(const uint8_t* /* data */,
1484 size_t /* size */,
1485 void* /* user data */);
1486
1487/// The identifier of the platform view. This identifier is specified by the
1488/// application when a platform view is added to the scene via the
1489/// `SceneBuilder.addPlatformView` call.
1491
1492/// `FlutterSemanticsNode` ID used as a sentinel to signal the end of a batch of
1493/// semantics node updates. This is unused if using
1494/// `FlutterUpdateSemanticsCallback2`.
1496extern const int32_t kFlutterSemanticsNodeIdBatchEnd;
1497
1498// The enumeration of possible string attributes that affect how assistive
1499// technologies announce a string.
1500//
1501// See dart:ui's implementers of the StringAttribute abstract class.
1502typedef enum {
1503 // Indicates the string should be announced character by character.
1505 // Indicates the string should be announced using the specified locale.
1508
1509// Indicates the assistive technology should announce out the string character
1510// by character.
1511//
1512// See dart:ui's SpellOutStringAttribute.
1513typedef struct {
1514 /// The size of this struct. Must be sizeof(FlutterSpellOutStringAttribute).
1517
1518// Indicates the assistive technology should announce the string using the
1519// specified locale.
1520//
1521// See dart:ui's LocaleStringAttribute.
1522typedef struct {
1523 /// The size of this struct. Must be sizeof(FlutterLocaleStringAttribute).
1525 // The locale of this attribute.
1526 const char* locale;
1528
1529// Indicates how the assistive technology should treat the string.
1530//
1531// See dart:ui's StringAttribute.
1532typedef struct {
1533 /// The size of this struct. Must be sizeof(FlutterStringAttribute).
1535 // The position this attribute starts.
1536 size_t start;
1537 // The next position after the attribute ends.
1538 size_t end;
1539 /// The type of the attribute described by the subsequent union.
1541 union {
1542 // Indicates the string should be announced character by character.
1544 // Indicates the string should be announced using the specified locale.
1546 };
1548
1549/// A node that represents some semantic data.
1550///
1551/// The semantics tree is maintained during the semantics phase of the pipeline
1552/// (i.e., during PipelineOwner.flushSemantics), which happens after
1553/// compositing. Updates are then pushed to embedders via the registered
1554/// `FlutterUpdateSemanticsCallback`.
1555///
1556/// @deprecated Use `FlutterSemanticsNode2` instead. In order to preserve
1557/// ABI compatibility for existing users, no new fields will be
1558/// added to this struct. New fields will continue to be added
1559/// to `FlutterSemanticsNode2`.
1560typedef struct {
1561 /// The size of this struct. Must be sizeof(FlutterSemanticsNode).
1563 /// The unique identifier for this node.
1564 int32_t id;
1565 /// The set of semantics flags associated with this node.
1567 /// The set of semantics actions applicable to this node.
1569 /// The position at which the text selection originates.
1571 /// The position at which the text selection terminates.
1573 /// The total number of scrollable children that contribute to semantics.
1575 /// The index of the first visible semantic child of a scroll node.
1577 /// The current scrolling position in logical pixels if the node is
1578 /// scrollable.
1580 /// The maximum in-range value for `scrollPosition` if the node is scrollable.
1582 /// The minimum in-range value for `scrollPosition` if the node is scrollable.
1584 /// The elevation along the z-axis at which the rect of this semantics node is
1585 /// located above its parent.
1587 /// Describes how much space the semantics node takes up along the z-axis.
1589 /// A textual description of the node.
1590 const char* label;
1591 /// A brief description of the result of performing an action on the node.
1592 const char* hint;
1593 /// A textual description of the current value of the node.
1594 const char* value;
1595 /// A value that `value` will have after a kFlutterSemanticsActionIncrease`
1596 /// action has been performed.
1597 const char* increased_value;
1598 /// A value that `value` will have after a kFlutterSemanticsActionDecrease`
1599 /// action has been performed.
1600 const char* decreased_value;
1601 /// The reading direction for `label`, `value`, `hint`, `increasedValue`,
1602 /// `decreasedValue`, and `tooltip`.
1604 /// The bounding box for this node in its coordinate system.
1606 /// The transform from this node's coordinate system to its parent's
1607 /// coordinate system.
1609 /// The number of children this node has.
1611 /// Array of child node IDs in traversal order. Has length `child_count`.
1613 /// Array of child node IDs in hit test order. Has length `child_count`.
1615 /// The number of custom accessibility action associated with this node.
1617 /// Array of `FlutterSemanticsCustomAction` IDs associated with this node.
1618 /// Has length `custom_accessibility_actions_count`.
1620 /// Identifier of the platform view associated with this semantics node, or
1621 /// -1 if none.
1623 /// A textual tooltip attached to the node.
1624 const char* tooltip;
1625 /// The heading level for this node. A value of 0 means the node is not a
1626 /// heading; higher values (1, 2, …) indicate the heading rank, with lower
1627 /// numbers being higher-level headings.
1630
1631/// A node in the Flutter semantics tree.
1632///
1633/// The semantics tree is maintained during the semantics phase of the pipeline
1634/// (i.e., during PipelineOwner.flushSemantics), which happens after
1635/// compositing. Updates are then pushed to embedders via the registered
1636/// `FlutterUpdateSemanticsCallback2`.
1637///
1638/// @see https://api.flutter.dev/flutter/semantics/SemanticsNode-class.html
1639typedef struct {
1640 /// The size of this struct. Must be sizeof(FlutterSemanticsNode).
1642 /// The unique identifier for this node.
1643 int32_t id;
1644 /// The set of semantics flags associated with this node.
1645 ///
1646 /// @deprecated Use `flags2` instead. No new flags will
1647 /// be added to `FlutterSemanticsFlag`. New flags will
1648 /// continue to be added to `FlutterSemanticsFlags`.
1650 /// The set of semantics actions applicable to this node.
1652 /// The position at which the text selection originates.
1654 /// The position at which the text selection terminates.
1656 /// The total number of scrollable children that contribute to semantics.
1658 /// The index of the first visible semantic child of a scroll node.
1660 /// The current scrolling position in logical pixels if the node is
1661 /// scrollable.
1663 /// The maximum in-range value for `scrollPosition` if the node is scrollable.
1665 /// The minimum in-range value for `scrollPosition` if the node is scrollable.
1667 /// The elevation along the z-axis at which the rect of this semantics node is
1668 /// located above its parent.
1670 /// Describes how much space the semantics node takes up along the z-axis.
1672 /// A textual description of the node.
1673 const char* label;
1674 /// A brief description of the result of performing an action on the node.
1675 const char* hint;
1676 /// A textual description of the current value of the node.
1677 const char* value;
1678 /// A value that `value` will have after a kFlutterSemanticsActionIncrease`
1679 /// action has been performed.
1680 const char* increased_value;
1681 /// A value that `value` will have after a kFlutterSemanticsActionDecrease`
1682 /// action has been performed.
1683 const char* decreased_value;
1684 /// The reading direction for `label`, `value`, `hint`, `increasedValue`,
1685 /// `decreasedValue`, and `tooltip`.
1687 /// The bounding box for this node in its coordinate system.
1689 /// The transform from this node's coordinate system to its parent's
1690 /// coordinate system.
1692 /// The number of children this node has.
1694 /// Array of child node IDs in traversal order. Has length `child_count`.
1696 /// Array of child node IDs in hit test order. Has length `child_count`.
1698 /// The number of custom accessibility action associated with this node.
1700 /// Array of `FlutterSemanticsCustomAction` IDs associated with this node.
1701 /// Has length `custom_accessibility_actions_count`.
1703 /// Identifier of the platform view associated with this semantics node, or
1704 /// -1 if none.
1706 /// A textual tooltip attached to the node.
1707 const char* tooltip;
1708 // The number of string attributes associated with the `label`.
1710 // Array of string attributes associated with the `label`.
1711 // Has length `label_attribute_count`.
1713 // The number of string attributes associated with the `hint`.
1715 // Array of string attributes associated with the `hint`.
1716 // Has length `hint_attribute_count`.
1718 // The number of string attributes associated with the `value`.
1720 // Array of string attributes associated with the `value`.
1721 // Has length `value_attribute_count`.
1723 // The number of string attributes associated with the `increased_value`.
1725 // Array of string attributes associated with the `increased_value`.
1726 // Has length `increased_value_attribute_count`.
1728 // The number of string attributes associated with the `decreased_value`.
1730 // Array of string attributes associated with the `decreased_value`.
1731 // Has length `decreased_value_attribute_count`.
1733 // The set of semantics flags associated with this node. Prefer to use this
1734 // over `flags__deprecated__`.
1736 /// The heading level for this node. A value of 0 means the node is not a
1737 /// heading; higher values (1, 2, …) indicate the heading rank, with lower
1738 /// numbers being higher-level headings.
1740 /// An identifier for the semantics node in native accessibility hierarchy.
1741 /// This value should not be exposed to the users of the app.
1742 /// This is usually used for UI testing with tools that work by querying the
1743 /// native accessibility, like UI Automator, XCUITest, or Appium.
1744 const char* identifier;
1746
1747/// `FlutterSemanticsCustomAction` ID used as a sentinel to signal the end of a
1748/// batch of semantics custom action updates. This is unused if using
1749/// `FlutterUpdateSemanticsCallback2`.
1751extern const int32_t kFlutterSemanticsCustomActionIdBatchEnd;
1752
1753/// A custom semantics action, or action override.
1754///
1755/// Custom actions can be registered by applications in order to provide
1756/// semantic actions other than the standard actions available through the
1757/// `FlutterSemanticsAction` enum.
1758///
1759/// Action overrides are custom actions that the application developer requests
1760/// to be used in place of the standard actions in the `FlutterSemanticsAction`
1761/// enum.
1762///
1763/// @deprecated Use `FlutterSemanticsCustomAction2` instead. In order to
1764/// preserve ABI compatility for existing users, no new fields
1765/// will be added to this struct. New fields will continue to
1766/// be added to `FlutterSemanticsCustomAction2`.
1767typedef struct {
1768 /// The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
1770 /// The unique custom action or action override ID.
1771 int32_t id;
1772 /// For overridden standard actions, corresponds to the
1773 /// `FlutterSemanticsAction` to override.
1775 /// The user-readable name of this custom semantics action.
1776 const char* label;
1777 /// The hint description of this custom semantics action.
1778 const char* hint;
1780
1781/// A custom semantics action, or action override.
1782///
1783/// Custom actions can be registered by applications in order to provide
1784/// semantic actions other than the standard actions available through the
1785/// `FlutterSemanticsAction` enum.
1786///
1787/// Action overrides are custom actions that the application developer requests
1788/// to be used in place of the standard actions in the `FlutterSemanticsAction`
1789/// enum.
1790///
1791/// @see
1792/// https://api.flutter.dev/flutter/semantics/CustomSemanticsAction-class.html
1793typedef struct {
1794 /// The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
1796 /// The unique custom action or action override ID.
1797 int32_t id;
1798 /// For overridden standard actions, corresponds to the
1799 /// `FlutterSemanticsAction` to override.
1801 /// The user-readable name of this custom semantics action.
1802 const char* label;
1803 /// The hint description of this custom semantics action.
1804 const char* hint;
1806
1807/// A batch of updates to semantics nodes and custom actions.
1808///
1809/// @deprecated Use `FlutterSemanticsUpdate2` instead. Adding members
1810/// to `FlutterSemanticsNode` or `FlutterSemanticsCustomAction`
1811/// breaks the ABI of this struct.
1812typedef struct {
1813 /// The size of the struct. Must be sizeof(FlutterSemanticsUpdate).
1815 /// The number of semantics node updates.
1817 // Array of semantics nodes. Has length `nodes_count`.
1819 /// The number of semantics custom action updates.
1821 /// Array of semantics custom actions. Has length `custom_actions_count`.
1824
1825/// A batch of updates to semantics nodes and custom actions.
1826typedef struct {
1827 /// The size of the struct. Must be sizeof(FlutterSemanticsUpdate2).
1829 /// The number of semantics node updates.
1831 // Array of semantics node pointers. Has length `node_count`.
1833 /// The number of semantics custom action updates.
1835 /// Array of semantics custom action pointers. Has length
1836 /// `custom_action_count`.
1838 // The ID of the view that this update is associated with.
1841
1843 const FlutterSemanticsNode* /* semantics node */,
1844 void* /* user data */);
1845
1847 const FlutterSemanticsCustomAction* /* semantics custom action */,
1848 void* /* user data */);
1849
1851 const FlutterSemanticsUpdate* /* semantics update */,
1852 void* /* user data*/);
1853
1855 const FlutterSemanticsUpdate2* /* semantics update */,
1856 void* /* user data*/);
1857
1858/// An update to whether a message channel has a listener set or not.
1859typedef struct {
1860 /// The size of the struct. Must be sizeof(FlutterChannelUpdate).
1862 /// The name of the channel.
1863 const char* channel;
1864 /// True if a listener has been set, false if one has been cleared.
1867
1869 const FlutterChannelUpdate* /* channel update */,
1870 void* /* user data */);
1871
1873 const FlutterViewFocusChangeRequest* /* request */,
1874 void* /* user data */);
1875
1876typedef struct _FlutterTaskRunner* FlutterTaskRunner;
1877
1878typedef struct {
1880 uint64_t task;
1881} FlutterTask;
1882
1884 FlutterTask /* task */,
1885 uint64_t /* target time nanos */,
1886 void* /* user data */);
1887
1888/// An interface used by the Flutter engine to execute tasks at the target time
1889/// on a specified thread. There should be a 1-1 relationship between a thread
1890/// and a task runner. It is undefined behavior to run a task on a thread that
1891/// is not associated with its task runner.
1892typedef struct {
1893 /// The size of this struct. Must be sizeof(FlutterTaskRunnerDescription).
1896 /// May be called from any thread. Should return true if tasks posted on the
1897 /// calling thread will be run on that same thread.
1898 ///
1899 /// @attention This field is required.
1901 /// May be called from any thread. The given task should be executed by the
1902 /// embedder on the thread associated with that task runner by calling
1903 /// `FlutterEngineRunTask` at the given target time. The system monotonic
1904 /// clock should be used for the target time. The target time is the absolute
1905 /// time from epoch (NOT a delta) at which the task must be returned back to
1906 /// the engine on the correct thread. If the embedder needs to calculate a
1907 /// delta, `FlutterEngineGetCurrentTime` may be called and the difference used
1908 /// as the delta.
1909 ///
1910 /// @attention This field is required.
1912 /// A unique identifier for the task runner. If multiple task runners service
1913 /// tasks on the same thread, their identifiers must match.
1915 /// The callback invoked when the task runner is destroyed.
1918
1919typedef struct {
1920 /// The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
1922 /// Specify the task runner for the thread on which the `FlutterEngineRun`
1923 /// call is made. The same task runner description can be specified for both
1924 /// the render and platform task runners. This makes the Flutter engine use
1925 /// the same thread for both task runners.
1927 /// Specify the task runner for the thread on which the render tasks will be
1928 /// run. The same task runner description can be specified for both the render
1929 /// and platform task runners. This makes the Flutter engine use the same
1930 /// thread for both task runners.
1932 /// Specify a callback that is used to set the thread priority for embedder
1933 /// task runners.
1934 void (*thread_priority_setter)(FlutterThreadPriority);
1935 /// Specify the task runner for the thread on which the UI tasks will be run.
1936 /// This may be same as platform_task_runner, in which case the Flutter engine
1937 /// will run the UI isolate on platform thread.
1940
1941typedef struct {
1942 /// The type of the OpenGL backing store. Currently, it can either be a
1943 /// texture or a framebuffer.
1945 union {
1946 /// A texture for Flutter to render into.
1948 /// A framebuffer for Flutter to render into. The embedder must ensure that
1949 /// the framebuffer is complete.
1951 /// A surface for Flutter to render into. Basically a wrapper around
1952 /// a closure that'll be called when the surface should be made current.
1954 };
1956
1957typedef struct {
1958 /// A pointer to the raw bytes of the allocation described by this software
1959 /// backing store.
1960 const void* allocation;
1961 /// The number of bytes in a single row of the allocation.
1963 /// The number of rows in the allocation.
1964 size_t height;
1965 /// A baton that is not interpreted by the engine in any way. It will be given
1966 /// back to the embedder in the destruction callback below. Embedder resources
1967 /// may be associated with this baton.
1969 /// The callback invoked by the engine when it no longer needs this backing
1970 /// store.
1973
1974typedef struct {
1975 /// The size of this struct. Must be sizeof(FlutterSoftwareBackingStore2).
1977 /// A pointer to the raw bytes of the allocation described by this software
1978 /// backing store.
1979 const void* allocation;
1980 /// The number of bytes in a single row of the allocation.
1982 /// The number of rows in the allocation.
1983 size_t height;
1984 /// A baton that is not interpreted by the engine in any way. It will be given
1985 /// back to the embedder in the destruction callback below. Embedder resources
1986 /// may be associated with this baton.
1988 /// The callback invoked by the engine when it no longer needs this backing
1989 /// store.
1991 /// The pixel format that the engine should use to render into the allocation.
1992 ///
1993 /// On Linux, kFlutterSoftwarePixelFormatBGRA8888 is most commonly used.
1996
1997typedef struct {
1998 /// The size of this struct. Must be sizeof(FlutterMetalBackingStore).
2000 union {
2001 // A Metal texture for Flutter to render into. Ownership is not transferred
2002 // to Flutter; the texture is CFRetained on successfully being passed in and
2003 // CFReleased when no longer used.
2005 };
2007
2008typedef struct {
2009 /// The size of this struct. Must be sizeof(FlutterVulkanBackingStore).
2011 /// The image that the layer will be rendered to. This image must already be
2012 /// available for the engine to bind for writing when it's given to the engine
2013 /// via the backing store creation callback. The engine will perform a host
2014 /// sync for all layers prior to calling the compositor present callback, and
2015 /// so the written layer images can be freely bound by the embedder without
2016 /// any additional synchronization.
2018 /// A baton that is not interpreted by the engine in any way. It will be given
2019 /// back to the embedder in the destruction callback below. Embedder resources
2020 /// may be associated with this baton.
2022 /// The callback invoked by the engine when it no longer needs this backing
2023 /// store.
2026
2027typedef enum {
2028 /// Indicates that the Flutter application requested that an opacity be
2029 /// applied to the platform view.
2031 /// Indicates that the Flutter application requested that the platform view be
2032 /// clipped using a rectangle.
2034 /// Indicates that the Flutter application requested that the platform view be
2035 /// clipped using a rounded rectangle.
2037 /// Indicates that the Flutter application requested that the platform view be
2038 /// transformed before composition.
2041
2042typedef struct {
2043 /// The type of the mutation described by the subsequent union.
2045 union {
2046 double opacity;
2050 };
2052
2053typedef struct {
2054 /// The size of this struct. Must be sizeof(FlutterPlatformView).
2056 /// The identifier of this platform view. This identifier is specified by the
2057 /// application when a platform view is added to the scene via the
2058 /// `SceneBuilder.addPlatformView` call.
2060 /// The number of mutations to be applied to the platform view by the embedder
2061 /// before on-screen composition.
2063 /// The mutations to be applied by this platform view before it is composited
2064 /// on-screen. The Flutter application may transform the platform view but
2065 /// these transformations cannot be affected by the Flutter compositor because
2066 /// it does not render platform views. Since the embedder is responsible for
2067 /// composition of these views, it is also the embedder's responsibility to
2068 /// affect the appropriate transformation.
2069 ///
2070 /// The mutations must be applied in order. The mutations done in the
2071 /// collection don't take into account the device pixel ratio or the root
2072 /// surface transformation. If these exist, the first mutation in the list
2073 /// will be a transformation mutation to make sure subsequent mutations are in
2074 /// the correct coordinate space.
2077
2078typedef enum {
2079 /// Specifies an OpenGL backing store. Can either be an OpenGL texture or
2080 /// framebuffer.
2082 /// Specified an software allocation for Flutter to render into using the CPU.
2084 /// Specifies a Metal backing store. This is backed by a Metal texture.
2086 /// Specifies a Vulkan backing store. This is backed by a Vulkan VkImage.
2088 /// Specifies a allocation that the engine should render into using
2089 /// software rendering.
2092
2093typedef struct {
2094 /// The size of this struct. Must be sizeof(FlutterBackingStore).
2096 /// A baton that is not interpreted by the engine in any way. The embedder may
2097 /// use this to associate resources that are tied to the lifecycle of the
2098 /// `FlutterBackingStore`.
2100 /// Specifies the type of backing store.
2102 /// Indicates if this backing store was updated since the last time it was
2103 /// associated with a presented layer.
2105 union {
2106 /// The description of the OpenGL backing store.
2108 /// The description of the software backing store.
2110 /// The description of the software backing store.
2112 // The description of the Metal backing store.
2114 // The description of the Vulkan backing store.
2116 };
2118
2119typedef struct {
2120 /// The size of this struct. Must be sizeof(FlutterBackingStoreConfig).
2122 /// The size of the render target the engine expects to render into.
2124 /// The identifier for the view that the engine will use this backing store to
2125 /// render into.
2128
2129typedef enum {
2130 /// Indicates that the contents of this layer are rendered by Flutter into a
2131 /// backing store.
2133 /// Indicates that the contents of this layer are determined by the embedder.
2136
2137/// A region represented by a collection of non-overlapping rectangles.
2138typedef struct {
2139 /// The size of this struct. Must be sizeof(FlutterRegion).
2141 /// Number of rectangles in the region.
2143 /// The rectangles that make up the region.
2146
2147/// Contains additional information about the backing store provided
2148/// during presentation to the embedder.
2149typedef struct {
2150 /// The size of this struct. Must be sizeof(FlutterBackingStorePresentInfo).
2152
2153 /// The area of the backing store that contains Flutter contents. Pixels
2154 /// outside of this area are transparent and the embedder may choose not
2155 /// to render them. Coordinates are in physical pixels.
2158
2159typedef struct {
2160 /// This size of this struct. Must be sizeof(FlutterLayer).
2162 /// Each layer displays contents in one way or another. The type indicates
2163 /// whether those contents are specified by Flutter or the embedder.
2165 union {
2166 /// Indicates that the contents of this layer are rendered by Flutter into a
2167 /// backing store.
2169 /// Indicates that the contents of this layer are determined by the
2170 /// embedder.
2172 };
2173 /// The offset of this layer (in physical pixels) relative to the top left of
2174 /// the root surface used by the engine.
2176 /// The size of the layer (in physical pixels).
2178
2179 /// Extra information for the backing store that the embedder may
2180 /// use during presentation.
2182
2183 // Time in nanoseconds at which this frame is scheduled to be presented. 0 if
2184 // not known. See FlutterEngineGetCurrentTime().
2186} FlutterLayer;
2187
2188typedef struct {
2189 /// The size of this struct.
2190 /// Must be sizeof(FlutterPresentViewInfo).
2192
2193 /// The identifier of the target view.
2195
2196 /// The layers that should be composited onto the view.
2198
2199 /// The count of layers.
2201
2202 /// The |FlutterCompositor.user_data|.
2205
2207 const FlutterBackingStoreConfig* config,
2208 FlutterBackingStore* backing_store_out,
2209 void* user_data);
2210
2212 const FlutterBackingStore* renderer,
2213 void* user_data);
2214
2216 size_t layers_count,
2217 void* user_data);
2218
2219/// The callback invoked when the embedder should present to a view.
2220///
2221/// The |FlutterPresentViewInfo| will be deallocated once the callback returns.
2223 const FlutterPresentViewInfo* /* present info */);
2224
2225typedef struct {
2226 /// This size of this struct. Must be sizeof(FlutterCompositor).
2228 /// A baton that in not interpreted by the engine in any way. If it passed
2229 /// back to the embedder in `FlutterCompositor.create_backing_store_callback`,
2230 /// `FlutterCompositor.collect_backing_store_callback`,
2231 /// `FlutterCompositor.present_layers_callback`, and
2232 /// `FlutterCompositor.present_view_callback`.
2234 /// A callback invoked by the engine to obtain a backing store for a specific
2235 /// `FlutterLayer`.
2236 ///
2237 /// On ABI stability: Callers must take care to restrict access within
2238 /// `FlutterBackingStore::struct_size` when specifying a new backing store to
2239 /// the engine. This only matters if the embedder expects to be used with
2240 /// engines older than the version whose headers it used during compilation.
2241 ///
2242 /// The callback should return true if the operation was successful.
2244 /// A callback invoked by the engine to release the backing store. The
2245 /// embedder may collect any resources associated with the backing store.
2246 ///
2247 /// The callback should return true if the operation was successful.
2249 /// Callback invoked by the engine to composite the contents of each layer
2250 /// onto the implicit view.
2251 ///
2252 /// DEPRECATED: Use `present_view_callback` to support multiple views.
2253 /// If this callback is provided, `FlutterEngineAddView` and
2254 /// `FlutterEngineRemoveView` should not be used.
2255 ///
2256 /// Only one of `present_layers_callback` and `present_view_callback` may be
2257 /// provided. Providing both is an error and engine initialization will
2258 /// terminate.
2259 ///
2260 /// The callback should return true if the operation was successful.
2262 /// Avoid caching backing stores provided by this compositor.
2263 ///
2264 /// The engine has an internal backing store cache. Instead of
2265 /// creating & destroying backing stores for every frame, created
2266 /// backing stores are automatically reused for subsequent frames.
2267 ///
2268 /// If you wish to change this behavior and destroy backing stores after
2269 /// they've been used once, and create new backing stores for every frame,
2270 /// you can set this bool to true.
2272 /// Callback invoked by the engine to composite the contents of each layer
2273 /// onto the specified view.
2274 ///
2275 /// Only one of `present_layers_callback` and `present_view_callback` may be
2276 /// provided. Providing both is an error and engine initialization will
2277 /// terminate.
2278 ///
2279 /// The callback should return true if the operation was successful.
2282
2283typedef struct {
2284 /// This size of this struct. Must be sizeof(FlutterLocale).
2286 /// The language code of the locale. For example, "en". This is a required
2287 /// field. The string must be null terminated. It may be collected after the
2288 /// call to `FlutterEngineUpdateLocales`.
2289 const char* language_code;
2290 /// The country code of the locale. For example, "US". This is a an optional
2291 /// field. The string must be null terminated if present. It may be collected
2292 /// after the call to `FlutterEngineUpdateLocales`. If not present, a
2293 /// `nullptr` may be specified.
2294 const char* country_code;
2295 /// The script code of the locale. This is a an optional field. The string
2296 /// must be null terminated if present. It may be collected after the call to
2297 /// `FlutterEngineUpdateLocales`. If not present, a `nullptr` may be
2298 /// specified.
2299 const char* script_code;
2300 /// The variant code of the locale. This is a an optional field. The string
2301 /// must be null terminated if present. It may be collected after the call to
2302 /// `FlutterEngineUpdateLocales`. If not present, a `nullptr` may be
2303 /// specified.
2304 const char* variant_code;
2306
2307/// Callback that returns the system locale.
2308///
2309/// Embedders that implement this callback should return the `FlutterLocale`
2310/// from the `supported_locales` list that most closely matches the
2311/// user/device's preferred locale.
2312///
2313/// This callback does not currently provide the user_data baton.
2314/// https://github.com/flutter/flutter/issues/79826
2315typedef const FlutterLocale* (*FlutterComputePlatformResolvedLocaleCallback)(
2316 const FlutterLocale** /* supported_locales*/,
2317 size_t /* Number of locales*/);
2318
2319typedef struct {
2320 /// The size of this struct. Must be sizeof(FlutterEngineDisplay).
2322
2324
2325 /// This is set to true if the embedder only has one display. In cases where
2326 /// this is set to true, the value of display_id is ignored. In cases where
2327 /// this is not set to true, it is expected that a valid display_id be
2328 /// provided.
2330
2331 /// This represents the refresh period in frames per second. This value may be
2332 /// zero if the device is not running or unavailable or unknown.
2334
2335 /// The width of the display, in physical pixels.
2336 size_t width;
2337
2338 /// The height of the display, in physical pixels.
2339 size_t height;
2340
2341 /// The pixel ratio of the display, which is used to convert physical pixels
2342 /// to logical pixels.
2345
2346/// The update type parameter that is passed to
2347/// `FlutterEngineNotifyDisplayUpdate`.
2348typedef enum {
2349 /// `FlutterEngineDisplay`s that were active during start-up. A display is
2350 /// considered active if:
2351 /// 1. The frame buffer hardware is connected.
2352 /// 2. The display is drawable, e.g. it isn't being mirrored from another
2353 /// connected display or sleeping.
2357
2359
2371
2372typedef struct {
2373 /// The size of this struct. Must be sizeof(FlutterEngineDartBuffer).
2375 /// An opaque baton passed back to the embedder when the
2376 /// buffer_collect_callback is invoked. The engine does not interpret this
2377 /// field in any way.
2379 /// This is an optional field.
2380 ///
2381 /// When specified, the engine will assume that the buffer is owned by the
2382 /// embedder. When the data is no longer needed by any isolate, this callback
2383 /// will be made on an internal engine managed thread. The embedder is free to
2384 /// collect the buffer here. When this field is specified, it is the embedders
2385 /// responsibility to keep the buffer alive and not modify it till this
2386 /// callback is invoked by the engine. The user data specified in the callback
2387 /// is the value of `user_data` field in this struct.
2388 ///
2389 /// When NOT specified, the VM creates an internal copy of the buffer. The
2390 /// caller is free to modify the buffer as necessary or collect it immediately
2391 /// after the call to `FlutterEnginePostDartObject`.
2392 ///
2393 /// @attention The buffer_collect_callback is will only be invoked by the
2394 /// engine when the `FlutterEnginePostDartObject` method
2395 /// returns kSuccess. In case of non-successful calls to this
2396 /// method, it is the embedders responsibility to collect the
2397 /// buffer.
2399 /// A pointer to the bytes of the buffer. When the buffer is owned by the
2400 /// embedder (by specifying the `buffer_collect_callback`), Dart code may
2401 /// modify that embedder owned buffer. For this reason, it is important that
2402 /// this buffer not have page protections that restrict writing to this
2403 /// buffer.
2404 uint8_t* buffer;
2405 /// The size of the buffer.
2408
2409/// This struct specifies the native representation of a Dart object that can be
2410/// sent via a send port to any isolate in the VM that has the corresponding
2411/// receive port.
2412///
2413/// All fields in this struct are copied out in the call to
2414/// `FlutterEnginePostDartObject` and the caller is free to reuse or collect
2415/// this struct after that call.
2416typedef struct {
2418 union {
2423 /// A null terminated string. This string will be copied by the VM in the
2424 /// call to `FlutterEnginePostDartObject` and must be collected by the
2425 /// embedder after that call is made.
2426 const char* string_value;
2428 };
2430
2431/// This enum allows embedders to determine the type of the engine thread in the
2432/// FlutterNativeThreadCallback. Based on the thread type, the embedder may be
2433/// able to tweak the thread priorities for optimum performance.
2434typedef enum {
2435 /// The Flutter Engine considers the thread on which the FlutterEngineRun call
2436 /// is made to be the platform thread. There is only one such thread per
2437 /// engine instance.
2439 /// This is the thread the Flutter Engine uses to execute rendering commands
2440 /// based on the selected client rendering API. There is only one such thread
2441 /// per engine instance.
2443 /// This is a dedicated thread on which the root Dart isolate is serviced.
2444 /// There is only one such thread per engine instance.
2446 /// Multiple threads are used by the Flutter engine to perform long running
2447 /// background tasks.
2450
2451/// A callback made by the engine in response to
2452/// `FlutterEnginePostCallbackOnAllNativeThreads` on all internal thread.
2454 void* user_data);
2455
2456/// AOT data source type.
2460
2461/// This struct specifies one of the various locations the engine can look for
2462/// AOT data sources.
2463typedef struct {
2465 union {
2466 /// Absolute path to an ELF library file.
2467 const char* elf_path;
2468 };
2470
2471// Logging callback for Dart application messages.
2472//
2473// The `tag` parameter contains a null-terminated string containing a logging
2474// tag or component name that can be used to identify system log messages from
2475// the app. The `message` parameter contains a null-terminated string
2476// containing the message to be logged. `user_data` is a user data baton passed
2477// in `FlutterEngineRun`.
2478typedef void (*FlutterLogMessageCallback)(const char* /* tag */,
2479 const char* /* message */,
2480 void* /* user_data */);
2481
2482/// An opaque object that describes the AOT data that can be used to launch a
2483/// FlutterEngine instance in AOT mode.
2485
2486typedef struct {
2487 /// The size of this struct. Must be sizeof(FlutterProjectArgs).
2489 /// The path to the Flutter assets directory containing project assets. The
2490 /// string can be collected after the call to `FlutterEngineRun` returns. The
2491 /// string must be NULL terminated.
2492 const char* assets_path;
2493 /// The path to the Dart file containing the `main` entry point.
2494 /// The string can be collected after the call to `FlutterEngineRun` returns.
2495 /// The string must be NULL terminated.
2496 ///
2497 /// @deprecated As of Dart 2, running from Dart source is no longer
2498 /// supported. Dart code should now be compiled to kernel form
2499 /// and will be loaded by from `kernel_blob.bin` in the assets
2500 /// directory. This struct member is retained for ABI
2501 /// stability.
2503 /// The path to the `.packages` file for the project. The string can be
2504 /// collected after the call to `FlutterEngineRun` returns. The string must be
2505 /// NULL terminated.
2506 ///
2507 /// @deprecated As of Dart 2, running from Dart source is no longer
2508 /// supported. Dart code should now be compiled to kernel form
2509 /// and will be loaded by from `kernel_blob.bin` in the assets
2510 /// directory. This struct member is retained for ABI
2511 /// stability.
2513 /// The path to the `icudtl.dat` file for the project. The string can be
2514 /// collected after the call to `FlutterEngineRun` returns. The string must
2515 /// be NULL terminated.
2516 const char* icu_data_path;
2517 /// The command line argument count used to initialize the project.
2519 /// The command line arguments used to initialize the project. The strings can
2520 /// be collected after the call to `FlutterEngineRun` returns. The strings
2521 /// must be `NULL` terminated.
2522 ///
2523 /// @attention The first item in the command line (if specified at all) is
2524 /// interpreted as the executable name. So if an engine flag
2525 /// needs to be passed into the same, it needs to not be the
2526 /// very first item in the list.
2527 ///
2528 /// The set of engine flags are only meant to control
2529 /// unstable features in the engine. Deployed applications should not pass any
2530 /// command line arguments at all as they may affect engine stability at
2531 /// runtime in the presence of un-sanitized input. The list of currently
2532 /// recognized engine flags and their descriptions can be retrieved from the
2533 /// `switches.h` engine source file.
2534 const char* const* command_line_argv;
2535 /// The callback invoked by the engine in order to give the embedder the
2536 /// chance to respond to platform messages from the Dart application.
2537 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2538 /// call is made. The second parameter, `user_data`, is supplied when
2539 /// `FlutterEngineRun` or `FlutterEngineInitialize` is called.
2541 /// The VM snapshot data buffer used in AOT operation. This buffer must be
2542 /// mapped in as read-only. For more information refer to the documentation on
2543 /// the Wiki at
2544 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2545 const uint8_t* vm_snapshot_data;
2546 /// The size of the VM snapshot data buffer. If vm_snapshot_data is a symbol
2547 /// reference, 0 may be passed here.
2549 /// The VM snapshot instructions buffer used in AOT operation. This buffer
2550 /// must be mapped in as read-execute. For more information refer to the
2551 /// documentation on the Wiki at
2552 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2554 /// The size of the VM snapshot instructions buffer. If
2555 /// vm_snapshot_instructions is a symbol reference, 0 may be passed here.
2557 /// The isolate snapshot data buffer used in AOT operation. This buffer must
2558 /// be mapped in as read-only. For more information refer to the documentation
2559 /// on the Wiki at
2560 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2562 /// The size of the isolate snapshot data buffer. If isolate_snapshot_data is
2563 /// a symbol reference, 0 may be passed here.
2565 /// The isolate snapshot instructions buffer used in AOT operation. This
2566 /// buffer must be mapped in as read-execute. For more information refer to
2567 /// the documentation on the Wiki at
2568 /// https://github.com/flutter/flutter/wiki/Flutter-engine-operation-in-AOT-Mode
2570 /// The size of the isolate snapshot instructions buffer. If
2571 /// isolate_snapshot_instructions is a symbol reference, 0 may be passed here.
2573 /// The callback invoked by the engine in root isolate scope. Called
2574 /// immediately after the root isolate has been created and marked runnable.
2576 /// The legacy callback invoked by the engine in order to give the embedder
2577 /// the chance to respond to semantics node updates from the Dart application.
2578 /// Semantics node updates are sent in batches terminated by a 'batch end'
2579 /// callback that is passed a sentinel `FlutterSemanticsNode` whose `id` field
2580 /// has the value `kFlutterSemanticsNodeIdBatchEnd`.
2581 ///
2582 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2583 /// call is made.
2584 ///
2585 /// @deprecated Use `update_semantics_callback2` instead. Only one of
2586 /// `update_semantics_node_callback`,
2587 /// `update_semantics_callback`, and
2588 /// `update_semantics_callback2` may be provided; the others
2589 /// should be set to null.
2590 ///
2591 /// This callback is incompatible with multiple views. If this
2592 /// callback is provided, `FlutterEngineAddView` and
2593 /// `FlutterEngineRemoveView` should not be used.
2595 /// The legacy callback invoked by the engine in order to give the embedder
2596 /// the chance to respond to updates to semantics custom actions from the Dart
2597 /// application. Custom action updates are sent in batches terminated by a
2598 /// 'batch end' callback that is passed a sentinel
2599 /// `FlutterSemanticsCustomAction` whose `id` field has the value
2600 /// `kFlutterSemanticsCustomActionIdBatchEnd`.
2601 ///
2602 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2603 /// call is made.
2604 ///
2605 /// @deprecated Use `update_semantics_callback2` instead. Only one of
2606 /// `update_semantics_node_callback`,
2607 /// `update_semantics_callback`, and
2608 /// `update_semantics_callback2` may be provided; the others
2609 /// should be set to null.
2610 ///
2611 /// This callback is incompatible with multiple views. If this
2612 /// callback is provided, `FlutterEngineAddView` and
2613 /// `FlutterEngineRemoveView` should not be used.
2616 /// Path to a directory used to store data that is cached across runs of a
2617 /// Flutter application (such as compiled shader programs used by Skia).
2618 /// This is optional. The string must be NULL terminated.
2619 ///
2620 // This is different from the cache-path-dir argument defined in switches.h,
2621 // which is used in `flutter::Settings` as `temp_directory_path`.
2623
2624 /// If true, the engine would only read the existing cache, but not write new
2625 /// ones.
2627
2628 /// A callback that gets invoked by the engine when it attempts to wait for a
2629 /// platform vsync event. The engine will give the platform a baton that needs
2630 /// to be returned back to the engine via `FlutterEngineOnVsync`. All batons
2631 /// must be retured to the engine before initializing a
2632 /// `FlutterEngineShutdown`. Not doing the same will result in a memory leak.
2633 /// While the call to `FlutterEngineOnVsync` must occur on the thread that
2634 /// made the call to `FlutterEngineRun`, the engine will make this callback on
2635 /// an internal engine-managed thread. If the components accessed on the
2636 /// embedder are not thread safe, the appropriate re-threading must be done.
2638
2639 /// The name of a custom Dart entrypoint. This is optional and specifying a
2640 /// null or empty entrypoint makes the engine look for a method named "main"
2641 /// in the root library of the application.
2642 ///
2643 /// Care must be taken to ensure that the custom entrypoint is not tree-shaken
2644 /// away. Usually, this is done using the `@pragma('vm:entry-point')`
2645 /// decoration.
2647
2648 /// Typically the Flutter engine create and manages its internal threads. This
2649 /// optional argument allows for the specification of task runner interfaces
2650 /// to event loops managed by the embedder on threads it creates.
2652
2653 /// All `FlutterEngine` instances in the process share the same Dart VM. When
2654 /// the first engine is launched, it starts the Dart VM as well. It used to be
2655 /// the case that it was not possible to shutdown the Dart VM cleanly and
2656 /// start it back up in the process in a safe manner. This issue has since
2657 /// been patched. Unfortunately, applications already began to make use of the
2658 /// fact that shutting down the Flutter engine instance left a running VM in
2659 /// the process. Since a Flutter engine could be launched on any thread,
2660 /// applications would "warm up" the VM on another thread by launching
2661 /// an engine with no isolates and then shutting it down immediately. The main
2662 /// Flutter application could then be started on the main thread without
2663 /// having to incur the Dart VM startup costs at that time. With the new
2664 /// behavior, this "optimization" immediately becomes massive performance
2665 /// pessimization as the VM would be started up in the "warm up" phase, shut
2666 /// down there and then started again on the main thread. Changing this
2667 /// behavior was deemed to be an unacceptable breaking change. Embedders that
2668 /// wish to shutdown the Dart VM when the last engine is terminated in the
2669 /// process should opt into this behavior by setting this flag to true.
2671
2672 /// Typically, Flutter renders the layer hierarchy into a single root surface.
2673 /// However, when embedders need to interleave their own contents within the
2674 /// Flutter layer hierarchy, their applications can push platform views within
2675 /// the Flutter scene. This is done using the `SceneBuilder.addPlatformView`
2676 /// call. When this happens, the Flutter rasterizer divides the effective view
2677 /// hierarchy into multiple layers. Each layer gets its own backing store and
2678 /// Flutter renders into the same. Once the layers contents have been
2679 /// fulfilled, the embedder is asked to composite these layers on-screen. At
2680 /// this point, it can interleave its own contents within the effective
2681 /// hierarchy. The interface for the specification of these layer backing
2682 /// stores and the hooks to listen for the composition of layers on-screen can
2683 /// be controlled using this field. This field is completely optional. In its
2684 /// absence, platforms views in the scene are ignored and Flutter renders to
2685 /// the root surface as normal.
2687
2688 /// Max size of the old gen heap for the Dart VM in MB, or 0 for unlimited, -1
2689 /// for default value.
2690 ///
2691 /// See also:
2692 /// https://github.com/dart-lang/sdk/blob/ca64509108b3e7219c50d6c52877c85ab6a35ff2/runtime/vm/flag_list.h#L150
2694
2695 /// The AOT data to be used in AOT operation.
2696 ///
2697 /// Embedders should instantiate and destroy this object via the
2698 /// FlutterEngineCreateAOTData and FlutterEngineCollectAOTData methods.
2699 ///
2700 /// Embedders can provide either snapshot buffers or aot_data, but not both.
2702
2703 /// A callback that computes the locale the platform would natively resolve
2704 /// to.
2705 ///
2706 /// The input parameter is an array of FlutterLocales which represent the
2707 /// locales supported by the app. One of the input supported locales should
2708 /// be selected and returned to best match with the user/device's preferred
2709 /// locale. The implementation should produce a result that as closely
2710 /// matches what the platform would natively resolve to as possible.
2713
2714 /// The command line argument count for arguments passed through to the Dart
2715 /// entrypoint.
2717
2718 /// The command line arguments passed through to the Dart entrypoint. The
2719 /// strings must be `NULL` terminated.
2720 ///
2721 /// The strings will be copied out and so any strings passed in here can
2722 /// be safely collected after initializing the engine with
2723 /// `FlutterProjectArgs`.
2724 const char* const* dart_entrypoint_argv;
2725
2726 // Logging callback for Dart application messages.
2727 //
2728 // This callback is used by embedder to log print messages from the running
2729 // Flutter application. This callback is made on an internal engine managed
2730 // thread and embedders must re-thread if necessary. Performing blocking calls
2731 // in this callback may introduce application jank.
2733
2734 // A tag string associated with application log messages.
2735 //
2736 // A log message tag string that can be used convey application, subsystem,
2737 // or component name to embedder's logger. This string will be passed to to
2738 // callbacks on `log_message_callback`. Defaults to "flutter" if unspecified.
2739 const char* log_tag;
2740
2741 // A callback that is invoked right before the engine is restarted.
2742 //
2743 // This optional callback is typically used to reset states to as if the
2744 // engine has just been started, and usually indicates the user has requested
2745 // a hot restart (Shift-R in the Flutter CLI.) It is not called the first time
2746 // the engine starts.
2747 //
2748 // The first argument is the `user_data` from `FlutterEngineInitialize`.
2750
2751 /// The callback invoked by the engine in order to give the embedder the
2752 /// chance to respond to updates to semantics nodes and custom actions from
2753 /// the Dart application.
2754 ///
2755 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2756 /// call is made.
2757 ///
2758 /// @deprecated Use `update_semantics_callback2` instead. Only one of
2759 /// `update_semantics_node_callback`,
2760 /// `update_semantics_callback`, and
2761 /// `update_semantics_callback2` may be provided; the others
2762 /// must be set to null.
2763 ///
2764 /// This callback is incompatible with multiple views. If this
2765 /// callback is provided, `FlutterEngineAddView` and
2766 /// `FlutterEngineRemoveView` should not be used.
2768
2769 /// The callback invoked by the engine in order to give the embedder the
2770 /// chance to respond to updates to semantics nodes and custom actions from
2771 /// the Dart application.
2772 ///
2773 /// The callback will be invoked on the thread on which the `FlutterEngineRun`
2774 /// call is made.
2775 ///
2776 /// Only one of `update_semantics_node_callback`, `update_semantics_callback`,
2777 /// and `update_semantics_callback2` may be provided; the others must be set
2778 /// to null.
2780
2781 /// The callback invoked by the engine in response to a channel listener
2782 /// being registered on the framework side. The callback is invoked from
2783 /// a task posted to the platform thread.
2785
2786 /// The callback invoked by the engine when FlutterView focus state has
2787 /// changed. The embedder can use this callback to request focus change for
2788 /// the native view. The callback is invoked from a task posted to the
2789 /// platform thread.
2791
2792 /// Opaque identifier provided by the engine. Accessible in Dart code through
2793 /// `PlatformDispatcher.instance.engineId`. Can be used in native code to
2794 /// retrieve the engine instance that is running the Dart code.
2795 int64_t engine_id;
2797
2798typedef struct {
2799 /// The size of this struct. Must be
2800 /// sizeof(FlutterSendSemanticsActionInfo).
2802
2803 /// The ID of the view that includes the node.
2805
2806 /// The semantics node identifier.
2807 uint64_t node_id;
2808
2809 /// The semantics action.
2811
2812 /// Data associated with the action.
2813 const uint8_t* data;
2814
2815 /// The data length.
2818
2819#ifndef FLUTTER_ENGINE_NO_PROTOTYPES
2820
2821// NOLINTBEGIN(google-objc-function-naming)
2822
2823//------------------------------------------------------------------------------
2824/// @brief Creates the necessary data structures to launch a Flutter Dart
2825/// application in AOT mode. The data may only be collected after
2826/// all FlutterEngine instances launched using this data have been
2827/// terminated.
2828///
2829/// @param[in] source The source of the AOT data.
2830/// @param[out] data_out The AOT data on success. Unchanged on failure.
2831///
2832/// @return Returns if the AOT data could be successfully resolved.
2833///
2836 const FlutterEngineAOTDataSource* source,
2837 FlutterEngineAOTData* data_out);
2838
2839//------------------------------------------------------------------------------
2840/// @brief Collects the AOT data.
2841///
2842/// @warning The embedder must ensure that this call is made only after all
2843/// FlutterEngine instances launched using this data have been
2844/// terminated, and that all of those instances were launched with
2845/// the FlutterProjectArgs::shutdown_dart_vm_when_done flag set to
2846/// true.
2847///
2848/// @param[in] data The data to collect.
2849///
2850/// @return Returns if the AOT data was successfully collected.
2851///
2854
2855//------------------------------------------------------------------------------
2856/// @brief Initialize and run a Flutter engine instance and return a handle
2857/// to it. This is a convenience method for the pair of calls to
2858/// `FlutterEngineInitialize` and `FlutterEngineRunInitialized`.
2859///
2860/// @note This method of running a Flutter engine works well except in
2861/// cases where the embedder specifies custom task runners via
2862/// `FlutterProjectArgs::custom_task_runners`. In such cases, the
2863/// engine may need the embedder to post tasks back to it before
2864/// `FlutterEngineRun` has returned. Embedders can only post tasks
2865/// to the engine if they have a handle to the engine. In such
2866/// cases, embedders are advised to get the engine handle by calling
2867/// `FlutterEngineInitialize`. Then they can call
2868/// `FlutterEngineRunInitialized` knowing that they will be able to
2869/// service custom tasks on other threads with the engine handle.
2870///
2871/// @param[in] version The Flutter embedder API version. Must be
2872/// FLUTTER_ENGINE_VERSION.
2873/// @param[in] config The renderer configuration.
2874/// @param[in] args The Flutter project arguments.
2875/// @param user_data A user data baton passed back to embedders in
2876/// callbacks.
2877/// @param[out] engine_out The engine handle on successful engine creation.
2878///
2879/// @return The result of the call to run the Flutter engine.
2880///
2883 const FlutterRendererConfig* config,
2884 const FlutterProjectArgs* args,
2885 void* user_data,
2887 engine_out);
2888
2889//------------------------------------------------------------------------------
2890/// @brief Shuts down a Flutter engine instance. The engine handle is no
2891/// longer valid for any calls in the embedder API after this point.
2892/// Making additional calls with this handle is undefined behavior.
2893///
2894/// @note This de-initializes the Flutter engine instance (via an implicit
2895/// call to `FlutterEngineDeinitialize`) if necessary.
2896///
2897/// @param[in] engine The Flutter engine instance to collect.
2898///
2899/// @return The result of the call to shutdown the Flutter engine instance.
2900///
2903 engine);
2904
2905//------------------------------------------------------------------------------
2906/// @brief Initialize a Flutter engine instance. This does not run the
2907/// Flutter application code till the `FlutterEngineRunInitialized`
2908/// call is made. Besides Flutter application code, no tasks are
2909/// scheduled on embedder managed task runners either. This allows
2910/// embedders providing custom task runners to the Flutter engine to
2911/// obtain a handle to the Flutter engine before the engine can post
2912/// tasks on these task runners.
2913///
2914/// @param[in] version The Flutter embedder API version. Must be
2915/// FLUTTER_ENGINE_VERSION.
2916/// @param[in] config The renderer configuration.
2917/// @param[in] args The Flutter project arguments.
2918/// @param user_data A user data baton passed back to embedders in
2919/// callbacks.
2920/// @param[out] engine_out The engine handle on successful engine creation.
2921///
2922/// @return The result of the call to initialize the Flutter engine.
2923///
2926 const FlutterRendererConfig* config,
2927 const FlutterProjectArgs* args,
2928 void* user_data,
2930 engine_out);
2931
2932//------------------------------------------------------------------------------
2933/// @brief Stops running the Flutter engine instance. After this call, the
2934/// embedder is also guaranteed that no more calls to post tasks
2935/// onto custom task runners specified by the embedder are made. The
2936/// Flutter engine handle still needs to be collected via a call to
2937/// `FlutterEngineShutdown`.
2938///
2939/// @param[in] engine The running engine instance to de-initialize.
2940///
2941/// @return The result of the call to de-initialize the Flutter engine.
2942///
2945 engine);
2946
2947//------------------------------------------------------------------------------
2948/// @brief Runs an initialized engine instance. An engine can be
2949/// initialized via `FlutterEngineInitialize`. An initialized
2950/// instance can only be run once. During and after this call,
2951/// custom task runners supplied by the embedder are expected to
2952/// start servicing tasks.
2953///
2954/// @param[in] engine An initialized engine instance that has not previously
2955/// been run.
2956///
2957/// @return The result of the call to run the initialized Flutter
2958/// engine instance.
2959///
2963
2964//------------------------------------------------------------------------------
2965/// @brief Adds a view.
2966///
2967/// This is an asynchronous operation. The view should not be used
2968/// until the |info.add_view_callback| is invoked with an |added|
2969/// value of true. The embedder should prepare resources in advance
2970/// but be ready to clean up on failure.
2971///
2972/// A frame is scheduled if the operation succeeds.
2973///
2974/// The callback is invoked on a thread managed by the engine. The
2975/// embedder should re-thread if needed.
2976///
2977/// Attempting to add the implicit view will fail and will return
2978/// kInvalidArguments. Attempting to add a view with an already
2979/// existing view ID will fail, and |info.add_view_callback| will be
2980/// invoked with an |added| value of false.
2981///
2982/// @param[in] engine A running engine instance.
2983/// @param[in] info The add view arguments. This can be deallocated
2984/// once |FlutterEngineAddView| returns, before
2985/// |add_view_callback| is invoked.
2986///
2987/// @return The result of *starting* the asynchronous operation. If
2988/// `kSuccess`, the |add_view_callback| will be invoked.
2991 engine,
2992 const FlutterAddViewInfo* info);
2993
2994//------------------------------------------------------------------------------
2995/// @brief Removes a view.
2996///
2997/// This is an asynchronous operation. The view's resources must not
2998/// be cleaned up until |info.remove_view_callback| is invoked with
2999/// a |removed| value of true.
3000///
3001/// The callback is invoked on a thread managed by the engine. The
3002/// embedder should re-thread if needed.
3003///
3004/// Attempting to remove the implicit view will fail and will return
3005/// kInvalidArguments. Attempting to remove a view with a
3006/// non-existent view ID will fail, and |info.remove_view_callback|
3007/// will be invoked with a |removed| value of false.
3008///
3009/// @param[in] engine A running engine instance.
3010/// @param[in] info The remove view arguments. This can be deallocated
3011/// once |FlutterEngineRemoveView| returns, before
3012/// |remove_view_callback| is invoked.
3013///
3014/// @return The result of *starting* the asynchronous operation. If
3015/// `kSuccess`, the |remove_view_callback| will be invoked.
3018 engine,
3019 const FlutterRemoveViewInfo* info);
3020
3021//------------------------------------------------------------------------------
3022/// @brief Notifies the engine that platform view focus state has changed.
3023///
3024/// @param[in] engine A running engine instance
3025/// @param[in] event The focus event data describing the change.
3029 const FlutterViewFocusEvent* event);
3030
3034 const FlutterWindowMetricsEvent* event);
3035
3039 const FlutterPointerEvent* events,
3040 size_t events_count);
3041
3042//------------------------------------------------------------------------------
3043/// @brief Sends a key event to the engine. The framework will decide
3044/// whether to handle this event in a synchronous fashion, although
3045/// due to technical limitation, the result is always reported
3046/// asynchronously. The `callback` is guaranteed to be called
3047/// exactly once.
3048///
3049/// @param[in] engine A running engine instance.
3050/// @param[in] event The event data to be sent. This function will no
3051/// longer access `event` after returning.
3052/// @param[in] callback The callback invoked by the engine when the
3053/// Flutter application has decided whether it
3054/// handles this event. Accepts nullptr.
3055/// @param[in] user_data The context associated with the callback. The
3056/// exact same value will used to invoke `callback`.
3057/// Accepts nullptr.
3058///
3059/// @return The result of the call.
3060///
3063 engine,
3064 const FlutterKeyEvent* event,
3066 void* user_data);
3067
3072
3073//------------------------------------------------------------------------------
3074/// @brief Creates a platform message response handle that allows the
3075/// embedder to set a native callback for a response to a message.
3076/// This handle may be set on the `response_handle` field of any
3077/// `FlutterPlatformMessage` sent to the engine.
3078///
3079/// The handle must be collected via a call to
3080/// `FlutterPlatformMessageReleaseResponseHandle`. This may be done
3081/// immediately after a call to `FlutterEngineSendPlatformMessage`
3082/// with a platform message whose response handle contains the handle
3083/// created using this call. In case a handle is created but never
3084/// sent in a message, the release call must still be made. Not
3085/// calling release on the handle results in a small memory leak.
3086///
3087/// The user data baton passed to the data callback is the one
3088/// specified in this call as the third argument.
3089///
3090/// @see FlutterPlatformMessageReleaseResponseHandle()
3091///
3092/// @param[in] engine A running engine instance.
3093/// @param[in] data_callback The callback invoked by the engine when the
3094/// Flutter application send a response on the
3095/// handle.
3096/// @param[in] user_data The user data associated with the data callback.
3097/// @param[out] response_out The response handle created when this call is
3098/// successful.
3099///
3100/// @return The result of the call.
3101///
3105 FlutterDataCallback data_callback,
3106 void* user_data,
3108
3109//------------------------------------------------------------------------------
3110/// @brief Collects the handle created using
3111/// `FlutterPlatformMessageCreateResponseHandle`.
3112///
3113/// @see FlutterPlatformMessageCreateResponseHandle()
3114///
3115/// @param[in] engine A running engine instance.
3116/// @param[in] response The platform message response handle to collect.
3117/// These handles are created using
3118/// `FlutterPlatformMessageCreateResponseHandle()`.
3119///
3120/// @return The result of the call.
3121///
3126
3127//------------------------------------------------------------------------------
3128/// @brief Send a response from the native side to a platform message from
3129/// the Dart Flutter application.
3130///
3131/// @param[in] engine The running engine instance.
3132/// @param[in] handle The platform message response handle.
3133/// @param[in] data The data to associate with the platform message
3134/// response.
3135/// @param[in] data_length The length of the platform message response data.
3136///
3137/// @return The result of the call.
3138///
3143 const uint8_t* data,
3144 size_t data_length);
3145
3146//------------------------------------------------------------------------------
3147/// @brief This API is only meant to be used by platforms that need to
3148/// flush tasks on a message loop not controlled by the Flutter
3149/// engine.
3150///
3151/// @deprecated This API will be deprecated and is not part of the stable API.
3152/// Please use the custom task runners API by setting an
3153/// appropriate `FlutterProjectArgs::custom_task_runners`
3154/// interface. This will yield better performance and the
3155/// interface is stable.
3156///
3157/// @return The result of the call.
3158///
3161
3162//------------------------------------------------------------------------------
3163/// @brief Register an external texture with a unique (per engine)
3164/// identifier. Only rendering backends that support external
3165/// textures accept external texture registrations. After the
3166/// external texture is registered, the application can mark that a
3167/// frame is available by calling
3168/// `FlutterEngineMarkExternalTextureFrameAvailable`.
3169///
3170/// @see FlutterEngineUnregisterExternalTexture()
3171/// @see FlutterEngineMarkExternalTextureFrameAvailable()
3172///
3173/// @param[in] engine A running engine instance.
3174/// @param[in] texture_identifier The identifier of the texture to register
3175/// with the engine. The embedder may supply new
3176/// frames to this texture using the same
3177/// identifier.
3178///
3179/// @return The result of the call.
3180///
3184 int64_t texture_identifier);
3185
3186//------------------------------------------------------------------------------
3187/// @brief Unregister a previous texture registration.
3188///
3189/// @see FlutterEngineRegisterExternalTexture()
3190/// @see FlutterEngineMarkExternalTextureFrameAvailable()
3191///
3192/// @param[in] engine A running engine instance.
3193/// @param[in] texture_identifier The identifier of the texture for which new
3194/// frame will not be available.
3195///
3196/// @return The result of the call.
3197///
3201 int64_t texture_identifier);
3202
3203//------------------------------------------------------------------------------
3204/// @brief Mark that a new texture frame is available for a given texture
3205/// identifier.
3206///
3207/// @see FlutterEngineRegisterExternalTexture()
3208/// @see FlutterEngineUnregisterExternalTexture()
3209///
3210/// @param[in] engine A running engine instance.
3211/// @param[in] texture_identifier The identifier of the texture whose frame
3212/// has been updated.
3213///
3214/// @return The result of the call.
3215///
3219 int64_t texture_identifier);
3220
3221//------------------------------------------------------------------------------
3222/// @brief Enable or disable accessibility semantics.
3223///
3224/// @param[in] engine A running engine instance.
3225/// @param[in] enabled When enabled, changes to the semantic contents of the
3226/// window are sent via the
3227/// `FlutterUpdateSemanticsCallback2` registered to
3228/// `update_semantics_callback2` in
3229/// `FlutterProjectArgs`.
3230///
3231/// @return The result of the call.
3232///
3236 bool enabled);
3237
3238//------------------------------------------------------------------------------
3239/// @brief Sets additional accessibility features.
3240///
3241/// @param[in] engine A running engine instance
3242/// @param[in] features The accessibility features to set.
3243///
3244/// @return The result of the call.
3245///
3250
3251//------------------------------------------------------------------------------
3252/// @brief Dispatch a semantics action to the specified semantics node
3253/// in the implicit view.
3254///
3255/// @deprecated Use `FlutterEngineSendSemanticsAction` instead.
3256///
3257/// @param[in] engine A running engine instance.
3258/// @param[in] node_id The semantics node identifier.
3259/// @param[in] action The semantics action.
3260/// @param[in] data Data associated with the action.
3261/// @param[in] data_length The data length.
3262///
3263/// @return The result of the call.
3264///
3268 uint64_t node_id,
3270 const uint8_t* data,
3271 size_t data_length);
3272
3273//------------------------------------------------------------------------------
3274/// @brief Dispatch a semantics action to the specified semantics node
3275/// within a specific view.
3276///
3277/// @param[in] engine A running engine instance.
3278/// @param[in] info The dispatch semantics on view arguments.
3279/// This can be deallocated once
3280/// |FlutterEngineSendSemanticsAction| returns.
3281///
3282/// @return The result of the call.
3283///
3287 const FlutterSendSemanticsActionInfo* info);
3288
3289//------------------------------------------------------------------------------
3290/// @brief Notify the engine that a vsync event occurred. A baton passed to
3291/// the platform via the vsync callback must be returned. This call
3292/// must be made on the thread on which the call to
3293/// `FlutterEngineRun` was made.
3294///
3295/// @see FlutterEngineGetCurrentTime()
3296///
3297/// @attention That frame timepoints are in nanoseconds.
3298///
3299/// @attention The system monotonic clock is used as the timebase.
3300///
3301/// @param[in] engine. A running engine instance.
3302/// @param[in] baton The baton supplied by the engine.
3303/// @param[in] frame_start_time_nanos The point at which the vsync event
3304/// occurred or will occur. If the time
3305/// point is in the future, the engine will
3306/// wait till that point to begin its frame
3307/// workload.
3308/// @param[in] frame_target_time_nanos The point at which the embedder
3309/// anticipates the next vsync to occur.
3310/// This is a hint the engine uses to
3311/// schedule Dart VM garbage collection in
3312/// periods in which the various threads
3313/// are most likely to be idle. For
3314/// example, for a 60Hz display, embedders
3315/// should add 16.6 * 1e6 to the frame time
3316/// field.
3317///
3318/// @return The result of the call.
3319///
3322 engine,
3323 intptr_t baton,
3324 uint64_t frame_start_time_nanos,
3325 uint64_t frame_target_time_nanos);
3326
3327//------------------------------------------------------------------------------
3328/// @brief Reloads the system fonts in engine.
3329///
3330/// @param[in] engine. A running engine instance.
3331///
3332/// @return The result of the call.
3333///
3337
3338//------------------------------------------------------------------------------
3339/// @brief A profiling utility. Logs a trace duration begin event to the
3340/// timeline. If the timeline is unavailable or disabled, this has
3341/// no effect. Must be balanced with an duration end event (via
3342/// `FlutterEngineTraceEventDurationEnd`) with the same name on the
3343/// same thread. Can be called on any thread. Strings passed into
3344/// the function will NOT be copied when added to the timeline. Only
3345/// string literals may be passed in.
3346///
3347/// @param[in] name The name of the trace event.
3348///
3351
3352//-----------------------------------------------------------------------------
3353/// @brief A profiling utility. Logs a trace duration end event to the
3354/// timeline. If the timeline is unavailable or disabled, this has
3355/// no effect. This call must be preceded by a trace duration begin
3356/// call (via `FlutterEngineTraceEventDurationBegin`) with the same
3357/// name on the same thread. Can be called on any thread. Strings
3358/// passed into the function will NOT be copied when added to the
3359/// timeline. Only string literals may be passed in.
3360///
3361/// @param[in] name The name of the trace event.
3362///
3365
3366//-----------------------------------------------------------------------------
3367/// @brief A profiling utility. Logs a trace duration instant event to the
3368/// timeline. If the timeline is unavailable or disabled, this has
3369/// no effect. Can be called on any thread. Strings passed into the
3370/// function will NOT be copied when added to the timeline. Only
3371/// string literals may be passed in.
3372///
3373/// @param[in] name The name of the trace event.
3374///
3376void FlutterEngineTraceEventInstant(const char* name);
3377
3378//------------------------------------------------------------------------------
3379/// @brief Posts a task onto the Flutter render thread. Typically, this may
3380/// be called from any thread as long as a `FlutterEngineShutdown`
3381/// on the specific engine has not already been initiated.
3382///
3383/// @param[in] engine A running engine instance.
3384/// @param[in] callback The callback to execute on the render thread.
3385/// @param callback_data The callback context.
3386///
3387/// @return The result of the call.
3388///
3393 void* callback_data);
3394
3395//------------------------------------------------------------------------------
3396/// @brief Get the current time in nanoseconds from the clock used by the
3397/// flutter engine. This is the system monotonic clock.
3398///
3399/// @return The current time in nanoseconds.
3400///
3403
3404//------------------------------------------------------------------------------
3405/// @brief Inform the engine to run the specified task. This task has been
3406/// given to the embedder via the
3407/// `FlutterTaskRunnerDescription.post_task_callback`. This call
3408/// must only be made at the target time specified in that callback.
3409/// Running the task before that time is undefined behavior.
3410///
3411/// @param[in] engine A running engine instance.
3412/// @param[in] task the task handle.
3413///
3414/// @return The result of the call.
3415///
3418 engine,
3419 const FlutterTask* task);
3420
3421//------------------------------------------------------------------------------
3422/// @brief Notify a running engine instance that the locale has been
3423/// updated. The preferred locale must be the first item in the list
3424/// of locales supplied. The other entries will be used as a
3425/// fallback.
3426///
3427/// @param[in] engine A running engine instance.
3428/// @param[in] locales The updated locales in the order of preference.
3429/// @param[in] locales_count The count of locales supplied.
3430///
3431/// @return Whether the locale updates were applied.
3432///
3435 engine,
3436 const FlutterLocale** locales,
3437 size_t locales_count);
3438
3439//------------------------------------------------------------------------------
3440/// @brief Returns if the Flutter engine instance will run AOT compiled
3441/// Dart code. This call has no threading restrictions.
3442///
3443/// For embedder code that is configured for both AOT and JIT mode
3444/// Dart execution based on the Flutter engine being linked to, this
3445/// runtime check may be used to appropriately configure the
3446/// `FlutterProjectArgs`. In JIT mode execution, the kernel
3447/// snapshots must be present in the Flutter assets directory
3448/// specified in the `FlutterProjectArgs`. For AOT execution, the
3449/// fields `vm_snapshot_data`, `vm_snapshot_instructions`,
3450/// `isolate_snapshot_data` and `isolate_snapshot_instructions`
3451/// (along with their size fields) must be specified in
3452/// `FlutterProjectArgs`.
3453///
3454/// @return True, if AOT Dart code is run. JIT otherwise.
3455///
3458
3459//------------------------------------------------------------------------------
3460/// @brief Posts a Dart object to specified send port. The corresponding
3461/// receive port for send port can be in any isolate running in the
3462/// VM. This isolate can also be the root isolate for an
3463/// unrelated engine. The engine parameter is necessary only to
3464/// ensure the call is not made when no engine (and hence no VM) is
3465/// running.
3466///
3467/// Unlike the platform messages mechanism, there are no threading
3468/// restrictions when using this API. Message can be posted on any
3469/// thread and they will be made available to isolate on which the
3470/// corresponding send port is listening.
3471///
3472/// However, it is the embedders responsibility to ensure that the
3473/// call is not made during an ongoing call the
3474/// `FlutterEngineDeinitialize` or `FlutterEngineShutdown` on
3475/// another thread.
3476///
3477/// @param[in] engine A running engine instance.
3478/// @param[in] port The send port to send the object to.
3479/// @param[in] object The object to send to the isolate with the
3480/// corresponding receive port.
3481///
3482/// @return If the message was posted to the send port.
3483///
3488 const FlutterEngineDartObject* object);
3489
3490//------------------------------------------------------------------------------
3491/// @brief Posts a low memory notification to a running engine instance.
3492/// The engine will do its best to release non-critical resources in
3493/// response. It is not guaranteed that the resource would have been
3494/// collected by the time this call returns however. The
3495/// notification is posted to engine subsystems that may be
3496/// operating on other threads.
3497///
3498/// Flutter applications can respond to these notifications by
3499/// setting `WidgetsBindingObserver.didHaveMemoryPressure`
3500/// observers.
3501///
3502/// @param[in] engine A running engine instance.
3503///
3504/// @return If the low memory notification was sent to the running engine
3505/// instance.
3506///
3510
3511//------------------------------------------------------------------------------
3512/// @brief Schedule a callback to be run on all engine managed threads.
3513/// The engine will attempt to service this callback the next time
3514/// the message loop for each managed thread is idle. Since the
3515/// engine manages the entire lifecycle of multiple threads, there
3516/// is no opportunity for the embedders to finely tune the
3517/// priorities of threads directly, or, perform other thread
3518/// specific configuration (for example, setting thread names for
3519/// tracing). This callback gives embedders a chance to affect such
3520/// tuning.
3521///
3522/// @attention This call is expensive and must be made as few times as
3523/// possible. The callback must also return immediately as not doing
3524/// so may risk performance issues (especially for callbacks of type
3525/// kFlutterNativeThreadTypeUI and kFlutterNativeThreadTypeRender).
3526///
3527/// @attention Some callbacks (especially the ones of type
3528/// kFlutterNativeThreadTypeWorker) may be called after the
3529/// FlutterEngine instance has shut down. Embedders must be careful
3530/// in handling the lifecycle of objects associated with the user
3531/// data baton.
3532///
3533/// @attention In case there are multiple running Flutter engine instances,
3534/// their workers are shared.
3535///
3536/// @param[in] engine A running engine instance.
3537/// @param[in] callback The callback that will get called multiple times on
3538/// each engine managed thread.
3539/// @param[in] user_data A baton passed by the engine to the callback. This
3540/// baton is not interpreted by the engine in any way.
3541///
3542/// @return Returns if the callback was successfully posted to all threads.
3543///
3548 void* user_data);
3549
3550//------------------------------------------------------------------------------
3551/// @brief Posts updates corresponding to display changes to a running engine
3552/// instance.
3553///
3554/// @param[in] update_type The type of update pushed to the engine.
3555/// @param[in] displays The displays affected by this update.
3556/// @param[in] display_count Size of the displays array, must be at least 1.
3557///
3558/// @return the result of the call made to the engine.
3559///
3565 size_t display_count);
3566
3567//------------------------------------------------------------------------------
3568/// @brief Schedule a new frame to redraw the content.
3569///
3570/// @param[in] engine A running engine instance.
3571///
3572/// @return the result of the call made to the engine.
3573///
3576 engine);
3577
3578//------------------------------------------------------------------------------
3579/// @brief Schedule a callback to be called after the next frame is drawn.
3580/// This must be called from the platform thread. The callback is
3581/// executed only once from the raster thread; embedders must
3582/// re-thread if necessary. Performing blocking calls
3583/// in this callback may introduce application jank.
3584///
3585/// @param[in] engine A running engine instance.
3586/// @param[in] callback The callback to execute.
3587/// @param[in] user_data A baton passed by the engine to the callback. This
3588/// baton is not interpreted by the engine in any way.
3589///
3590/// @return The result of the call.
3591///
3596 void* user_data);
3597
3598#endif // !FLUTTER_ENGINE_NO_PROTOTYPES
3599
3600// Typedefs for the function pointers in FlutterEngineProcTable.
3602 const FlutterEngineAOTDataSource* source,
3603 FlutterEngineAOTData* data_out);
3607 size_t version,
3608 const FlutterRendererConfig* config,
3609 const FlutterProjectArgs* args,
3610 void* user_data,
3611 FLUTTER_API_SYMBOL(FlutterEngine) * engine_out);
3615 size_t version,
3616 const FlutterRendererConfig* config,
3617 const FlutterProjectArgs* args,
3618 void* user_data,
3619 FLUTTER_API_SYMBOL(FlutterEngine) * engine_out);
3626 const FlutterWindowMetricsEvent* event);
3629 const FlutterPointerEvent* events,
3630 size_t events_count);
3633 const FlutterKeyEvent* event,
3635 void* user_data);
3642 FlutterDataCallback data_callback,
3643 void* user_data,
3652 const uint8_t* data,
3653 size_t data_length);
3656 int64_t texture_identifier);
3659 int64_t texture_identifier);
3663 int64_t texture_identifier);
3666 bool enabled);
3672 uint64_t id,
3674 const uint8_t* data,
3675 size_t data_length);
3678 const FlutterSendSemanticsActionInfo* info);
3681 intptr_t baton,
3682 uint64_t frame_start_time_nanos,
3683 uint64_t frame_target_time_nanos);
3688typedef void (*FlutterEngineTraceEventInstantFnPtr)(const char* name);
3692 void* callback_data);
3696 const FlutterTask* task);
3699 const FlutterLocale** locales,
3700 size_t locales_count);
3705 const FlutterEngineDartObject* object);
3711 void* user_data);
3716 size_t display_count);
3722 void* user_data);
3725 const FlutterAddViewInfo* info);
3728 const FlutterRemoveViewInfo* info);
3731 const FlutterViewFocusEvent* event);
3732
3733/// Function-pointer-based versions of the APIs above.
3734typedef struct {
3735 /// The size of this struct. Must be sizeof(FlutterEngineProcs).
3737
3783
3784//------------------------------------------------------------------------------
3785/// @brief Gets the table of engine function pointers.
3786///
3787/// @param[out] table The table to fill with pointers. This should be
3788/// zero-initialized, except for struct_size.
3789///
3790/// @return Returns whether the table was successfully populated.
3791///
3794 FlutterEngineProcTable* table);
3795
3796// NOLINTEND(google-objc-function-naming)
3797
3798#if defined(__cplusplus)
3799} // extern "C"
3800#endif
3801
3802#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_H_
GLenum type
FlutterEngineResult(* FlutterEngineSendKeyEventFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterKeyEvent *event, FlutterKeyEventCallback callback, void *user_data)
Definition embedder.h:3631
FLUTTER_EXPORT FlutterEngineResult FlutterEngineUpdateAccessibilityFeatures(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterAccessibilityFeature features)
Sets additional accessibility features.
Definition embedder.cc:3202
struct _FlutterEngineAOTData * FlutterEngineAOTData
Definition embedder.h:2484
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:1702
FlutterEngineResult(* FlutterEngineCreateAOTDataFnPtr)(const FlutterEngineAOTDataSource *source, FlutterEngineAOTData *data_out)
Definition embedder.h:3601
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:2222
int64_t FlutterPlatformViewIdentifier
Definition embedder.h:1490
FlutterKeyEventDeviceType
Definition embedder.h:1382
@ kFlutterKeyEventDeviceTypeKeyboard
Definition embedder.h:1383
@ kFlutterKeyEventDeviceTypeDirectionalPad
Definition embedder.h:1384
@ kFlutterKeyEventDeviceTypeHdmi
Definition embedder.h:1387
@ kFlutterKeyEventDeviceTypeJoystick
Definition embedder.h:1386
@ kFlutterKeyEventDeviceTypeGamepad
Definition embedder.h:1385
void(* FlutterUpdateSemanticsCustomActionCallback)(const FlutterSemanticsCustomAction *, void *)
Definition embedder.h:1846
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendWindowMetricsEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterWindowMetricsEvent *event)
Definition embedder.cc:2680
void(* FlutterUpdateSemanticsCallback)(const FlutterSemanticsUpdate *, void *)
Definition embedder.h:1850
uint64_t FlutterEngineDisplayId
Definition embedder.h:1050
bool(* FlutterMetalPresentCallback)(void *, const FlutterMetalTexture *)
Definition embedder.h:890
FlutterLayerContentType
Definition embedder.h:2129
@ kFlutterLayerContentTypePlatformView
Indicates that the contents of this layer are determined by the embedder.
Definition embedder.h:2134
@ kFlutterLayerContentTypeBackingStore
Definition embedder.h:2132
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:2206
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:3130
FlutterEngineResult(* FlutterEngineDispatchSemanticsActionFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, uint64_t id, FlutterSemanticsAction action, const uint8_t *data, size_t data_length)
Definition embedder.h:3670
FlutterEngineAOTDataSourceType
AOT data source type.
Definition embedder.h:2457
@ kFlutterEngineAOTDataSourceTypeElfPath
Definition embedder.h:2458
void(* FlutterEngineTraceEventInstantFnPtr)(const char *name)
Definition embedder.h:3688
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:1479
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:3329
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:2941
FlutterPlatformViewMutationType
Definition embedder.h:2027
@ kFlutterPlatformViewMutationTypeClipRoundedRect
Definition embedder.h:2036
@ kFlutterPlatformViewMutationTypeClipRect
Definition embedder.h:2033
@ kFlutterPlatformViewMutationTypeTransformation
Definition embedder.h:2039
@ kFlutterPlatformViewMutationTypeOpacity
Definition embedder.h:2030
bool(* FlutterLayersPresentCallback)(const FlutterLayer **layers, size_t layers_count, void *user_data)
Definition embedder.h:2215
FLUTTER_EXPORT FlutterEngineResult FlutterEngineReloadSystemFonts(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Reloads the system fonts in engine.
Definition embedder.cc:3276
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:3188
FlutterEngineResult(* FlutterEngineInitializeFnPtr)(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Definition embedder.h:3614
FlutterEngineResult(* FlutterEngineSetNextFrameCallbackFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, VoidCallback callback, void *user_data)
Definition embedder.h:3719
void(* FlutterDataCallback)(const uint8_t *, size_t, void *)
Definition embedder.h:1483
FlutterEngineResult(* FlutterEngineUpdateAccessibilityFeaturesFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterAccessibilityFeature features)
Definition embedder.h:3667
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:3302
bool(* FlutterOpenGLSurfaceCallback)(void *, bool *)
Definition embedder.h:561
FlutterEngineResult(* FlutterEngineCollectAOTDataFnPtr)(FlutterEngineAOTData data)
Definition embedder.h:3604
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:3293
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:3606
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:2007
FlutterEngineResult(* FlutterEngineNotifyLowMemoryWarningFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3706
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:2623
FlutterEngineResult(* FlutterEngineSendWindowMetricsEventFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterWindowMetricsEvent *event)
Definition embedder.h:3624
FlutterEngineResult(* FlutterEngineSendPlatformMessageFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessage *message)
Definition embedder.h:3636
FLUTTER_EXPORT FlutterEngineResult FlutterEngineUnregisterExternalTexture(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Unregister a previous texture registration.
Definition embedder.cc:3149
FlutterEngineResult(* FlutterEngineReloadSystemFontsFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3684
bool(* FlutterEngineRunsAOTCompiledDartCodeFnPtr)(void)
Definition embedder.h:3701
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:3664
FlutterEngineResult(* FlutterEnginePostRenderThreadTaskFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, VoidCallback callback, void *callback_data)
Definition embedder.h:3689
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:3333
FlutterEngineResult(* FlutterEngineDeinitializeFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3620
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:3083
void(* FlutterNativeThreadCallback)(FlutterNativeThreadType type, void *user_data)
Definition embedder.h:2453
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:3385
FlutterEngineResult(* FlutterEnginePostCallbackOnAllNativeThreadsFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterNativeThreadCallback callback, void *user_data)
Definition embedder.h:3708
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:3693
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:3627
FlutterEngineDartObjectType
Definition embedder.h:2360
@ kFlutterEngineDartObjectTypeString
Definition embedder.h:2366
@ kFlutterEngineDartObjectTypeBool
Definition embedder.h:2362
@ kFlutterEngineDartObjectTypeDouble
Definition embedder.h:2365
@ kFlutterEngineDartObjectTypeInt32
Definition embedder.h:2363
@ kFlutterEngineDartObjectTypeBuffer
Definition embedder.h:2369
@ kFlutterEngineDartObjectTypeInt64
Definition embedder.h:2364
@ kFlutterEngineDartObjectTypeNull
Definition embedder.h:2361
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:2478
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:2669
void(* FlutterTaskRunnerPostTaskCallback)(FlutterTask, uint64_t, void *)
Definition embedder.h:1883
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:3640
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:2656
FlutterEngineResult(* FlutterEngineMarkExternalTextureFrameAvailableFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Definition embedder.h:3661
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:1991
FlutterNativeThreadType
Definition embedder.h:2434
@ kFlutterNativeThreadTypeWorker
Definition embedder.h:2448
@ kFlutterNativeThreadTypeUI
Definition embedder.h:2445
@ kFlutterNativeThreadTypePlatform
Definition embedder.h:2438
@ kFlutterNativeThreadTypeRender
Definition embedder.h:2442
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:1842
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:2315
FlutterEngineDisplaysUpdateType
Definition embedder.h:2348
@ kFlutterEngineDisplaysUpdateTypeStartup
Definition embedder.h:2354
@ kFlutterEngineDisplaysUpdateTypeCount
Definition embedder.h:2355
FLUTTER_EXPORT FlutterEngineResult FlutterEngineAddView(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterAddViewInfo *info)
Adds a view.
Definition embedder.cc:2520
FLUTTER_EXPORT const int32_t kFlutterSemanticsNodeIdBatchEnd
Definition embedder.cc:107
FlutterEngineResult(* FlutterEnginePlatformMessageReleaseResponseHandleFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterPlatformMessageResponseHandle *response)
Definition embedder.h:3646
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:3679
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:3448
void(* FlutterKeyEventCallback)(bool, void *)
Definition embedder.h:1457
void(* FlutterEngineTraceEventDurationBeginFnPtr)(const char *name)
Definition embedder.h:3686
FlutterEngineResult(* FlutterEngineRemoveViewFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterRemoveViewInfo *info)
Definition embedder.h:3726
FlutterEngineResult(* FlutterEngineRunInitializedFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3622
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:3098
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:2789
FLUTTER_EXPORT FlutterEngineResult FlutterEngineCollectAOTData(FlutterEngineAOTData data)
Collects the AOT data.
Definition embedder.cc:1756
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:3249
FlutterStringAttributeType
Definition embedder.h:1502
@ kSpellOut
Definition embedder.h:1504
@ kLocale
Definition embedder.h:1506
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:1376
@ kFlutterKeyEventTypeDown
Definition embedder.h:1378
@ kFlutterKeyEventTypeUp
Definition embedder.h:1377
@ kFlutterKeyEventTypeRepeat
Definition embedder.h:1379
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:3633
void(* FlutterUpdateSemanticsCallback2)(const FlutterSemanticsUpdate2 *, void *)
Definition embedder.h:1854
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:3654
int64_t FlutterEngineDartPort
Definition embedder.h:2358
FlutterEngineResult(* FlutterEngineSendPlatformMessageResponseFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
Definition embedder.h:3649
void(* FlutterAddViewCallback)(const FlutterAddViewResult *result)
Definition embedder.h:1119
bool(* FlutterBackingStoreCollectCallback)(const FlutterBackingStore *renderer, void *user_data)
Definition embedder.h:2211
FlutterEngineResult(* FlutterEngineRunTaskFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterTask *task)
Definition embedder.h:3694
#define FLUTTER_EXPORT
Definition embedder.h:57
FLUTTER_EXPORT FlutterEngineResult FlutterEngineSendPlatformMessage(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessage *message)
Definition embedder.cc:2997
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:3444
FlutterEngineResult(* FlutterEnginePostDartObjectFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterEngineDartPort port, const FlutterEngineDartObject *object)
Definition embedder.h:3702
FlutterEngineResult(* FlutterEngineSendSemanticsActionFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterSendSemanticsActionInfo *info)
Definition embedder.h:3676
FLUTTER_EXPORT FlutterEngineResult FlutterEngineRunInitialized(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Runs an initialized engine instance. An engine can be initialized via FlutterEngineInitialize....
Definition embedder.cc:2481
FlutterEngineResult(* FlutterEngineSendViewFocusEventFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterViewFocusEvent *event)
Definition embedder.h:3729
FlutterEngineResult(* FlutterEngineUpdateLocalesFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterLocale **locales, size_t locales_count)
Definition embedder.h:3697
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:3307
FlutterBackingStoreType
Definition embedder.h:2078
@ kFlutterBackingStoreTypeSoftware2
Definition embedder.h:2090
@ kFlutterBackingStoreTypeMetal
Specifies a Metal backing store. This is backed by a Metal texture.
Definition embedder.h:2085
@ kFlutterBackingStoreTypeVulkan
Specifies a Vulkan backing store. This is backed by a Vulkan VkImage.
Definition embedder.h:2087
@ kFlutterBackingStoreTypeSoftware
Specified an software allocation for Flutter to render into using the CPU.
Definition embedder.h:2083
@ kFlutterBackingStoreTypeOpenGL
Definition embedder.h:2081
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:3125
void(* FlutterChannelUpdateCallback)(const FlutterChannelUpdate *, void *)
Definition embedder.h:1868
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:3572
FlutterEngineResult(* FlutterEngineShutdownFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3612
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:1876
FlutterEngineResult(* FlutterEngineUnregisterExternalTextureFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, int64_t texture_identifier)
Definition embedder.h:3657
FlutterEngineResult(* FlutterEngineNotifyDisplayUpdateFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterEngineDisplaysUpdateType update_type, const FlutterEngineDisplay *displays, size_t display_count)
Definition embedder.h:3712
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:3594
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:2581
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:3232
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:3048
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:3170
void(* FlutterViewFocusChangeRequestCallback)(const FlutterViewFocusChangeRequest *, void *)
Definition embedder.h:1872
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:3716
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:3216
FLUTTER_EXPORT FlutterEngineResult FlutterEngineScheduleFrame(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Schedule a new frame to redraw the content.
Definition embedder.cc:3674
FLUTTER_EXPORT const int32_t kFlutterSemanticsCustomActionIdBatchEnd
Definition embedder.cc:108
void * FlutterVulkanQueueHandle
Alias for VkQueue.
Definition embedder.h:928
void(* FlutterEngineTraceEventDurationEndFnPtr)(const char *name)
Definition embedder.h:3687
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:3298
FlutterEngineResult(* FlutterEngineScheduleFrameFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Definition embedder.h:3717
FlutterEngineResult(* FlutterEngineAddViewFnPtr)(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterAddViewInfo *info)
Definition embedder.h:3723
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:3686
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:49
std::vector< FlutterEngineDisplay > * displays
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:2121
FlutterSize size
The size of the render target the engine expects to render into.
Definition embedder.h:2123
FlutterVulkanBackingStore vulkan
Definition embedder.h:2115
FlutterMetalBackingStore metal
Definition embedder.h:2113
FlutterBackingStoreType type
Specifies the type of backing store.
Definition embedder.h:2101
FlutterOpenGLBackingStore open_gl
The description of the OpenGL backing store.
Definition embedder.h:2107
FlutterSoftwareBackingStore software
The description of the software backing store.
Definition embedder.h:2109
FlutterSoftwareBackingStore2 software2
The description of the software backing store.
Definition embedder.h:2111
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStore).
Definition embedder.h:2095
size_t struct_size
The size of this struct. Must be sizeof(FlutterBackingStorePresentInfo).
Definition embedder.h:2151
An update to whether a message channel has a listener set or not.
Definition embedder.h:1859
size_t struct_size
The size of the struct. Must be sizeof(FlutterChannelUpdate).
Definition embedder.h:1861
bool listening
True if a listener has been set, false if one has been cleared.
Definition embedder.h:1865
const char * channel
The name of the channel.
Definition embedder.h:1863
FlutterBackingStoreCreateCallback create_backing_store_callback
Definition embedder.h:2243
bool avoid_backing_store_cache
Definition embedder.h:2271
FlutterLayersPresentCallback present_layers_callback
Definition embedder.h:2261
size_t struct_size
This size of this struct. Must be sizeof(FlutterCompositor).
Definition embedder.h:2227
FlutterPresentViewCallback present_view_callback
Definition embedder.h:2280
FlutterBackingStoreCollectCallback collect_backing_store_callback
Definition embedder.h:2248
const FlutterTaskRunnerDescription * ui_task_runner
Definition embedder.h:1938
const FlutterTaskRunnerDescription * render_task_runner
Definition embedder.h:1931
const FlutterTaskRunnerDescription * platform_task_runner
Definition embedder.h:1926
size_t struct_size
The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
Definition embedder.h:1921
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:2464
const char * elf_path
Absolute path to an ELF library file.
Definition embedder.h:2467
size_t buffer_size
The size of the buffer.
Definition embedder.h:2406
size_t struct_size
The size of this struct. Must be sizeof(FlutterEngineDartBuffer).
Definition embedder.h:2374
VoidCallback buffer_collect_callback
Definition embedder.h:2398
FlutterEngineDartObjectType type
Definition embedder.h:2417
const char * string_value
Definition embedder.h:2426
const FlutterEngineDartBuffer * buffer_value
Definition embedder.h:2427
size_t height
The height of the display, in physical pixels.
Definition embedder.h:2339
size_t struct_size
The size of this struct. Must be sizeof(FlutterEngineDisplay).
Definition embedder.h:2321
size_t width
The width of the display, in physical pixels.
Definition embedder.h:2336
FlutterEngineDisplayId display_id
Definition embedder.h:2323
Function-pointer-based versions of the APIs above.
Definition embedder.h:3734
FlutterEnginePostCallbackOnAllNativeThreadsFnPtr PostCallbackOnAllNativeThreads
Definition embedder.h:3774
FlutterEngineRegisterExternalTextureFnPtr RegisterExternalTexture
Definition embedder.h:3754
FlutterEngineReloadSystemFontsFnPtr ReloadSystemFonts
Definition embedder.h:3762
FlutterEnginePostDartObjectFnPtr PostDartObject
Definition embedder.h:3771
FlutterEngineScheduleFrameFnPtr ScheduleFrame
Definition embedder.h:3776
FlutterEngineTraceEventDurationEndFnPtr TraceEventDurationEnd
Definition embedder.h:3764
FlutterEnginePlatformMessageReleaseResponseHandleFnPtr PlatformMessageReleaseResponseHandle
Definition embedder.h:3752
FlutterEngineUpdateLocalesFnPtr UpdateLocales
Definition embedder.h:3769
FlutterEngineUnregisterExternalTextureFnPtr UnregisterExternalTexture
Definition embedder.h:3755
FlutterEngineTraceEventDurationBeginFnPtr TraceEventDurationBegin
Definition embedder.h:3763
FlutterEngineAddViewFnPtr AddView
Definition embedder.h:3778
FlutterEngineTraceEventInstantFnPtr TraceEventInstant
Definition embedder.h:3765
FlutterEngineRemoveViewFnPtr RemoveView
Definition embedder.h:3779
FlutterEngineSendKeyEventFnPtr SendKeyEvent
Definition embedder.h:3747
FlutterEngineMarkExternalTextureFrameAvailableFnPtr MarkExternalTextureFrameAvailable
Definition embedder.h:3757
FlutterEngineRunsAOTCompiledDartCodeFnPtr RunsAOTCompiledDartCode
Definition embedder.h:3770
FlutterEngineNotifyLowMemoryWarningFnPtr NotifyLowMemoryWarning
Definition embedder.h:3772
FlutterEngineSetNextFrameCallbackFnPtr SetNextFrameCallback
Definition embedder.h:3777
FlutterEngineSendWindowMetricsEventFnPtr SendWindowMetricsEvent
Definition embedder.h:3745
FlutterEngineShutdownFnPtr Shutdown
Definition embedder.h:3741
FlutterEngineCreateAOTDataFnPtr CreateAOTData
Definition embedder.h:3738
FlutterEngineOnVsyncFnPtr OnVsync
Definition embedder.h:3761
FlutterEngineSendPointerEventFnPtr SendPointerEvent
Definition embedder.h:3746
FlutterEngineCollectAOTDataFnPtr CollectAOTData
Definition embedder.h:3739
size_t struct_size
The size of this struct. Must be sizeof(FlutterEngineProcs).
Definition embedder.h:3736
FlutterEngineGetCurrentTimeFnPtr GetCurrentTime
Definition embedder.h:3767
FlutterEngineInitializeFnPtr Initialize
Definition embedder.h:3742
FlutterEngineSendViewFocusEventFnPtr SendViewFocusEvent
Definition embedder.h:3780
FlutterEngineDispatchSemanticsActionFnPtr DispatchSemanticsAction
Definition embedder.h:3760
FlutterEngineRunTaskFnPtr RunTask
Definition embedder.h:3768
FlutterEngineNotifyDisplayUpdateFnPtr NotifyDisplayUpdate
Definition embedder.h:3775
FlutterEngineDeinitializeFnPtr Deinitialize
Definition embedder.h:3743
FlutterEngineSendPlatformMessageFnPtr SendPlatformMessage
Definition embedder.h:3748
FlutterEngineRunInitializedFnPtr RunInitialized
Definition embedder.h:3744
FlutterEngineUpdateSemanticsEnabledFnPtr UpdateSemanticsEnabled
Definition embedder.h:3758
FlutterEnginePlatformMessageCreateResponseHandleFnPtr PlatformMessageCreateResponseHandle
Definition embedder.h:3750
FlutterEngineSendPlatformMessageResponseFnPtr SendPlatformMessageResponse
Definition embedder.h:3753
FlutterEngineRunFnPtr Run
Definition embedder.h:3740
FlutterEngineUpdateAccessibilityFeaturesFnPtr UpdateAccessibilityFeatures
Definition embedder.h:3759
FlutterEnginePostRenderThreadTaskFnPtr PostRenderThreadTask
Definition embedder.h:3766
FlutterEngineSendSemanticsActionFnPtr SendSemanticsAction
Definition embedder.h:3781
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:1436
size_t struct_size
The size of this struct. Must be sizeof(FlutterKeyEvent).
Definition embedder.h:1414
uint64_t physical
Definition embedder.h:1428
FlutterKeyEventDeviceType device_type
The source device for the key event.
Definition embedder.h:1454
FlutterKeyEventType type
The event kind.
Definition embedder.h:1420
const char * character
Definition embedder.h:1439
FlutterPoint offset
Definition embedder.h:2175
FlutterLayerContentType type
Definition embedder.h:2164
const FlutterBackingStore * backing_store
Definition embedder.h:2168
FlutterBackingStorePresentInfo * backing_store_present_info
Definition embedder.h:2181
uint64_t presentation_time
Definition embedder.h:2185
const FlutterPlatformView * platform_view
Definition embedder.h:2171
size_t struct_size
This size of this struct. Must be sizeof(FlutterLayer).
Definition embedder.h:2161
FlutterSize size
The size of the layer (in physical pixels).
Definition embedder.h:2177
const char * language_code
Definition embedder.h:2289
size_t struct_size
This size of this struct. Must be sizeof(FlutterLocale).
Definition embedder.h:2285
const char * script_code
Definition embedder.h:2299
const char * country_code
Definition embedder.h:2294
const char * variant_code
Definition embedder.h:2304
size_t struct_size
The size of this struct. Must be sizeof(FlutterLocaleStringAttribute).
Definition embedder.h:1524
size_t struct_size
The size of this struct. Must be sizeof(FlutterMetalBackingStore).
Definition embedder.h:1999
FlutterMetalTexture texture
Definition embedder.h:2004
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:1953
FlutterOpenGLTexture texture
A texture for Flutter to render into.
Definition embedder.h:1947
FlutterOpenGLTargetType type
Definition embedder.h:1944
FlutterOpenGLFramebuffer framebuffer
Definition embedder.h:1950
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:1466
const FlutterPlatformMessageResponseHandle * response_handle
Definition embedder.h:1476
const char * channel
Definition embedder.h:1467
const uint8_t * message
Definition embedder.h:1468
size_t struct_size
The size of this struct. Must be sizeof(FlutterPlatformView).
Definition embedder.h:2055
const FlutterPlatformViewMutation ** mutations
Definition embedder.h:2075
FlutterPlatformViewIdentifier identifier
Definition embedder.h:2059
FlutterTransformation transformation
Definition embedder.h:2049
FlutterPlatformViewMutationType type
The type of the mutation described by the subsequent union.
Definition embedder.h:2044
FlutterRoundedRect clip_rounded_rect
Definition embedder.h:2048
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
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:2200
void * user_data
The |FlutterCompositor.user_data|.
Definition embedder.h:2203
FlutterViewId view_id
The identifier of the target view.
Definition embedder.h:2194
const FlutterLayer ** layers
The layers that should be composited onto the view.
Definition embedder.h:2197
FlutterPlatformMessageCallback platform_message_callback
Definition embedder.h:2540
FlutterComputePlatformResolvedLocaleCallback compute_platform_resolved_locale_callback
Definition embedder.h:2712
FlutterLogMessageCallback log_message_callback
Definition embedder.h:2732
FlutterViewFocusChangeRequestCallback view_focus_change_request_callback
Definition embedder.h:2790
VsyncCallback vsync_callback
Definition embedder.h:2637
const char * assets_path
Definition embedder.h:2492
OnPreEngineRestartCallback on_pre_engine_restart_callback
Definition embedder.h:2749
const uint8_t * isolate_snapshot_data
Definition embedder.h:2561
FlutterEngineAOTData aot_data
Definition embedder.h:2701
const char * main_path__unused__
Definition embedder.h:2502
FlutterUpdateSemanticsCallback update_semantics_callback
Definition embedder.h:2767
const char * persistent_cache_path
Definition embedder.h:2622
const uint8_t * vm_snapshot_data
Definition embedder.h:2545
const char * packages_path__unused__
Definition embedder.h:2512
size_t isolate_snapshot_instructions_size
Definition embedder.h:2572
const char *const * dart_entrypoint_argv
Definition embedder.h:2724
size_t struct_size
The size of this struct. Must be sizeof(FlutterProjectArgs).
Definition embedder.h:2488
FlutterUpdateSemanticsCallback2 update_semantics_callback2
Definition embedder.h:2779
const uint8_t * vm_snapshot_instructions
Definition embedder.h:2553
size_t isolate_snapshot_data_size
Definition embedder.h:2564
const char *const * command_line_argv
Definition embedder.h:2534
int64_t dart_old_gen_heap_size
Definition embedder.h:2693
FlutterChannelUpdateCallback channel_update_callback
Definition embedder.h:2784
size_t vm_snapshot_instructions_size
Definition embedder.h:2556
const char * icu_data_path
Definition embedder.h:2516
bool shutdown_dart_vm_when_done
Definition embedder.h:2670
const char * custom_dart_entrypoint
Definition embedder.h:2646
FlutterUpdateSemanticsCustomActionCallback update_semantics_custom_action_callback
Definition embedder.h:2615
FlutterUpdateSemanticsNodeCallback update_semantics_node_callback
Definition embedder.h:2594
const FlutterCustomTaskRunners * custom_task_runners
Definition embedder.h:2651
bool is_persistent_cache_read_only
Definition embedder.h:2626
size_t vm_snapshot_data_size
Definition embedder.h:2548
const char * log_tag
Definition embedder.h:2739
int command_line_argc
The command line argument count used to initialize the project.
Definition embedder.h:2518
VoidCallback root_isolate_create_callback
Definition embedder.h:2575
const uint8_t * isolate_snapshot_instructions
Definition embedder.h:2569
const FlutterCompositor * compositor
Definition embedder.h:2686
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:2138
size_t rects_count
Number of rectangles in the region.
Definition embedder.h:2142
FlutterRect * rects
The rectangles that make up the region.
Definition embedder.h:2144
size_t struct_size
The size of this struct. Must be sizeof(FlutterRegion).
Definition embedder.h:2140
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:1804
const char * label
The user-readable name of this custom semantics action.
Definition embedder.h:1802
FlutterSemanticsAction override_action
Definition embedder.h:1800
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
Definition embedder.h:1795
int32_t id
The unique custom action or action override ID.
Definition embedder.h:1797
int32_t id
The unique custom action or action override ID.
Definition embedder.h:1771
FlutterSemanticsAction override_action
Definition embedder.h:1774
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsCustomAction).
Definition embedder.h:1769
const char * label
The user-readable name of this custom semantics action.
Definition embedder.h:1776
const char * hint
The hint description of this custom semantics action.
Definition embedder.h:1778
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:1744
const char * increased_value
Definition embedder.h:1680
const char * tooltip
A textual tooltip attached to the node.
Definition embedder.h:1707
int32_t scroll_index
The index of the first visible semantic child of a scroll node.
Definition embedder.h:1659
size_t custom_accessibility_actions_count
The number of custom accessibility action associated with this node.
Definition embedder.h:1699
const int32_t * children_in_traversal_order
Array of child node IDs in traversal order. Has length child_count.
Definition embedder.h:1695
double scroll_extent_min
The minimum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1666
FlutterSemanticsFlag flags__deprecated__
Definition embedder.h:1649
double thickness
Describes how much space the semantics node takes up along the z-axis.
Definition embedder.h:1671
size_t struct_size
The size of this struct. Must be sizeof(FlutterSemanticsNode).
Definition embedder.h:1641
size_t decreased_value_attribute_count
Definition embedder.h:1729
size_t increased_value_attribute_count
Definition embedder.h:1724
const int32_t * children_in_hit_test_order
Array of child node IDs in hit test order. Has length child_count.
Definition embedder.h:1697
FlutterPlatformViewIdentifier platform_view_id
Definition embedder.h:1705
const FlutterStringAttribute ** hint_attributes
Definition embedder.h:1717
const FlutterStringAttribute ** decreased_value_attributes
Definition embedder.h:1732
int32_t text_selection_extent
The position at which the text selection terminates.
Definition embedder.h:1655
FlutterTextDirection text_direction
Definition embedder.h:1686
const FlutterStringAttribute ** increased_value_attributes
Definition embedder.h:1727
FlutterSemanticsAction actions
The set of semantics actions applicable to this node.
Definition embedder.h:1651
const int32_t * custom_accessibility_actions
Definition embedder.h:1702
int32_t id
The unique identifier for this node.
Definition embedder.h:1643
FlutterRect rect
The bounding box for this node in its coordinate system.
Definition embedder.h:1688
FlutterTransformation transform
Definition embedder.h:1691
size_t child_count
The number of children this node has.
Definition embedder.h:1693
double scroll_extent_max
The maximum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1664
const char * decreased_value
Definition embedder.h:1683
const char * label
A textual description of the node.
Definition embedder.h:1673
int32_t text_selection_base
The position at which the text selection originates.
Definition embedder.h:1653
const char * hint
A brief description of the result of performing an action on the node.
Definition embedder.h:1675
const FlutterStringAttribute ** value_attributes
Definition embedder.h:1722
FlutterSemanticsFlags * flags2
Definition embedder.h:1735
const char * value
A textual description of the current value of the node.
Definition embedder.h:1677
int32_t scroll_child_count
The total number of scrollable children that contribute to semantics.
Definition embedder.h:1657
const FlutterStringAttribute ** label_attributes
Definition embedder.h:1712
size_t custom_accessibility_actions_count
The number of custom accessibility action associated with this node.
Definition embedder.h:1616
const char * label
A textual description of the node.
Definition embedder.h:1590
size_t child_count
The number of children this node has.
Definition embedder.h:1610
FlutterTransformation transform
Definition embedder.h:1608
const char * value
A textual description of the current value of the node.
Definition embedder.h:1594
const char * decreased_value
Definition embedder.h:1600
const int32_t * custom_accessibility_actions
Definition embedder.h:1619
FlutterSemanticsAction actions
The set of semantics actions applicable to this node.
Definition embedder.h:1568
size_t struct_size
The size of this struct. Must be sizeof(FlutterSemanticsNode).
Definition embedder.h:1562
const char * tooltip
A textual tooltip attached to the node.
Definition embedder.h:1624
const char * hint
A brief description of the result of performing an action on the node.
Definition embedder.h:1592
FlutterTextDirection text_direction
Definition embedder.h:1603
FlutterPlatformViewIdentifier platform_view_id
Definition embedder.h:1622
const int32_t * children_in_traversal_order
Array of child node IDs in traversal order. Has length child_count.
Definition embedder.h:1612
double scroll_extent_max
The maximum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1581
int32_t id
The unique identifier for this node.
Definition embedder.h:1564
int32_t scroll_child_count
The total number of scrollable children that contribute to semantics.
Definition embedder.h:1574
FlutterSemanticsFlag flags
The set of semantics flags associated with this node.
Definition embedder.h:1566
int32_t text_selection_extent
The position at which the text selection terminates.
Definition embedder.h:1572
const int32_t * children_in_hit_test_order
Array of child node IDs in hit test order. Has length child_count.
Definition embedder.h:1614
int32_t text_selection_base
The position at which the text selection originates.
Definition embedder.h:1570
double scroll_extent_min
The minimum in-range value for scrollPosition if the node is scrollable.
Definition embedder.h:1583
double thickness
Describes how much space the semantics node takes up along the z-axis.
Definition embedder.h:1588
int32_t scroll_index
The index of the first visible semantic child of a scroll node.
Definition embedder.h:1576
FlutterRect rect
The bounding box for this node in its coordinate system.
Definition embedder.h:1605
const char * increased_value
Definition embedder.h:1597
A batch of updates to semantics nodes and custom actions.
Definition embedder.h:1826
size_t node_count
The number of semantics node updates.
Definition embedder.h:1830
size_t custom_action_count
The number of semantics custom action updates.
Definition embedder.h:1834
FlutterSemanticsNode2 ** nodes
Definition embedder.h:1832
FlutterSemanticsCustomAction2 ** custom_actions
Definition embedder.h:1837
FlutterViewId view_id
Definition embedder.h:1839
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsUpdate2).
Definition embedder.h:1828
FlutterSemanticsNode * nodes
Definition embedder.h:1818
size_t nodes_count
The number of semantics node updates.
Definition embedder.h:1816
size_t struct_size
The size of the struct. Must be sizeof(FlutterSemanticsUpdate).
Definition embedder.h:1814
size_t custom_actions_count
The number of semantics custom action updates.
Definition embedder.h:1820
FlutterSemanticsCustomAction * custom_actions
Array of semantics custom actions. Has length custom_actions_count.
Definition embedder.h:1822
FlutterViewId view_id
The ID of the view that includes the node.
Definition embedder.h:2804
FlutterSemanticsAction action
The semantics action.
Definition embedder.h:2810
size_t data_length
The data length.
Definition embedder.h:2816
uint64_t node_id
The semantics node identifier.
Definition embedder.h:2807
const uint8_t * data
Data associated with the action.
Definition embedder.h:2813
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:1976
VoidCallback destruction_callback
Definition embedder.h:1990
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition embedder.h:1981
size_t height
The number of rows in the allocation.
Definition embedder.h:1983
FlutterSoftwarePixelFormat pixel_format
Definition embedder.h:1994
VoidCallback destruction_callback
Definition embedder.h:1971
size_t row_bytes
The number of bytes in a single row of the allocation.
Definition embedder.h:1962
size_t height
The number of rows in the allocation.
Definition embedder.h:1964
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:1515
FlutterStringAttributeType type
The type of the attribute described by the subsequent union.
Definition embedder.h:1540
const FlutterSpellOutStringAttribute * spell_out
Definition embedder.h:1543
size_t struct_size
The size of this struct. Must be sizeof(FlutterStringAttribute).
Definition embedder.h:1534
const FlutterLocaleStringAttribute * locale
Definition embedder.h:1545
FlutterTaskRunner runner
Definition embedder.h:1879
uint64_t task
Definition embedder.h:1880
size_t struct_size
The size of this struct. Must be sizeof(FlutterTaskRunnerDescription).
Definition embedder.h:1894
BoolCallback runs_task_on_current_thread_callback
Definition embedder.h:1900
FlutterTaskRunnerPostTaskCallback post_task_callback
Definition embedder.h:1911
VoidCallback destruction_callback
The callback invoked when the task runner is destroyed.
Definition embedder.h:1916
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:2010
VoidCallback destruction_callback
Definition embedder.h:2024
const FlutterVulkanImage * image
Definition embedder.h:2017
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
std::shared_ptr< const fml::Mapping > data
const uintptr_t id