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