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