Modules

platform_handler.h

class PlatformHandler

Public Functions

explicit PlatformHandler(flutter::BinaryMessenger *messenger, FlutterView *view)

Private Functions

void HandleMethodCall(const flutter::MethodCall<rapidjson::Document> &method_call, std::unique_ptr<flutter::MethodResult<rapidjson::Document>> result) const

Private Members

std::unique_ptr<flutter::MethodChannel<rapidjson::Document>> channel_
FlutterView *view_
struct MethodSetApplicationSwitcherDescription

Public Members

std::string label
uint32_t primaryColor
struct SystemUiOverlayStyle

Public Members

uint32_t systemNavigationBarColor

The color of the system bottom navigation bar.

Only honored in Android versions O and greater.

uint32_t systemNavigationBarDividerColor

The color of the divider between the system’s bottom navigation bar and the app’s content.

Only honored in Android versions P and greater.

bool systemStatusBarContrastEnforced

Overrides the contrast enforcement when setting a transparent navigation bar.

When setting a transparent navigation bar in SDK 29+, or Android 10 and up, a translucent body scrim may be applied behind the button navigation bar to ensure contrast with buttons and the background of the application.

SDK 28-, or Android P and lower, will not apply this body scrim.

Setting this to false overrides the default body scrim.

See also:

  • [SystemUiOverlayStyle.systemNavigationBarColor], which is overridden when transparent to enforce this contrast policy.

uint32_t statusBarColor

The color of top status bar.

Only honored in Android version M and greater.

std::string statusBarBrightness

The brightness of top status bar.

Only honored in iOS.

std::string statusBarIconBrightness

The brightness of the top status bar icons.

Only honored in Android version M and greater.

std::string systemNavigationBarIconBrightness

The brightness of the system navigation bar icons.

Only honored in Android versions O and greater. When set to [Brightness.light], the system navigation bar icons are light. When set to [Brightness.dark], the system navigation bar icons are dark.

bool systemNavigationBarContrastEnforced

Overrides the contrast enforcement when setting a transparent navigation bar.

When setting a transparent navigation bar in SDK 29+, or Android 10 and up, a translucent body scrim may be applied behind the button navigation bar to ensure contrast with buttons and the background of the application.

SDK 28-, or Android P and lower, will not apply this body scrim.

Setting this to false overrides the default body scrim.

See also:

  • [SystemUiOverlayStyle.systemNavigationBarColor], which is overridden when transparent to enforce this contrast policy.

struct SystemUiOverlayStyle

Public Members

uint32_t systemNavigationBarColor

The color of the system bottom navigation bar.

Only honored in Android versions O and greater.

uint32_t systemNavigationBarDividerColor

The color of the divider between the system’s bottom navigation bar and the app’s content.

Only honored in Android versions P and greater.

bool systemStatusBarContrastEnforced

Overrides the contrast enforcement when setting a transparent navigation bar.

When setting a transparent navigation bar in SDK 29+, or Android 10 and up, a translucent body scrim may be applied behind the button navigation bar to ensure contrast with buttons and the background of the application.

SDK 28-, or Android P and lower, will not apply this body scrim.

Setting this to false overrides the default body scrim.

See also:

  • [SystemUiOverlayStyle.systemNavigationBarColor], which is overridden when transparent to enforce this contrast policy.

uint32_t statusBarColor

The color of top status bar.

Only honored in Android version M and greater.

std::string statusBarBrightness

The brightness of top status bar.

Only honored in iOS.

std::string statusBarIconBrightness

The brightness of the top status bar icons.

Only honored in Android version M and greater.

std::string systemNavigationBarIconBrightness

The brightness of the system navigation bar icons.

Only honored in Android versions O and greater. When set to [Brightness.light], the system navigation bar icons are light. When set to [Brightness.dark], the system navigation bar icons are dark.

bool systemNavigationBarContrastEnforced

Overrides the contrast enforcement when setting a transparent navigation bar.

When setting a transparent navigation bar in SDK 29+, or Android 10 and up, a translucent body scrim may be applied behind the button navigation bar to ensure contrast with buttons and the background of the application.

SDK 28-, or Android P and lower, will not apply this body scrim.

Setting this to false overrides the default body scrim.

See also:

  • [SystemUiOverlayStyle.systemNavigationBarColor], which is overridden when transparent to enforce this contrast policy.

struct MethodSetApplicationSwitcherDescription

Public Members

std::string label
uint32_t primaryColor

hexdump.h

class IosFlagSaver

Public Functions

inline explicit IosFlagSaver(std::ostream &_ios)
inline ~IosFlagSaver()
IosFlagSaver(const IosFlagSaver &rhs) = delete
IosFlagSaver &operator=(const IosFlagSaver &rhs) = delete

Private Members

std::ostream &ios
std::ios::fmtflags f
template<unsigned RowSize, bool ShowAscii>
struct CustomHexdump

Public Functions

inline CustomHexdump(const uint8_t *data, size_t length)

Public Members

const uint8_t *mData
const size_t mLength

platform_views_handler.h

class PlatformViewsHandler

Public Functions

explicit PlatformViewsHandler(flutter::BinaryMessenger *messenger, FlutterDesktopEngineRef engine)

Private Functions

void HandleMethodCall(const flutter::MethodCall<flutter::EncodableValue> &method_call, std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result)

Private Members

std::unique_ptr<flutter::MethodChannel<flutter::EncodableValue>> channel_
FlutterDesktopEngineRef engine_
std::map<int32_t, std::pair<const struct platform_view_listener*, void*>> listeners_

Private Static Functions

static void PlatformViewAddListener(void *context, int32_t id, const struct platform_view_listener *listener, void *listener_context)
static void PlatformViewRemoveListener(void *context, int32_t id)

flutter_desktop_texture_registrar.h

struct GL_TEXTURE_2D_DESC

Public Members

uint32_t target

Target texture of the active texture unit (example GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE).

uint32_t name

The name of the texture.

uint32_t format

The texture format (example GL_RGBA8).

uint32_t width
uint32_t height
size_t visible_width
size_t visible_height
void (*release_callback)(void *release_context)
void *release_context
struct FlutterDesktopTextureRegistrar

Public Members

FlutterDesktopEngineState *engine
std::mutex texture_mutex
std::unordered_map<int64_t, std::unique_ptr<GL_TEXTURE_2D_DESC>> texture_registry

libdlt.h

struct LibDltExports

Public Functions

LibDltExports() = default
explicit LibDltExports(void *lib)

Public Members

DltReturnValue (*CheckLibraryVersion)(const char*, const char*) = nullptr
DltReturnValue (*RegisterApp)(const char*, const char*) = nullptr
DltReturnValue (*UnregisterApp)() = nullptr
DltReturnValue (*RegisterContext)(DltContext*, const char*, const char*) = nullptr
DltReturnValue (*UnregisterContext)(DltContext*) = nullptr
DltReturnValue (*UserLogWriteStart)(DltContext*, DltContextData*, DltLogLevelType) = nullptr
DltReturnValue (*UserLogWriteFinish)(DltContextData*) = nullptr
DltReturnValue (*UserLogWriteString)(DltContextData*, const char*) = nullptr
DltReturnValue (*UserLogWriteConstantUtf8String)(DltContextData*, const char*) = nullptr
DltReturnValue (*UserLogWriteSizedUtf8String)(DltContextData*, const char*, uint16_t) = nullptr
DltReturnValue (*UserLogWriteInt)(DltContextData*, int) = nullptr
DltReturnValue (*UserLogWriteInt8)(DltContextData*, int8_t) = nullptr
DltReturnValue (*UserLogWriteInt16)(DltContextData*, int16_t) = nullptr
DltReturnValue (*UserLogWriteInt32)(DltContextData*, int32_t) = nullptr
DltReturnValue (*UserLogWriteInt64)(DltContextData*, int64_t) = nullptr
struct DltContextData

Public Members

DltContext *handle
unsigned char *buffer
int32_t size
int32_t log_level
int32_t trace_status
int32_t args_num
char *context_description
DltTimestampType use_timestamp
uint32_t user_timestamp
int8_t verbose_mode
class LibDlt

Public Functions

LibDltExports *operator->()

Public Static Functions

static inline bool IsPresent()

Private Static Functions

static LibDltExports *loadExports()
struct DltContext

Public Members

char id[kDltIdSize]
int32_t pos
int8_t *p1
int8_t *p2
uint8_t count

flutter_desktop_view.h

struct FlutterDesktopView

Public Members

FlutterView *view = {}

window.cc

class WaylandWindow : public m_base_surface_listener, public m_base_surface_frame_listener

Public Types

enum window_type

Values:

enumerator WINDOW_NORMAL
enumerator WINDOW_BG
enumerator WINDOW_PANEL_TOP
enumerator WINDOW_PANEL_BOTTOM
enumerator WINDOW_PANEL_LEFT
enumerator WINDOW_PANEL_RIGHT

Public Functions

WaylandWindow(size_t index, std::shared_ptr<Display> display, const std::string &type, wl_output *output, uint32_t output_index, std::string app_id, bool fullscreen, int32_t width, int32_t height, double pixel_ratio, uint32_t activation_area_x, uint32_t activation_area_y, uint32_t activation_area_width, uint32_t activation_area_height, Backend *backend, uint32_t ivi_surface_id)
~WaylandWindow()
WaylandWindow(const WaylandWindow&) = delete
const WaylandWindow &operator=(const WaylandWindow&) = delete
void SetEngine(const std::shared_ptr<Engine> &engine)

Set Engine.

Relations

wayland

Parameters:

engine[in] Engine

Returns:

void

uint32_t GetFpsCounter()

Get Fps Counter.

Relations

wayland

Return values:

Frames – Per Second counter.

Returns:

uint32_t

bool ActivateSystemCursor(int32_t device, const std::string &kind) const

activate a system cursor

Relations

platform

Parameters:
  • device[in] Device

  • kind[in] Kind of a cursor

Return values:
  • true – Success

  • false – Failure

Returns:

bool

inline wl_surface *GetBaseSurface()

Get Base Surface.

Relations

wayland

Return values:

Base – surface

Returns:

wl_surface*

inline std::pair<int32_t, int32_t> GetSize()

GetSize.

Relations

wayland

Return values:

std::pair<int32_t, int32_t> – width, height

Public Members

enter   = handle_base_surface_enter
leave   = handle_base_surface_leave
uint32_t m_fps_counter = {}
int32_t width
int32_t height
uint32_t x
uint32_t y
uint32_t width
uint32_t height

Public Static Functions

static window_type get_window_type(const std::string &type)

Get window_type.

Relations

wayland, agl-shell

Parameters:

type[in] Window type

Return values:
  • WINDOW_NORMAL

  • WINDOW_BG

  • WINDOW_PANEL_TOP

  • WINDOW_PANEL_BOTTOM

  • WINDOW_PANEL_LEFT

  • WINDOW_PANEL_RIGHT

Returns:

window_type

Private Members

size_t m_index
std::shared_ptr<Display> m_display
wl_output *m_wl_output
uint32_t m_output_index
std::shared_ptr<Engine> m_flutter_engine
double m_pixel_ratio
struct wl_surface *m_base_surface = {}
std::shared_ptr<Backend> m_backend
bool m_wait_for_configure = {}
uint32_t m_ivi_surface_id
bool m_fullscreen = {}
bool m_maximized = {}
bool m_resize = {}
bool m_activated = {}
bool m_running = {}
struct WaylandWindow::[anonymous] m_geometry
struct WaylandWindow::[anonymous] m_activation_area
struct WaylandWindow::[anonymous] m_window_size
enum window_type m_type
std::string m_app_id
struct xdg_surface *m_xdg_surface = {}
struct xdg_toplevel *m_xdg_toplevel = {}
struct ivi_surface *m_ivi_surface = {}
struct wl_callback *m_base_frame_callback = {}

Private Static Functions

static void handle_base_surface_enter(void *data, struct wl_surface *surface, struct wl_output *output)

Handle enter base surface event.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • surface[in] No use

  • output[in] Output

Returns:

void

static void handle_base_surface_leave(void *data, struct wl_surface *surface, struct wl_output *output)

Handle leave base surface event.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • surface[in] No use

  • output[in] Output

Returns:

void

static void handle_xdg_surface_configure(void *data, struct xdg_surface *xdg_surface, uint32_t serial)

Response to configure event.

Relations

wayland

Parameters:
  • data[in] Pointer to WaylandWindow type

  • xdg_surface[in] Surfaces in the domain of xdg-shell

  • serial[in] Serial of the configure event

Returns:

void

static void handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface, int32_t width, int32_t height)

Response to configure event.

Relations

wayland

Parameters:
  • data[in] Pointer to WaylandWindow type

  • ivi_surface[in] Surfaces in the domain of ivi-shell

  • width[in] width of the surface

  • height[in] height of the surface

Returns:

void

static void handle_toplevel_configure(void *data, struct xdg_toplevel *toplevel, int32_t width, int32_t height, struct wl_array *states)

Response to configure event.

Relations

wayland

Parameters:
  • data[in] Pointer to WaylandWindow type

  • toplevel[in] No use

  • width[in] Width

  • height[in] Height

  • states[in] Dynamic array for checking xdg_toplevel_state

Returns:

void

static void handle_toplevel_close(void *data, struct xdg_toplevel *xdg_toplevel)

Close event.

Relations

wayland

Parameters:
  • data[in] Pointer to WaylandWindow type

  • xdg_toplevel[in] No use

Returns:

void

static void on_frame_base_surface(void *data, struct wl_callback *callback, uint32_t time)

handler for frame event of a base surface

Relations

wayland

Parameters:
  • data[in] Pointer to WaylandWindow type

  • callback[in] a callback for frame event

  • time[in] No use

Returns:

void

Private Static Attributes

static const struct xdg_surface_listener xdg_surface_listener
static const struct ivi_surface_listener ivi_surface_listener
static const struct wl_surface_listener m_base_surface_listener
static const struct xdg_toplevel_listener xdg_toplevel_listener
static const struct wl_callback_listener m_base_surface_frame_listener

flutter_desktop_engine_state.h

struct FlutterDesktopEngineState

Maintains one ref on the FlutterDesktopMessenger’s internal reference count.

Public Functions

inline  FLUTTER_API_SYMBOL (FlutterEngine) flutter_engine

Public Members

TaskRunner *platform_task_runner = {}
FlutterDesktopMessengerReferenceOwner messenger  = {nullptr, [](FlutterDesktopMessengerRef ) {}}
std::unique_ptr<flutter::IncomingMessageDispatcher> message_dispatcher
std::unique_ptr<FlutterDesktopPluginRegistrar> plugin_registrar
std::unique_ptr<FlutterDesktopTextureRegistrar> texture_registrar
std::unique_ptr<flutter::PluginRegistrar> internal_plugin_registrar
std::unique_ptr<PlatformHandler> platform_handler = {}
std::unique_ptr<PlatformViewsHandler> platform_views_handler = {}
std::unique_ptr<MouseCursorHandler> mouse_cursor_handler = {}
std::unique_ptr<LoggingHandler> logging_handler = {}
FlutterDesktopViewControllerState *view_controller = nullptr
UniqueAotDataPtr aot_data = nullptr
std::string flutter_asset_directory
struct AOTDataDeleter

Public Functions

inline void operator()(const FlutterEngineAOTData aot_data) const

timer.h

struct m_task
struct m_timerspec
struct timer_task

Public Members

void (*run)(timer_task const *task, uint32_t events)
void *data
class EventTimer

Public Functions

explicit EventTimer(int clock, evtimer_cb callback, void *callback_data)

Constructor of EventTimer.

Relations

internal

Parameters:
  • clock[in] The type of clock for a timer

  • callback[in] a callback to run when a timer alarmes

  • callback_data[in] an arument for a callback

Return values:

an – instance of EventTimer

Returns:

EventTimer

~EventTimer()
EventTimer(const EventTimer&) = delete
const EventTimer &operator=(const EventTimer&) = delete
void set_timerspec(int32_t rate, int32_t delay)

specify timer spec

Relations

internal

Parameters:
  • rate[in] repeat rate

  • delay[in] repeat delay

Returns:

void

void arm() const

run when a timer alarmes

Relations

internal

Returns:

void

void disarm() const

run when a timer is stopped

Relations

internal

Returns:

void

void watch_timerfd()

register timerfd

Relations

internal

Returns:

void

void unwatch_timerfd() const

unregister timerfd

Relations

internal

Returns:

void

Public Members

int m_timerfd
evtimer_cb m_callback
void *m_callback_data

Public Static Functions

static void close_evfd()

clock epoll fd

Relations

internal

Returns:

void

static void run(timer_task const *task, uint32_t events)

run callback

Relations

internal

Parameters:
  • task[in] the set of data for callback

  • events[in] triggered events on epoll()

Returns:

void

static void wait_event()

check epoll events

Relations

internal

Returns:

void

Public Static Attributes

static uint32_t watched_fd = 0
static int evfd = -1

Private Static Functions

static void _arm(int fd, itimerspec const *timerspec)

an internal func for arm/disarm

Relations

internal

Parameters:
  • fd[in] timer fd

  • timerspec[in] timerspec

Returns:

void

static void _watch_fd(int fd, uint32_t events, struct timer_task *task)

an internal func for watch_timerfd

Relations

internal

Parameters:
  • fd[in] timer fd

  • events[in] observed events

  • task[in] the set of data for callback

Returns:

void

static void _unwatch_fd(int fd)

an internal func for unwatch_timerfd

Relations

internal

Parameters:

fd[in] timer fd

Returns:

void

struct m_task
struct m_timerspec

flutter_view.h

class FlutterView

Public Functions

FlutterView(Configuration::Config config, size_t index, const std::shared_ptr<Display> &display)
~FlutterView()
void RunTasks()

Run Tasks.

Relations

wayland, flutter

Returns:

void

void Initialize()

Initialize.

Relations

wayland, flutter

Returns:

void

inline std::shared_ptr<WaylandWindow> GetWindow()

Get Egl Window.

Relations

wayland, flutter

Return values:

Egl – Window

Returns:

shared_ptr<WaylandWindow>

inline Backend *GetBackend() const

Get Backend.

Relations

wayland, flutter

Return values:

Backend – pointer

Returns:

Backend*

inline uint64_t GetIndex() const

Get an index of flutter views.

Relations

internal

Return values:

index

Returns:

uint64_t

inline Display *GetDisplay() const

Get pointer to Display object.

Relations

internal

Returns:

Display*

void DrawFps(long long end_time)

Draw FPS to calc and output.

Relations

wayland, flutter

Parameters:

end_time[in] End time

Returns:

void

FML_DISALLOW_COPY_AND_ASSIGN(FlutterView)

Public Members

uint8_t output
uint32_t period
uint32_t counter
long long pre_time

Private Members

std::shared_ptr<Display> m_wayland_display
std::shared_ptr<WaylandWindow> m_wayland_window
std::shared_ptr<Engine> m_flutter_engine
const Configuration::Config m_config
std::shared_ptr<PlatformChannel> m_platform_channel
size_t m_index
std::unique_ptr<FlutterDesktopViewControllerState> m_state
struct FlutterView::[anonymous] m_fps
uint64_t m_pointer_events = {}

Private Static Functions

static void RegisterPlugins(FlutterDesktopEngineRef engine)

display.cc

class Display : public registry_listener, public output_listener, public shm_listener, public seat_listener, public pointer_listener, public keyboard_listener, public touch_listener

Public Functions

explicit Display(bool enable_cursor, const std::string &ignore_wayland_event, std::string cursor_theme_name, const std::vector<Configuration::Config> &configs)
~Display()
Display(const Display&) = delete
const Display &operator=(const Display&) = delete
inline wl_compositor *GetCompositor() const

Get compositor.

Relations

wayland

Return values:

Pointer – to compositor

Returns:

wl_compositor*

inline wl_subcompositor *GetSubCompositor() const

Get sub compositor.

Relations

wayland

Return values:

Pointer – to sub compositor

Returns:

wl_subcompositor*

inline wl_display *GetDisplay() const

Get display.

Relations

wayland

Return values:

Pointer – to display

Returns:

wl_display*

inline wl_shm *GetShm() const

Get XDG WM base.

Get ivi_application instance

Get shared memory

Relations

wayland

Relations

ivi-shell

Relations

wayland

Return values:
  • Pointer – to XDG WM base

  • Pointer – to IVI Application

  • Pointer – to shared memory

Returns:

xdg_wm_base*

Returns:

ivi_application*

Returns:

wl_shm*

int PollEvents() const

Wait for events.

Relations

wayland

Return values:

Number – of dispatched events

Returns:

int

void SetEngine(wl_surface *surface, Engine *engine)

Set Engine.

Relations

wayland

Parameters:
  • surface[in] Image

  • engine[in] Engine

Returns:

void

inline void SetViewControllerState(FlutterDesktopViewControllerState *view_controller_state)
bool ActivateSystemCursor(int32_t device, const std::string &kind) const

Activate system cursor.

Relations

wayland

Parameters:
  • device[in] No use

  • kind[in] Cursor kind

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

inline wl_output *GetWlOutput(const uint32_t index) const

Get wl_output of a specified index of a view.

Relations

wayland

Parameters:

index[in] Index of a view

Return values:

Pointer – to wl_output

Returns:

wl_output*

int32_t GetBufferScale(uint32_t index) const

Get a buffer scale of a specified index of a view.

Relations

wayland

Parameters:

index[in] Index of a view

Return values:

Buffer – scale

Returns:

int32_t

std::pair<int32_t, int32_t> GetVideoModeSize(uint32_t index) const

Get a video mode size of a specified index of a view.

Relations

wayland

Parameters:

index[in] Index of a view

Return values:

Video – mode size

Returns:

std::pair<int32_t, int32_t>

int GetRefreshRate(uint32_t index) const

Get refresh rate of a specified index of a view.

Relations

wayland

Parameters:

index[in] Index of a view

Return values:

Video – Refresh Rate

Returns:

int

void deactivateApp(const std::string &app_id)

deactivate/hide the application pointed by app_id

Relations

agl_shell

Parameters:

app_id[in] the app_id

void activateApp(std::string app_id)

activate/show the application pointed by app_id

Relations

agl_shell

Parameters:

app_id[in] the app_id

void addAppToStack(std::string app_id)

Add app_id to a list of list applications.

Relations

agl_shell

Parameters:

app_id[in] the app_id

int find_output_by_name(std::string output_name)

Helper to retrieve the output using its output_name.

Relations

agl_sell

Parameters:

output_name[in] a std::string representing the output

Return values:

an – integer that can used to get the proper output

void processAppStatusEvent(const char *app_id, std::string event_type)

helper to process the application status

Relations

agl_shell

Parameters:
  • app_id[in] an array of char

  • event_type[in] a std::string representing the type of event (started/stopped/terminated)

Public Members

registry_handle_global
registry_handle_global_remove
display_handle_geometry
display_handle_mode
display_handle_done
capabilities   = seat_handle_capabilities
name   = seat_handle_name
enter   = pointer_handle_enter
leave   = pointer_handle_leave
motion   = pointer_handle_motion
button   = pointer_handle_button
axis   = pointer_handle_axis
frame   = pointer_handle_frame
axis_source   = pointer_handle_axis_source
axis_stop   = pointer_handle_axis_stop
axis_discrete   = pointer_handle_axis_discrete
keymap   = keyboard_handle_keymap
key   = keyboard_handle_key
modifiers   = keyboard_handle_modifiers
repeat_info   = keyboard_handle_repeat_info
down   = touch_handle_down
up   = touch_handle_up
cancel   = touch_handle_cancel
std::shared_ptr<EventTimer> m_repeat_timer = {}

Private Types

typedef struct Display::output_info output_info_t

Private Members

std::shared_ptr<Engine> m_flutter_engine
struct wl_display *m_display = {}
struct wl_registry *m_registry = {}
struct wl_compositor *m_compositor = {}
struct wl_subcompositor *m_subcompositor = {}
struct wl_shm *m_shm = {}
struct wl_surface *m_base_surface = {}
std::map<wl_surface*, Engine*> m_surface_engine_map
wl_surface *m_active_surface = {}
Engine *m_active_engine = {}
Engine *m_touch_engine = {}
struct FlutterDesktopViewControllerState *m_view_controller_state = {}
struct wl_seat *m_seat = {}
struct wl_keyboard *m_keyboard = {}
struct xdg_wm_base *m_xdg_wm_base = {}
struct Display::agl m_agl
std::list<std::string> apps_stack
std::list<std::pair<const std::string, const std::string>> pending_app_list
struct Display::ivi_shell m_ivi_shell
bool m_enable_cursor
struct wl_surface *m_cursor_surface = {}
std::string m_cursor_theme_name
struct Display::wayland_event_mask m_wayland_event_mask
struct Display::pointer m_pointer
struct Display::touch_ m_touch
struct wl_cursor_theme *m_cursor_theme = {}
struct xkb_context *m_xkb_context
struct xkb_keymap *m_keymap = {}
struct xkb_state *m_xkb_state = {}
xkb_keysym_t m_keysym_pressed = {}
std::mutex m_lock
uint32_t m_repeat_code = {}
std::vector<std::shared_ptr<output_info_t>> m_all_outputs
bool m_buffer_scale_enable = {}

Private Static Functions

static inline void set_repeat_code(Display *display, const uint32_t repeat_code)

set repeat code

Relations

internal

Parameters:
  • display[in]

  • repeat_code[in] a repeat code

Returns:

void

static void wayland_event_mask_update(const std::string &ignore_wayland_events, struct wayland_event_mask &mask)
static void wayland_event_mask_print(struct wayland_event_mask const &mask)
static void registry_handle_global(void *data, struct wl_registry *registry, uint32_t name, const char *interface, uint32_t version)

Receive wl_registry events from Wayland server.

Relations

wayland

Parameters:
  • data[inout] Pointer to scatter Display type data

  • registry[inout] Pointer to receive wl_registry event

  • name[in] Identifier ID on Wayland server

  • interface[in] Wayland interface

  • version[in] Interface version

Returns:

void

static void registry_handle_global_remove(void *data, struct wl_registry *reg, uint32_t id)

Remove wl_registry events from Wayland server.

Relations

wayland

Note

Do nothing

Parameters:
  • data[in] No use

  • reg[in] No use

  • id[in] No use

Returns:

void

static void display_handle_geometry(void *data, struct wl_output *wl_output, int x, int y, int physical_width, int physical_height, int subpixel, const char *make, const char *model, int transform)

Set physical_width and physical_height.

Relations

wayland

Parameters:
  • data[inout] Data of type output_info_t*

  • wl_output[in] No use

  • x[in] No use

  • y[in] No use

  • physical_width[in] Width of the display

  • physical_height[in] Height of the display

  • subpixel[in] No use

  • make[in] No use

  • model[in] No use

  • transform[in] No use

Returns:

void

static void display_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags, int width, int height, int refresh)

Set width, height and refresh rate.

Relations

wayland

Parameters:
  • data[inout] Data of type output_info_t*

  • wl_output[in] No use

  • flags[in] No use

  • width[in] Width of the display

  • height[in] Height of the display

  • refresh[in] Refresh rate

Returns:

void

static void display_handle_scale(void *data, struct wl_output *wl_output, int scale)

Set the display scale.

Relations

wayland

Parameters:
  • data[inout] Data of type output_info_t*

  • wl_output[in] No use

  • scale[in] Display scale

Returns:

void

static void display_handle_done(void *data, struct wl_output *wl_output)

Turn ON the completion flag.

Relations

wayland

Parameters:
  • data[inout] Data of type output_info_t*

  • wl_output[in] No use

Returns:

void

static void display_handle_name(void *data, struct wl_output *wl_output, const char *output_name)

Set the display output name.

Relations

wayland - since @v4 of wl_output

Parameters:
  • data[inout] Data of type output_info_t*

  • wl_output[in] No use

  • output_name[in] Display name

Returns:

void

static void display_handle_desc(void *data, struct wl_output *wl_output, const char *desc_name)

Set the display description.

Relations

wayland - since @v4 of wl_output

Parameters:
  • data[inout] Data of type output_info_t*

  • wl_output[in] No use

  • desc_name[in] Display description name

Returns:

void

static void shm_format(void *data, struct wl_shm *wl_shm, uint32_t format)

Do nothing.

Relations

wayland

Note

Do nothing

Parameters:
  • data[in] No use

  • wl_shm[in] No use

  • format[in] No use

Returns:

void

static void seat_handle_capabilities(void *data, struct wl_seat *seat, uint32_t caps)

Set SEAT according to capabilities.

Relations

wayland

Parameters:
  • data[in] Data of type Display

  • seat[in] SEAT

  • caps[in] SEAT capabilities

Returns:

void

static void seat_handle_name(void *data, struct wl_seat *seat, const char *name)

Showing the name of the SEAT in Wayland.

Relations

wayland

Parameters:
  • data[inout] No use

  • seat[in] No use

  • name[in] The name of the SEAT in Wayland

Returns:

void

static bool pointerButtonStatePressed(struct pointer const *p)

Check that the button is pressed.

Relations

wayland

Parameters:

p[in] Pointer

Return values:
  • true – Button is pressed

  • false – Button is released

Returns:

bool

static void pointer_handle_enter(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t sx, wl_fixed_t sy)

Pointer goes inside a surface.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • pointer[in] No use

  • serial[in] Pointer to serial

  • surface[in] Pointer to cursor image

  • sx[in] Pointer to x-axis

  • sy[in] Pointer to y-axis

Returns:

void

static void pointer_handle_leave(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface)

Pointer leaves the surface.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • pointer[in] No use

  • serial[in] Pointer to serial

  • surface[in] No use

Returns:

void

static void pointer_handle_motion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t sx, wl_fixed_t sy)

Pointer moves within a surface.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • pointer[in] No use

  • time[in] No use

  • sx[in] Pointer to x-axis

  • sy[in] Pointer to y-axis

Returns:

void

static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button, uint32_t state)

Mouse button pressed/released.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • wl_pointer[in] No use

  • serial[in] Pointer to serial

  • time[in] No use

  • button[in] Pointer to button state

  • state[in] Pointer to state

Returns:

void

static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis, wl_fixed_t value)

Mouse event scroll.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • wl_pointer[in] No use

  • time[in] Time

  • axis[in] Moved axis

  • value[in] Direction and amount of movement

Returns:

void

static void pointer_handle_frame(void *data, struct wl_pointer *wl_pointer)

Mouse event frame.

Relations

wayland

Note

Do nothing

Parameters:
  • data[inout] No use

  • wl_pointer[in] No use

Returns:

void

static void pointer_handle_axis_source(void *data, struct wl_pointer *wl_pointer, uint32_t axis_source)

Related to mouse event scroll.

Relations

wayland

Note

Do nothing

Parameters:
  • data[inout] No use

  • wl_pointer[in] No use

  • axis_source[in] No use

Returns:

void

static void pointer_handle_axis_stop(void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis)

Related to mouse event scroll.

Relations

wayland

Note

Do nothing

Parameters:
  • data[inout] No use

  • wl_pointer[in] No use

  • time[in] No use

  • axis[in] No use

Returns:

void

static void pointer_handle_axis_discrete(void *data, struct wl_pointer *wl_pointer, uint32_t axis, int32_t discrete)

Related to mouse event scroll.

Relations

wayland

Note

Do nothing

Parameters:
  • data[inout] No use

  • wl_pointer[in] No use

  • axis[in] No use

  • discrete[in] No use

Returns:

void

static void keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, uint32_t format, int fd, uint32_t size)

Set keymap.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • keyboard[in] No use

  • format[in] No use

  • fd[in] File descriptor

  • size[in] Mapping region length

Returns:

void

static void keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys)

Keyboard input event.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • keyboard[in] No use

  • serial[in] No use

  • surface[in] Cursor image of keyboard

  • keys[in] No use

Returns:

void

static void keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface)

Keyboard leaves the surface.

Relations

wayland

Parameters:
  • data[inout] No use

  • keyboard[in] No use

  • serial[in] No use

  • surface[in] No use

Returns:

void

static void keyboard_handle_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t time, uint32_t key, uint32_t state)

Key pressed/released.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • keyboard[in] No use

  • serial[in] No use

  • time[in] No use

  • key[in] Key number

  • state[in] Key state released/pressed

Returns:

void

static void keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group)

Event when the state of the modifier key changes and lock.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • keyboard[in] No use

  • serial[in] No use

  • mods_depressed[in] Flag of modifiers being pushed

  • mods_latched[in] Latched modifiers

  • mods_locked[in] Locked modifiers

  • group[in] Keyboard layout

Returns:

void

static void keyboard_handle_repeat_info(void *data, struct wl_keyboard *wl_keyboard, int32_t rate, int32_t delay)

Keyboard repeat info.

Relations

wayland

Parameters:
  • data[inout] No use

  • wl_keyboard[in] No use

  • rate[in] Rate

  • delay[in] Delay

Returns:

void

static void keyboard_repeat_func(void *data)

a callback for key repeat behavior

Relations

wayland

Parameters:

data[in] Data of type Display

Returns:

void

static void touch_handle_down(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, struct wl_surface *surface, int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)

Touch event down.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • wl_touch[in] No use

  • serial[in] No use

  • time[in] No use

  • surface[in] Cursor image of touch

  • id[in] Touch event id

  • x_w[in] Touch position x

  • y_w[in] Touch position y

Returns:

void

static void touch_handle_up(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, int32_t id)

Touch event up.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • wl_touch[in] No use

  • serial[in] No use

  • time[in] No use

  • id[in] Touch event id

Returns:

void

static void touch_handle_motion(void *data, struct wl_touch *wl_touch, uint32_t time, int32_t id, wl_fixed_t x_w, wl_fixed_t y_w)

Touch event move.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • wl_touch[in] No use

  • time[in] No use

  • id[in] Touch event id

  • x_w[in] Touch position x

  • y_w[in] Touch position y

Returns:

void

static void touch_handle_cancel(void *data, struct wl_touch *wl_touch)

Touch event cancel.

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • wl_touch[in] No use

Returns:

void

static void touch_handle_frame(void *data, struct wl_touch *wl_touch)

Touch event frame.

Relations

wayland

Note

Do nothing

Parameters:
  • data[inout] No use

  • wl_touch[in] No use

Returns:

void

static void agl_shell_bound_ok(void *data, struct agl_shell *shell)

AGL bound ok.

Relations

wayland, agl-shell

Note

Do nothing

Parameters:
  • data[inout] Data of type Display

  • shell[in] No use

Returns:

void

static void agl_shell_bound_fail(void *data, struct agl_shell *shell)

AGL bound fail.

Relations

wayland, agl-shell

Note

Do nothing

Parameters:
  • data[inout] Data of type Display

  • shell[in] No use

Returns:

void

static void agl_shell_app_state(void *data, struct agl_shell *agl_shell, const char *app_id, uint32_t state)

AGL app_state event.

Relations

wayland, agl-shell

Note

Do nothing

Parameters:
  • data[inout] Data of type Display

  • agl_shell[in] No use

  • app_id[in] the application id for which this event was sent

  • state[in] the state: CREATED/TERMINATED/ACTIVATED/DEACTIVATED

Returns:

void

static void agl_shell_app_on_output(void *data, struct agl_shell *agl_shell, const char *app_id, const char *output_name)

AGL app_app_on_output event.

Relations

wayland, agl-shell

Note

Do nothing

Parameters:
  • data[inout] Data of type Display

  • shell[in] No use

  • app_id[in] the application id for which this event was sent

  • state[in] the state: CREATED/TERMINATED/ACTIVATED/DEACTIVATED

Returns:

void

static void ivi_wm_surface_visibility(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id, int32_t visibility)

handler of a visibility of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

  • visibility[in] visibility

Returns:

void

static void ivi_wm_layer_visibility(void *data, struct ivi_wm *ivi_wm, uint32_t layer_id, int32_t visibility)

handler of a visibility of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • layer_id[in] layer id

  • visibility[in] visibility

Returns:

void

static void ivi_wm_surface_opacity(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id, wl_fixed_t opacity)

handler of an opacity of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

  • opacity[in] opacity

Returns:

void

static void ivi_wm_layer_opacity(void *data, struct ivi_wm *ivi_wm, uint32_t layer_id, wl_fixed_t opacity)

handler of an opacity of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • layer_id[in] layer id

  • opacity[in] opacity

Returns:

void

static void ivi_wm_surface_source_rectangle(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id, int32_t x, int32_t y, int32_t width, int32_t height)

handler of a source rectangle of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

  • x[in] x position of source rectangle

  • y[in] y position of source rectangle

  • width[in] width of source rectangle

  • height[in] height of source rectangle

Returns:

void

static void ivi_wm_layer_source_rectangle(void *data, struct ivi_wm *ivi_wm, uint32_t layer_id, int32_t x, int32_t y, int32_t width, int32_t height)

handler of a source rectangle of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • layer_id[in] layer id

  • x[in] x position of source rectangle

  • y[in] y position of source rectangle

  • width[in] width of source rectangle

  • height[in] height of source rectangle

Returns:

void

static void ivi_wm_surface_destination_rectangle(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id, int32_t x, int32_t y, int32_t width, int32_t height)

handler of a destination rectangle of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

  • x[in] x position of destination rectangle

  • y[in] y position of destination rectangle

  • width[in] width of destination rectangle

  • height[in] height of destination rectangle

Returns:

void

static void ivi_wm_layer_destination_rectangle(void *data, struct ivi_wm *ivi_wm, uint32_t layer_id, int32_t x, int32_t y, int32_t width, int32_t height)

handler of a destination rectangle of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • layer_id[in] layer id

  • x[in] x position of destination rectangle

  • y[in] y position of destination rectangle

  • width[in] width of destination rectangle

  • height[in] height of destination rectangle

Returns:

void

static void ivi_wm_surface_created(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id)

handler for created event of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

Returns:

void

static void ivi_wm_layer_created(void *data, struct ivi_wm *ivi_wm, uint32_t layer_id)

handler for created event of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • layer_id[in] layer id

Returns:

void

static void ivi_wm_surface_destroyed(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id)

handler for destroyed event of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

Returns:

void

static void ivi_wm_layer_destroyed(void *data, struct ivi_wm *ivi_wm, uint32_t layer_id)

handler for destroyed event of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • layer_id[in] layer id

Returns:

void

static void ivi_wm_surface_error(void *data, struct ivi_wm *ivi_wm, uint32_t object_id, uint32_t error, const char *message)

handler for error event of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • object_id[in] wayland object id

  • error[in] error code

  • message[in] error message

Returns:

void

static void ivi_wm_layer_error(void *data, struct ivi_wm *ivi_wm, uint32_t object_id, uint32_t error, const char *message)

handler for error event of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • object_id[in] wayland object id

  • error[in] error code

  • message[in] error message

Returns:

void

static void ivi_wm_surface_size(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id, int32_t width, int32_t height)

handler for a size of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

  • width[in] width of a surface

  • height[in] height of a surface

Returns:

void

static void ivi_wm_surface_stats(void *data, struct ivi_wm *ivi_wm, uint32_t surface_id, uint32_t frame_count, uint32_t pid)

handler for stats of a ivi shell surface

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • surface_id[in] surface id

  • frame_count[in] frame count

  • pid[in] process id

Returns:

void

static void ivi_wm_layer_surface_added(void *data, struct ivi_wm *ivi_wm, uint32_t layer_id, uint32_t surface_id)

handler for surface added event of a ivi shell layer

Relations

wayland

Parameters:
  • data[inout] Data of type Display

  • ivi_wm[in] ivi shell window manager

  • layer_id[in] layer id

  • surface_id[in] surface id

Returns:

void

Private Static Attributes

static const struct wl_registry_listener registry_listener
static const struct wl_output_listener output_listener
static const struct wl_shm_listener shm_listener
static const struct wl_seat_listener seat_listener
static const struct wl_pointer_listener pointer_listener
static const struct wl_keyboard_listener keyboard_listener
static const struct wl_touch_listener touch_listener
static const struct agl_shell_listener agl_shell_listener
static const struct ivi_wm_listener ivi_wm_listener
struct agl

Public Members

bool bind_to_agl_shell = false
struct agl_shell *shell = {}
bool wait_for_bound = true
bool bound_ok = {}
uint32_t version = 0
struct ivi_shell

Public Members

struct ivi_application *application = nullptr
struct ivi_wm *ivi_wm = nullptr
struct output_info

Public Members

struct wl_output *output
uint32_t global_id
unsigned width
unsigned height
unsigned physical_width
unsigned physical_height
int refresh_rate
int32_t scale
bool done
int transform
std::string name
std::string desc
struct pointer

Public Members

struct wl_pointer *wl_pointer
struct pointer_event event
uint32_t serial
uint32_t buttons
uint32_t state
struct pointer_event

Public Members

uint32_t event_mask
double surface_x
double surface_y
uint32_t button
uint32_t state
uint32_t time
uint32_t serial
bool valid
double value
int32_t discrete
struct Display::pointer_event::[anonymous] axes[2]
uint32_t axis_source
struct touch_

Public Members

struct wl_touch *touch
struct touch_event event
wl_fixed_t surface_x[kMaxTouchFinger]
wl_fixed_t surface_y[kMaxTouchFinger]
uint32_t state
FlutterPointerPhase phase
struct touch_event

Public Members

uint32_t event_mask
uint32_t time
uint32_t serial
struct touch_point

Public Members

bool valid
int32_t id
uint32_t event_mask
wl_fixed_t surface_x
wl_fixed_t surface_y
wl_fixed_t major
wl_fixed_t minor
wl_fixed_t orientation
struct wayland_event_mask

Public Members

bool pointer
bool pointer_axis
bool pointer_buttons
bool pointer_motion
bool keyboard
bool touch

handler_priority_queue.h

class executor

Public Functions

inline executor(handler_priority_queue &q, uint64_t t)
inline handler_priority_queue &context() const noexcept
template<typename Function, typename Allocator>
inline void dispatch(Function f, const Allocator&) const
template<typename Function, typename Allocator>
inline void post(Function f, const Allocator&) const
template<typename Function, typename Allocator>
inline void defer(Function f, const Allocator&) const
inline void on_work_started() const noexcept
inline void on_work_finished() const noexcept
inline bool operator==(const executor &other) const noexcept
inline bool operator!=(const executor &other) const noexcept

Private Members

handler_priority_queue &context_
uint64_t timestamp_
template<typename Function>
class queued_handler : public handler_priority_queue::queued_handler_base

Public Functions

inline queued_handler(uint64_t t, Function f)
inline virtual void execute() override

Private Members

Function function_
class handler_priority_queue : public asio::execution_context

Public Functions

template<typename Function>
inline void add(uint64_t priority, Function function)
inline void execute_all(FlutterEngine&)
template<typename Handler>
inline asio::executor_binder<Handler, executor> wrap(uint64_t timestamp, Handler handler)

Private Members

std::priority_queue<std::unique_ptr<queued_handler_base>> handlers_
class executor

Public Functions

inline executor(handler_priority_queue &q, uint64_t t)
inline handler_priority_queue &context() const noexcept
template<typename Function, typename Allocator>
inline void dispatch(Function f, const Allocator&) const
template<typename Function, typename Allocator>
inline void post(Function f, const Allocator&) const
template<typename Function, typename Allocator>
inline void defer(Function f, const Allocator&) const
inline void on_work_started() const noexcept
inline void on_work_finished() const noexcept
inline bool operator==(const executor &other) const noexcept
inline bool operator!=(const executor &other) const noexcept

Private Members

handler_priority_queue &context_
uint64_t timestamp_
template<typename Function>
class queued_handler : public handler_priority_queue::queued_handler_base

Public Functions

inline queued_handler(uint64_t t, Function f)
inline virtual void execute() override

Private Members

Function function_
class queued_handler_base

Subclassed by handler_priority_queue::queued_handler< Function >

Public Functions

inline explicit queued_handler_base(const uint64_t t)
virtual ~queued_handler_base() = default
virtual void execute() = 0
inline uint64_t GetTimestamp() const

Private Members

uint64_t timestamp_

Friends

inline friend bool operator<(const std::unique_ptr<queued_handler_base> &a, const std::unique_ptr<queued_handler_base> &b) noexcept
class queued_handler_base

Subclassed by handler_priority_queue::queued_handler< Function >

Public Functions

inline explicit queued_handler_base(const uint64_t t)
virtual ~queued_handler_base() = default
virtual void execute() = 0
inline uint64_t GetTimestamp() const

Private Members

uint64_t timestamp_

Friends

inline friend bool operator<(const std::unique_ptr<queued_handler_base> &a, const std::unique_ptr<queued_handler_base> &b) noexcept

osmesa.h

class OSMesaHeadless

Subclassed by HeadlessBackend

Public Functions

OSMesaHeadless(int32_t initial_width, int32_t initial_height)
~OSMesaHeadless()
bool ClearCurrent() const

Clear an EGL rendering context.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

bool MakeCurrent()

Attach an EGL rendering context to EGL surface.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

bool MakeResourceCurrent()
bool MakeTextureCurrent()
void free_buffer()

Public Static Functions

static void Finish()
static GLubyte *create_osmesa_buffer(int32_t width, int32_t height)

Create a GLUbyte buffer to bind to an OSMesa Context.

Parameters:
  • width[in]

  • height[in]

Return values:

GLUbyte – buffer

Returns:

GLubyte*

Private Members

OSMesaContext m_context = {}
OSMesaContext m_resource_context = {}
OSMesaContext m_texture_context = {}
int32_t m_height = {}
int32_t m_width = {}

app.h

class App

Public Functions

explicit App(const std::vector<Configuration::Config> &configs)
App(const App&) = delete
const App &operator=(const App&) = delete
int Loop() const

One frame in the loop.

Relations

wayland, flutter

Return values:

Number – of dispatched events

Returns:

int

Private Members

std::shared_ptr<Display> m_wayland_display
std::vector<std::unique_ptr<FlutterView>> m_views
std::unique_ptr<Watchdog> m_watch_dog

task_runner.h

class TaskRunner

Public Functions

explicit TaskRunner(std::string name, FlutterEngine &engine)
~TaskRunner()
inline bool IsThreadEqual(const pthread_t threadid) const
void QueueFlutterTask(size_t index, uint64_t target_time, FlutterTask task, void *context)
std::future<FlutterEngineResult> QueuePlatformMessage(const char *channel, std::unique_ptr<std::vector<uint8_t>> message, FlutterPlatformMessageResponseHandle *handle = nullptr) const
std::future<FlutterEngineResult> QueueUpdateLocales(std::vector<const FlutterLocale*> locales) const
inline std::string GetName()
inline asio::io_context::strand *GetStrandContext() const

Public Static Functions

static inline pthread_t GetThreadId()

Private Members

std::string name_
FlutterEngine &engine_
std::thread thread_
pthread_t pthread_self_
std::unique_ptr<asio::io_context> io_context_
asio::executor_work_guard<decltype(io_context_->get_executor())> work_
std::unique_ptr<asio::io_context::strand> strand_
std::unique_ptr<handler_priority_queue> pri_queue_

configuration.h

class Configuration

Public Functions

Configuration(const Configuration&) = delete
Configuration &operator=(const Configuration&) = delete

Public Members

PRIVATE __pad0__

Public Static Functions

static std::vector<Config> ParseArgcArgv(int argc, const char *const *argv)

config file generate from argc and argv

Relations

internal

Parameters:
  • argc[in] argument count

  • argv[in] argument vector

Return values:

generated – config object

Returns:

Config

static void PrintConfig(const Config &config)

Print the contents of the configuration to the log.

Relations

internal

Parameters:

config[in] Pointer to config object to print

Returns:

void

static void get_parameters(toml::table *tbl, Config &instance)

Get parameters from TOML configuration file.

Relations

internal

Parameters:
  • tbl[in] TOML table

  • instance[inout] config

Returns:

void

static void get_toml_config(const char *config_toml_path, Config &instance)

Get Doc parameters set to View config.

Relations

internal

Parameters:
  • config_toml_path[in] path of config.toml file

  • instance[inout] View config

Returns:

void

static void get_cli_override(const std::string &bundle_path, Config &instance, const Config &cli)

Get Cli config overrides to View config.

Relations

internal

Parameters:
  • bundle_path[in] bundle_path

  • instance[inout] View config

  • cli[in] Cli config

Returns:

void

static int32_t mask_accessibility_features(int32_t accessibility_features)

mask the accessibility_features

accessibility_features is expressed as bit flags. please see FlutterAccessibilityFeature enum in third_party/flutter/shell/platform/embedder/embedder.h. 0b1111111 is the maximum value of accessibility_features.

Relations internal

Parameters:

accessibility_features[in] accessibility_features value

Return values:

masked – accessibility_features value

Returns:

int32_t

struct Config

Public Members

std::string app_id
std::string cursor_theme
std::optional<bool> disable_cursor
std::string wayland_event_mask
std::optional<bool> debug_backend
std::vector<std::string> bundle_paths
std::string bundle_path
std::vector<std::string> vm_args
std::string window_type
std::optional<uint32_t> wl_output_index
std::optional<int32_t> accessibility_features
std::optional<uint32_t> width
std::optional<uint32_t> height
uint32_t activation_area_x
uint32_t activation_area_y
uint32_t activation_area_width
uint32_t activation_area_height
std::optional<bool> fullscreen
std::optional<double> pixel_ratio
std::optional<uint32_t> ivi_surface_id
uint32_t fps_output_console
uint32_t fps_output_overlay
uint32_t fps_output_frequency
struct Configuration::Config::[anonymous] view
struct Config

Public Members

std::string app_id
std::string cursor_theme
std::optional<bool> disable_cursor
std::string wayland_event_mask
std::optional<bool> debug_backend
std::vector<std::string> bundle_paths
std::string bundle_path
std::vector<std::string> vm_args
std::string window_type
std::optional<uint32_t> wl_output_index
std::optional<int32_t> accessibility_features
std::optional<uint32_t> width
std::optional<uint32_t> height
uint32_t activation_area_x
uint32_t activation_area_y
uint32_t activation_area_width
uint32_t activation_area_height
std::optional<bool> fullscreen
std::optional<double> pixel_ratio
std::optional<uint32_t> ivi_surface_id
uint32_t fps_output_console
uint32_t fps_output_overlay
uint32_t fps_output_frequency
struct Configuration::Config::[anonymous] view

logging_handler.h

class LoggingHandler

Public Functions

explicit LoggingHandler(flutter::BinaryMessenger *messenger, FlutterView *view)

Private Functions

void HandleMethodCall(const flutter::MethodCall<flutter::EncodableValue> &method_call, std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) const

Private Members

std::unique_ptr<flutter::MethodChannel<>> channel_

Private Static Functions

static void OnLogMessage(int level, const char *context, const char *message)

Callback that writes to log.

Relations

flutter

Parameters:
  • level[in] Severity Value.

  • context[in] DLT Context ID.

  • message[in] Message to be logged.

Returns:

void

watchdog.h

class Watchdog

The default timeout interval for the Watchdog.

Public Functions

explicit Watchdog()

Default constructor for the Watchdog class.

This constructor initializes the Watchdog object with the default timeout interval. It also sets the stop flag to false and logs the interval set for the Watchdog Timer.

~Watchdog()

Destructor for the Watchdog class.

The destructor for the Watchdog class. It stops the watchdog timer, if it is running, and performs any necessary cleanup. If the watchdog thread is joinable, it will stop the thread and notify the system (if BUILD_SYSTEMD_WATCHDOG is defined) that it is stopping.

See also

Watchdog::stop(), sd_notify()

void start()

Starts the watchdog timer.

This method starts the watchdog timer by creating a separate thread that continuously checks if the timeout has occurred. If the timeout has occurred, it logs a critical message and takes appropriate action based on the build configuration. The watchdog timer will continue running until the stop() method is called or the timeout occurs.

See also

stop()

void stop()

Stops the watchdog timer.

This method stops the watchdog timer if it is running. It sets the stop flag to true, which will cause the watchdog thread to exit. If the watchdog thread is joinable, it will wait for the thread to complete before returning.

void pet()

Resets the watchdog timer deadline to the current time plus the interval.

This method updates the deadline for the watchdog timer by calculating the current time plus the interval. It also notifies the system (if BUILD_SYSTEMD_WATCHDOG is defined) that the watchdog is active.

See also

start(), sd_notify()

Watchdog(const Watchdog&) = delete
const Watchdog &operator=(const Watchdog&) = delete

Public Static Attributes

static constexpr uint64_t kDefaultTimeout = 5'000'000
static constexpr uint64_t kDefaultSleepTime = 250

Private Members

std::chrono::microseconds interval_
std::thread watchdog_thread_
std::atomic<bool> stop_flag_
std::chrono::steady_clock::time_point deadline_

flutter_desktop_view_controller_state.h

struct FlutterDesktopViewControllerState

Public Members

FlutterView *view = {}
Engine *engine = {}
std::unique_ptr<FlutterDesktopEngineState> engine_state = {}
std::unique_ptr<FlutterDesktopView> view_wrapper = {}
std::vector<std::unique_ptr<flutter::KeyboardHookHandler>> keyboard_hook_handlers

display.h

struct ivi_shell

Public Members

struct ivi_application *application = nullptr
struct ivi_wm *ivi_wm = nullptr
struct pointer

Public Members

struct wl_pointer *wl_pointer
struct pointer_event event
uint32_t serial
uint32_t buttons
uint32_t state
struct output_info

Public Members

struct wl_output *output
uint32_t global_id
unsigned width
unsigned height
unsigned physical_width
unsigned physical_height
int refresh_rate
int32_t scale
bool done
int transform
std::string name
std::string desc
struct agl

Public Members

bool bind_to_agl_shell = false
struct agl_shell *shell = {}
bool wait_for_bound = true
bool bound_ok = {}
uint32_t version = 0
struct pointer_event

Public Members

uint32_t event_mask
double surface_x
double surface_y
uint32_t button
uint32_t state
uint32_t time
uint32_t serial
bool valid
double value
int32_t discrete
struct Display::pointer_event::[anonymous] axes[2]
uint32_t axis_source
struct touch_event

Public Members

uint32_t event_mask
uint32_t time
uint32_t serial
struct touch_point

Public Members

bool valid
int32_t id
uint32_t event_mask
wl_fixed_t surface_x
wl_fixed_t surface_y
wl_fixed_t major
wl_fixed_t minor
wl_fixed_t orientation
struct touch_

Public Members

struct wl_touch *touch
struct touch_event event
wl_fixed_t surface_x[kMaxTouchFinger]
wl_fixed_t surface_y[kMaxTouchFinger]
uint32_t state
FlutterPointerPhase phase
struct wayland_event_mask

Public Members

bool pointer
bool pointer_axis
bool pointer_buttons
bool pointer_motion
bool keyboard
bool touch

platform_view.h

class PlatformView

Public Functions

inline PlatformView(const int32_t id, std::string viewType, const int32_t direction, const double left, const double top, const double width, const double height)
virtual ~PlatformView() = default
inline std::pair<int32_t, int32_t> GetSize() const
inline std::pair<int32_t, int32_t> GetOffset() const
inline int32_t GetId() const
inline std::string GetViewType()
inline int32_t GetDirection() const

Private Members

int32_t id_
std::string viewType_

key_event_handler.h

class KeyEventHandler : public flutter::KeyboardHookHandler

Public Functions

explicit KeyEventHandler(flutter::BinaryMessenger *messenger)
~KeyEventHandler() override
virtual void KeyboardHook(bool released, xkb_keysym_t keysym, uint32_t xkb_scancode, uint32_t modifiers) override
virtual void CharHook(unsigned int code_point) override

Private Members

std::unique_ptr<flutter::BasicMessageChannel<rapidjson::Document>> channel_

gl_process_resolver.h

class GlProcessResolver

Public Functions

GlProcessResolver(GlProcessResolver &other) = delete
void operator=(const GlProcessResolver&) = delete

Public Static Functions

static inline EglProcessResolver &GetInstance()

Get instance of EglProcessResolver class.

Relations

internal

Return values:

Instance – of the EglProcessResolver class

Returns:

EglProcessResolver&

class EglProcessResolver

Public Functions

~EglProcessResolver()
void Initialize()

Initialize.

Relations

internal

Returns:

void

void *process_resolver(const char *name) const

Resolve the process.

Relations

wayland

Parameters:

name[in] Process name

Return values:

Process – address

Returns:

void*

Public Static Functions

static int GetHandle(const std::string &lib, void **out_handle)

Get DLL handle.

Relations

internal

Parameters:
  • lib[in] of library

  • out_handle[out] DLL handle

Return values:
  • 1 – Normal end

  • -1 – Abnormal end

Returns:

int

Public Static Attributes

static constexpr char kGlSoNames[2UL][15UL] = {{"libGLESv2.so.2"}, {"libEGL.so.1"}}

Private Members

std::vector<std::pair<void*, std::string>> m_handles

utils.h

class Utils

Public Static Functions

static inline std::string &rtrim(std::string &s, const char *t)

trim from end of string (right)

Relations

flutter

Return values:

String – that has specified characters trimmed from right.

Returns:

std::string&

static inline std::string &ltrim(std::string &s, const char *t)

trim from beginning of string (left)

Relations

flutter

Return values:

String – that has specified characters trimmed from left.

Returns:

std::string&

static inline std::string &trim(std::string &s, const char *t)

trim from both ends of string (right then left)

Relations

flutter

Return values:

String – that has specified characters trimmed from right and left.

Returns:

std::string&

static inline const char *GetHomePath()

Gets Home Path.

Relations

flutter

Return values:

Home – path string

Returns:

const char*

static inline const char *GetConfigHomePath()

Gets Config Home Path.

Relations

flutter

Return values:

Home – path string

Returns:

const char*

static inline bool IsNumber(const std::string &s)

Check if input is a number.

Relations

internal

Parameters:

s[in] String to check if it is a number

Return values:
  • true – If s is a number

  • false – If s is not a number

Returns:

bool

static inline void RemoveArgument(std::vector<std::string> &args, const std::string &arg)

Remove argument from vector.

Relations

internal

Parameters:
  • args[in] Vector of element that matches the argument to be removed

  • arg[in] Arguments to be removed

Returns:

void

static inline std::vector<std::string> split(std::string str, const std::string &token)

Split string by token.

Relations

internal

Returns:

std::vector<std::string>

engine.h

class Engine

Public Functions

Engine(FlutterView *view, size_t index, const std::vector<const char*> &vm_args_c, const std::string &bundle_path, int32_t accessibility_features)

Constructor of engine.

Relations

internal

Parameters:
  • view[in] Pointer to Flutter view

  • index[in] an index of Flutter view

  • vm_args_c[in] Command line arguments

  • bundle_path[in] Path to bundle

  • accessibility_features[in] Accessibility Features

Return values:

Constructed – engine class

Returns:

Engine

~Engine()
Engine(const Engine&) = delete
const Engine &operator=(const Engine&) = delete
inline size_t GetIndex() const
FlutterEngineResult Run(FlutterDesktopEngineState *state)

Run flutter engine.

Relations

flutter

Parameters:

FlutterDesktopEngineState – pointer to struct of engine state

Return values:

The – result of the run Flutter engine

Returns:

FlutterEngineResult

FlutterEngineResult SetWindowSize(size_t height, size_t width)

Set window size of flutter.

Relations

flutter

Parameters:
  • height[in] Height of flutter window

  • width[in] Width of flutter window

Return values:

The – result of the set window size

Returns:

FlutterEngineResult

FlutterEngineResult SetPixelRatio(double pixel_ratio)

Set pixel ratio of flutter.

Relations

flutter

Parameters:

pixel_ratio[in] Pixel ratio of flutter window

Return values:

The – result of the set pixel ratio

Returns:

FlutterEngineResult

inline double GetPixelRatio() const

Get pixel ratio of flutter.

Relations

flutter

Return values:

The – result of the previous set pixel ratio

Returns:

pixel ratio

FlutterEngineResult Shutdown() const

Shutsdown Flutter Engine Instance.

Relations

flutter

Return values:

The – result of shutting down the engine

Returns:

FlutterEngineResult

bool IsRunning() const

Check if engine is running.

Relations

internal

Return values:
  • true – If running

  • false – If not running

Returns:

bool

FlutterEngineResult RunTask()

Run flutter tasks.

Relations

flutter

Return values:

The – result of the run flutter tasks

Returns:

FlutterEngineResult

FlutterEngineResult SendPlatformMessageResponse(const FlutterPlatformMessageResponseHandle *handle, const uint8_t *data, size_t data_length) const

Send platform message response.

Relations

flutter

Parameters:
  • handle[in] The platform message response handle

  • data[in] The data to associate with the platform message response

  • data_length[in] The length of the platform message response data

Return values:

The – result of send platform message resoponse

Returns:

FlutterEngineResult

bool SendPlatformMessage(const char *channel, std::unique_ptr<std::vector<uint8_t>> message, const FlutterPlatformMessageResponseHandle *response_handle = nullptr) const

Send platform message.

Relations

flutter

Parameters:
  • channel[in] Destination channel

  • message[in] Message to send

  • response_handle[in] optional response handle

Return values:
  • true – If successed to send message

  • false – If failed to send message

Returns:

bool

bool SendPlatformMessage(const char *channel, const uint8_t *message, size_t message_size) const

Send platform message.

Relations

flutter

Parameters:
  • channel[in] Destination channel

  • message[in] Message to send

  • message_size[in] Size of the message

Return values:
  • true – If successed to send message

  • false – If failed to send message

Returns:

bool

bool SendPlatformMessage(const char *channel, const uint8_t *message, size_t message_size, FlutterDataCallback reply, void *userdata) const

Send platform message.

Relations

flutter

Parameters:
  • channel[in] Destination channel

  • message[in] Message to send

  • message_size[in] Size of message

  • reply[in] a callback invoked by the engine when the Flutter app send a response on the handle.

  • userdata[in] The user data associated with the data callback.

Return values:
  • true – If successed to send message

  • false – If failed to send message

Returns:

bool

inline int32_t GetAccessibilityFeatures() const

Get accessibility features.

Relations

flutter

Return values:

Accessibility – features

Returns:

int32_t

FlutterEngineResult UpdateAccessibilityFeatures(int32_t value)

Update accessibility features.

Relations

flutter

Parameters:

value[in] a value representing accessibility features

Return values:

The – result of the updating accessibility features

Returns:

FlutterEngineResult

FlutterEngineResult UpdateLocales(std::vector<FlutterLocale> locales)

Update locales.

Relations

flutter

Parameters:

locales[in] Updated locales in the order of preference

Return values:

The – result of the updating locales

Returns:

FlutterEngineResult

inline std::string GetClipboardData()

Get clipboard data.

Relations

flutter

Return values:

Clipboard – data

Returns:

std::string

void CoalesceMouseEvent(FlutterPointerSignalKind signal, FlutterPointerPhase phase, double x, double y, double scroll_delta_x, double scroll_delta_y, int64_t buttons)

Coalesce mouse event.

Relations

flutter

Parameters:
  • signal[in] Kind of the signal

  • phase[in] Phase of the event

  • x[in] X coordinate of the event

  • y[in] Y coordinate of the event

  • scroll_delta_x[in] X offset of the scroll

  • scroll_delta_y[in] Y offset of the scroll

  • buttons[in] Buttons currently pressed, if any

Returns:

void

void CoalesceTouchEvent(FlutterPointerPhase phase, double x, double y, int32_t device)

Coalesce touch event.

Relations

flutter

Parameters:
  • phase[in] Phase of the pointer event

  • x[in] X coordinate of the pointer event

  • y[in] Y coordinate of the pointer event

  • device[in] Device identifier

Returns:

void

void SendPointerEvents()

Send coalesced Pointer events.

Relations

flutter

Returns:

void

bool ActivateSystemCursor(int32_t device, const std::string &kind) const

Activate system cursor.

Relations

wayland

Parameters:
  • device[in] No use

  • kind[in] Cursor kind

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

inline Backend *GetBackend() const

Get backend of view.

Relations

wayland, flutter

Return values:

Backend – pointer

Returns:

Backend*

inline FlutterView *GetView() const
inline  FLUTTER_API_SYMBOL (FlutterEngine) GetFlutterEngine() const
inline TaskRunner *GetPlatformTaskRunner() const

Public Static Functions

static std::string GetFilePath(size_t index)

Get persistent cache path.

Relations

flutter

Parameters:

index[in] Index of path (for log)

Return values:

The – cache path

Returns:

std::string

static FlutterDesktopMessage ConvertToDesktopMessage(const FlutterPlatformMessage &engine_message)
static void OnFlutterPlatformMessage(const FlutterPlatformMessage *engine_message, void *user_data)
static void onLogMessageCallback(const char *tag, const char *message, void *user_data)

Private Functions

FLUTTER_API_SYMBOL (FlutterEngine) m_flutter_engine
FlutterEngineAOTData LoadAotData(const std::string &bundle_path) const

Load AOT data.

Relations

flutter

Parameters:

aot_data_path[in] Path to AOT data

Return values:

Loaded – AOT data

Returns:

FlutterEngineAOTData

void SetUpLocales() const

Setup Locales.

Relations

flutter

Returns:

void

Private Members

size_t m_index
bool m_running
Backend *m_backend
std::shared_ptr<WaylandWindow> m_egl_window
FlutterView *m_view
std::filesystem::path m_assets_path
std::filesystem::path m_icu_data_path
std::filesystem::path m_aot_path
std::filesystem::path m_cache_path
size_t m_prev_height
size_t m_prev_width
double m_prev_pixel_ratio
int32_t m_accessibility_features
FlutterProjectArgs m_args
std::string m_clipboard_data
std::shared_ptr<TaskRunner> m_platform_task_runner
FlutterTaskRunnerDescription m_platform_task_runner_description = {}
FlutterCustomTaskRunners m_custom_task_runners = {}
FlutterEngineAOTData m_aot_data
std::vector<FlutterPointerEvent> m_pointer_events
std::mutex m_pointer_mutex

plugin_registrar_homescreen.h

class PluginRegistrarDesktop : public PluginRegistrar

Public Functions

inline explicit PluginRegistrarDesktop(FlutterDesktopPluginRegistrarRef core_registrar)
inline ~PluginRegistrarDesktop() override
PluginRegistrarDesktop(PluginRegistrarDesktop const&) = delete
PluginRegistrarDesktop &operator=(PluginRegistrarDesktop const&) = delete

crash_handler.h

class CrashHandler

Public Functions

CrashHandler()
~CrashHandler()
FML_DISALLOW_COPY_AND_ASSIGN(CrashHandler)

Public Static Functions

static void trigger_crash()

libflutter_engine.h

struct LibFlutterEngineExports

Public Functions

LibFlutterEngineExports() = default
explicit LibFlutterEngineExports(void *lib)

Public Members

FlutterEngineCreateAOTDataFnPtr CreateAOTData = nullptr
FlutterEngineCollectAOTDataFnPtr CollectAOTData = nullptr
FlutterEngineRunFnPtr Run = nullptr
FlutterEngineShutdownFnPtr Shutdown = nullptr
FlutterEngineInitializeFnPtr Initialize = nullptr
FlutterEngineDeinitializeFnPtr Deinitialize = nullptr
FlutterEngineRunInitializedFnPtr RunInitialized = nullptr
FlutterEngineSendWindowMetricsEventFnPtr SendWindowMetricsEvent = nullptr
FlutterEngineSendPointerEventFnPtr SendPointerEvent = nullptr
FlutterEngineSendKeyEventFnPtr SendKeyEvent = nullptr
FlutterEngineSendPlatformMessageFnPtr SendPlatformMessage = nullptr
FlutterEnginePlatformMessageCreateResponseHandleFnPtr PlatformMessageCreateResponseHandle = nullptr
FlutterEnginePlatformMessageReleaseResponseHandleFnPtr PlatformMessageReleaseResponseHandle = nullptr
FlutterEngineSendPlatformMessageResponseFnPtr SendPlatformMessageResponse = nullptr
FlutterEngineRegisterExternalTextureFnPtr RegisterExternalTexture = nullptr
FlutterEngineUnregisterExternalTextureFnPtr UnregisterExternalTexture = nullptr
FlutterEngineMarkExternalTextureFrameAvailableFnPtr MarkExternalTextureFrameAvailable = nullptr
FlutterEngineUpdateSemanticsEnabledFnPtr UpdateSemanticsEnabled = nullptr
FlutterEngineUpdateAccessibilityFeaturesFnPtr UpdateAccessibilityFeatures = nullptr
FlutterEngineDispatchSemanticsActionFnPtr DispatchSemanticsAction = nullptr
FlutterEngineOnVsyncFnPtr OnVsync = nullptr
FlutterEngineReloadSystemFontsFnPtr ReloadSystemFonts = nullptr
FlutterEngineTraceEventDurationBeginFnPtr TraceEventDurationBegin = nullptr
FlutterEngineTraceEventDurationEndFnPtr TraceEventDurationEnd = nullptr
FlutterEngineTraceEventInstantFnPtr TraceEventInstant = nullptr
FlutterEnginePostRenderThreadTaskFnPtr PostRenderThreadTask = nullptr
FlutterEngineGetCurrentTimeFnPtr GetCurrentTime = nullptr
FlutterEngineRunTaskFnPtr RunTask = nullptr
FlutterEngineUpdateLocalesFnPtr UpdateLocales = nullptr
FlutterEngineRunsAOTCompiledDartCodeFnPtr RunsAOTCompiledDartCode = nullptr
FlutterEnginePostDartObjectFnPtr PostDartObject = nullptr
FlutterEngineNotifyLowMemoryWarningFnPtr NotifyLowMemoryWarning = nullptr
FlutterEnginePostCallbackOnAllNativeThreadsFnPtr PostCallbackOnAllNativeThreads = nullptr
FlutterEngineNotifyDisplayUpdateFnPtr NotifyDisplayUpdate = nullptr
FlutterEngineScheduleFrameFnPtr ScheduleFrame = nullptr
FlutterEngineSetNextFrameCallbackFnPtr SetNextFrameCallback = nullptr
class LibFlutterEngine

Public Functions

LibFlutterEngineExports *operator->() const

Public Static Functions

static inline bool IsPresent(const char *library_path = nullptr)

Private Static Functions

static LibFlutterEngineExports *loadExports(const char *library_path)

headless.h

class HeadlessBackend : public OSMesaHeadless, public Backend

Public Functions

HeadlessBackend(uint32_t initial_width, uint32_t initial_height, bool debug_backend, int buffer_size)
virtual void Resize(size_t index, Engine *flutter_engine, int32_t width, int32_t height) override

Resize Flutter engine Window size.

Relations

wayland

Parameters:
  • index[in] No use

  • flutter_engine[in] Pointer to Flutter engine

  • width[in] Set window width

  • height[in] Set window height

Returns:

void

virtual void CreateSurface(size_t index, wl_surface *surface, int32_t width, int32_t height) override

Create EGL surface.

Relations

wayland

Parameters:
  • index[in] No use

  • surface[in] Pointer to surface

  • width[in] Set surface width

  • height[in] Set surface height

Returns:

void

virtual bool TextureMakeCurrent() override
virtual bool TextureClearCurrent() override
virtual FlutterRendererConfig GetRenderConfig() override

Get FlutterRendererConfig.

Relations

wayland

Return values:

Pointer – to FlutterRendererConfig

Returns:

FlutterRendererConfig

virtual FlutterCompositor GetCompositorConfig() override

Get FlutterCompositor.

Relations

wayland

Return values:

Pointer – to FlutterCompositor

Returns:

FlutterCompositor

GLubyte *getHeadlessBuffer()

Private Members

uint32_t m_prev_width
uint32_t m_width
uint32_t m_prev_height
uint32_t m_height

text_input_plugin.h

class TextInputPlugin : public flutter::KeyboardHookHandler

Public Functions

explicit TextInputPlugin(flutter::BinaryMessenger *messenger)
~TextInputPlugin() override
virtual void KeyboardHook(bool released, xkb_keysym_t keysym, uint32_t xkb_scancode, uint32_t modifiers) override
virtual void CharHook(unsigned int code_point) override

Private Functions

void SendStateUpdate(const TextInputModel &model) const
void EnterPressed(TextInputModel *model) const
void HandleMethodCall(const flutter::MethodCall<rapidjson::Document> &method_call, const std::unique_ptr<flutter::MethodResult<rapidjson::Document>> &result)

Private Members

std::unique_ptr<flutter::MethodChannel<rapidjson::Document>> channel_
int client_id_ = 0
std::unique_ptr<TextInputModel> active_model_
std::string input_type_
std::string input_action_

dlt_sink.h

template<typename Mutex>
class dlt_sink : public base_sink<Mutex>

Public Functions

inline explicit dlt_sink(size_t n_items)
inline std::vector<details::log_msg_buffer> last_raw(size_t lim = 0)
inline std::vector<std::string> last_formatted(size_t lim = 0)

Private Members

details::circular_q<details::log_msg_buffer> q_

egl.cc

struct egl_config_attribute

Public Members

EGLint id
const char *name
int32_t cardinality
const struct egl_enum_item *values
struct egl_enum_item

Public Members

EGLint id
const char *name

compositor_surface.cc

class CompositorSurface : public frame_listener

Public Types

enum PARAM_SURFACE_T

Values:

enumerator egl
enumerator vulkan
enum PARAM_Z_ORDER_T

Values:

enumerator above
enumerator below
enum PARAM_SYNC_T

Values:

enumerator sync
enumerator de_sync

Public Functions

CompositorSurface(int64_t key, const std::shared_ptr<Display> &wayland_display, const std::shared_ptr<WaylandWindow> &wayland_window, void *h_module, std::string assets_path, const std::string &cache_folder, const std::string &misc_folder, CompositorSurface::PARAM_SURFACE_T type, CompositorSurface::PARAM_Z_ORDER_T z_order, CompositorSurface::PARAM_SYNC_T sync, int width, int height, int32_t x, int32_t y)
~CompositorSurface() = default
void InitializePlugin()

Initialize the compositor surface plugin.

Relations

plugin

Returns:

void

inline void *GetContext() const

get a context of a plugin

Relations

internal

Return values:

context

Returns:

void*

inline void RunTask() const

run a plugin context task

Relations

wayland

Returns:

void

void StartFrames()

start frames of a plugin

Relations

wayland

Returns:

void

void StopFrames()

stop frames of a plugin

Relations

wayland

Returns:

void

Public Members

COMP_SURF_API_VERSION_T *version = {}
COMP_SURF_API_LOAD_FUNCTIONS *loader = {}
COMP_SURF_API_INITIALIZE_T *initialize = {}
COMP_SURF_API_DE_INITIALIZE_T *de_initialize = {}
COMP_SURF_API_RUN_TASK_T *run_task = {}
COMP_SURF_API_DRAW_FRAME_T *draw_frame = {}
COMP_SURF_API_RESIZE_T *resize = {}

Public Static Functions

static void Dispose(void *userdata)

dispose a surface context

Relations

flutter

Parameters:

userdata[in]

Returns:

void

static std::string GetFilePath(const char *folder)

the utility to get a file path of a specified folder

Relations

internal

Parameters:

folder[in] the folder name

Return values:

the – file path

Returns:

std::string

Private Members

wl m_wl = {}
wl_subsurface *m_subsurface = {}
void *m_h_module
std::string m_assets_path
std::string m_cache_path
std::string m_misc_path
PARAM_SURFACE_T m_type
PARAM_Z_ORDER_T m_z_order
PARAM_SYNC_T m_sync
int width_
int height_
int32_t m_origin_x
int32_t m_origin_y
struct CompositorSurface::[anonymous] m_api
COMP_SURF_API_CONTEXT_T *m_context = {}
struct wl_callback *m_callback

Private Static Functions

static void init_api(CompositorSurface *obj)

Initialize a compositor surface plugin API.

Relations

plugin

Parameters:

obj[in] the compositor surfaces

Returns:

void

static void on_frame(void *data, struct wl_callback *callback, uint32_t time)

draw a frame of a plugin and run a callback of a plugin

Relations

plugin, wayland

Parameters:
  • data[in] user data

  • callback[in] the callback of a plugin

  • time[in] time spent to draw a frame

Returns:

void

Private Static Attributes

static const struct wl_callback_listener frame_listener
struct wl

Public Members

struct wl_display *display
struct wl_surface *surface
EGLDisplay egl_display
struct wl_egl_window *egl_window
uint32_t width
uint32_t height

egl.h

class Egl

Subclassed by WaylandEglBackend

Public Functions

Egl(void *native_display, int buffer_size, bool debug)
~Egl()
bool ClearCurrent()

Clear an EGL rendering context.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

bool MakeCurrent()

Attach an EGL rendering context to EGL surface.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

bool SwapBuffers()

Post EGL surface color buffer to a native window.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

bool MakeResourceCurrent()

Attach an EGL rendering context to EGL surface by specifying Resource content.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

bool MakeTextureCurrent()

Attach an EGL rendering context to EGL surface by specifying Texture content.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

EGLSurface create_egl_surface(void *native_window, const EGLint *attrib_list)

Create a new EGL window surface.

Relations

wayland

Parameters:
  • native_window[in] The native window

  • attrib_list[in] Window surface attributes

Return values:

An – EGL window surface

Returns:

EGLSurface

inline PFNEGLSETDAMAGEREGIONKHRPROC GetSetDamageRegion() const

Function that returns a function pointer to PFNEGLSETDAMAGEREGIONKHRPROC.

Relations

EGL

Return values:

nullptr – if extensions are not supported

Returns:

PFNEGLSETDAMAGEREGIONKHRPROC

inline PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC GetSwapBuffersWithDamage() const

Function that returns a function pointer to PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC.

Relations

EGL

Return values:

nullptr – if extensions are not supported

Returns:

PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC

inline bool HasExtBufferAge() const

Function that returns if GL Ext Buffer Age is supported.

Relations

EGL

Return values:

true – if extension is available

Returns:

bool

std::array<EGLint, 4> RectToInts(FlutterRect rect) const

Auxiliary function used to transform a FlutterRect into the format that is expected by the EGL functions.

Relations

EGL

Parameters:

rect[in] FlutterRect

Return values:

if – extension is present

Returns:

array of EGLint

inline EGLDisplay GetDisplay() const
inline EGLContext GetTextureContext() const

Private Functions

void ReportGlesAttributes(EGLConfig *configs, EGLint count)

Report the contents of EGL attributes and frame buffer configurations.

Relations

wayland

Parameters:
  • configs[in] EGL Config

  • count[in] Count of configs

Returns:

void

Private Members

EGLConfig m_config = {}
EGLContext m_texture_context = {}
int m_buffer_size = {}
EGLDisplay m_dpy = {}
EGLContext m_context = {}
EGLContext m_resource_context = {}
EGLint m_major = {}
EGLint m_minor = {}
PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC m_pfSwapBufferWithDamage = {}
PFNEGLSETDAMAGEREGIONKHRPROC m_pfSetDamageRegion = {}
bool m_has_egl_ext_buffer_age = {}

Private Static Functions

static bool HasEGLExtension(const char *extensions, const char *name)

Auxiliary function used to check if the given list of extensions contains the requested extension name.

Relations

EGL

Parameters:
  • extensions[in] EGL display

  • name[in] name of extension

Return values:

if – extension is present

Returns:

bool

static bool HasGLExtension(const char *name)

Auxiliary function used to check if the GL extension is available.

Relations

EGL

Parameters:

name[in] name of extension

Return values:

if – extension is present

Returns:

bool

static void sDebugCallback(EGLenum error, const char *command, EGLint messageType, EGLLabelKHR threadLabel, EGLLabelKHR objectLabel, const char *message)

Debug callback function to output error details.

Relations

internal

Parameters:
  • error[in] Error code

  • command[in] Commands in case of error

  • messageType[in] Type of message when an error occurs

  • threadLabel[in] Thread label when error occurs

  • objectLabel[in] Object label when an error occurs

  • message[in] Error message

Returns:

void

static void EGL_KHR_debug_init(const char *extensions)

Initialize of EGL KHR_debug.

Relations

wayland

Parameters:

extensions[in] string of EGL extensions

Returns:

void

static void print_extension_list(EGLDisplay dpy)

Print a list of extensions, with word-wrapping.

Relations

internal

Parameters:

dpy[in] List of extensions

Returns:

void

backend.h

class Backend

Subclassed by HeadlessBackend, WaylandEglBackend, WaylandVulkanBackend

Public Types

enum Type

Values:

enumerator Headless
enumerator WaylandEgl
enumerator WaylandVulkan
enumerator WaylandLeasedDrm
enumerator DrmKms

Public Functions

Backend() = default
virtual ~Backend() = default
Backend(const Backend&) = delete
const Backend &operator=(const Backend&) = delete
virtual void Resize(size_t index, Engine *flutter_engine, int32_t width, int32_t height) = 0

Execute the callback function for window resizing.

Relations

flutter, wayland

Parameters:
  • index[in] Set Application ID

  • flutter_engine[in] Pointer to Flutter engine

  • width[in] Set window width

  • height[in] Set window height

Returns:

void

virtual void CreateSurface(size_t index, struct wl_surface *surface, int32_t width, int32_t height) = 0

Execute the callback function for surface creating.

Relations

wayland, (flutter)

Parameters:
  • index[in] Set Application ID

  • surface[in] Pointer to surface

  • width[in] Set surface width

  • height[in] Set surface height

Returns:

void

virtual bool TextureMakeCurrent() = 0
virtual bool TextureClearCurrent() = 0
virtual FlutterRendererConfig GetRenderConfig() = 0

Get an empty FlutterRendererConfig.

Relations

internal

Return values:

Pointer – to FlutterRendererConfig

Returns:

FlutterRendererConfig

virtual FlutterCompositor GetCompositorConfig() = 0

Get an empty FlutterCompositor.

Relations

internal

Return values:

Pointer – to FlutterCompositor

Returns:

FlutterCompositor

mouse_cursor_handler.h

class MouseCursorHandler

Public Functions

explicit MouseCursorHandler(flutter::BinaryMessenger *messenger, FlutterView *view)

Private Functions

void HandleMethodCall(const flutter::MethodCall<flutter::EncodableValue> &method_call, std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) const

Private Members

std::unique_ptr<flutter::MethodChannel<>> channel_
FlutterView *view_

keyboard_hook_handler.h

class KeyboardHookHandler

Subclassed by flutter::KeyEventHandler, flutter::TextInputPlugin

Public Functions

virtual ~KeyboardHookHandler() = default
virtual void KeyboardHook(bool released, xkb_keysym_t keysym, uint32_t xkb_scancode, uint32_t modifiers) = 0
virtual void CharHook(unsigned int code_point) = 0

flutter_desktop_messenger.h

struct FlutterDesktopMessenger

Public Functions

FlutterDesktopMessenger() = default
inline void AddRef()

Increments the reference count.

Thread-safe.

inline void Release()

Decrements the reference count and deletes the object if the count has gone to zero.

Thread-safe.

inline FlutterDesktopEngineState *GetEngine() const

Getter for the engine field.

inline void SetEngine(FlutterDesktopEngineState *engine)

Setter for the engine field. Thread-safe.

inline std::mutex &GetMutex()

Returns the mutex associated with the |FlutterDesktopMessenger|.

This mutex is used to synchronize reading or writing state inside the |FlutterDesktopMessenger| (ie |engine_|).

FlutterDesktopMessenger(const FlutterDesktopMessenger &value) = delete
FlutterDesktopMessenger &operator=(const FlutterDesktopMessenger &value) = delete

Private Members

FlutterDesktopEngineState *engine_ = {}
std::atomic<int32_t> ref_count_ = 0
std::mutex mutex_

wayland_vulkan.h

class WaylandVulkanBackend : public Backend

Public Functions

WaylandVulkanBackend(wl_display *display, uint32_t width, uint32_t height, bool enable_validation_layers)
~WaylandVulkanBackend() override
virtual void Resize(size_t index, Engine *engine, int32_t width, int32_t height) override

Resize Flutter engine Window size.

Relations

wayland

Parameters:
  • index[in] No use

  • engine[in] Pointer to Flutter engine

  • width[in] Set window width

  • height[in] Set window height

Returns:

void

virtual void CreateSurface(size_t index, wl_surface *surface, int32_t width, int32_t height) override

Create Vulkan surface.

Relations

wayland

Parameters:
  • index[in] No use

  • surface[in] Pointer to surface

  • width[in] Set surface width

  • height[in] Set surface height

Returns:

void

virtual FlutterRendererConfig GetRenderConfig() override

Get FlutterRendererConfig.

Relations

wayland

Return values:

Pointer – to FlutterRendererConfig

Returns:

FlutterRendererConfig

virtual FlutterCompositor GetCompositorConfig() override

Get FlutterCompositor.

Relations

wayland

Return values:

Pointer – to FlutterCompositor

Returns:

FlutterCompositor

virtual bool TextureMakeCurrent() override
virtual bool TextureClearCurrent() override

Private Functions

void createInstance()

Create Vulkan instance.

Relations

wayland

Returns:

void

void setupDebugMessenger()

Setup Vulkan debug callback.

Relations

wayland

Returns:

void

void findPhysicalDevice()

Find a compatible Vulkan physical device.

Relations

wayland

Returns:

void

void createLogicalDevice()

Create Vulkan logical device.

Relations

wayland

Returns:

void

bool InitializeSwapchain()

Initialize Vulkan swapchain.

Relations

wayland

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

Private Members

std::vector<const char*> enabled_instance_extensions_ = {}
std::vector<const char*> enabled_device_extensions_ = {}
std::vector<const char*> enabled_layer_extensions_ = {}
VkInstance instance_ = {}
VkSurfaceKHR surface_ = {}
VkPhysicalDevice physical_device_ = {}
VkPhysicalDeviceFeatures physical_device_features_ = {}
VkPhysicalDeviceMemoryProperties physical_device_memory_properties_ = {}
VkDevice device_ = {}
uint32_t queue_family_index_ = {}
VkQueue queue_ = {}
bool debugUtilsSupported_ = {}
bool enable_validation_layers_
bool surfaceSupported_ = {}
bool waylandSurfaceSupported_ = {}
VkSurfaceFormatKHR surface_format_ = {}
VkSwapchainKHR swapchain_ = {}
VkCommandPool swapchain_command_pool_ = {}
std::vector<VkImage> swapchain_images_
std::vector<VkCommandBuffer> present_transition_buffers_
VkSemaphore present_transition_semaphore_ = {}
VkFence image_ready_fence_ = {}
uint32_t last_image_index_ = {}
bool resize_pending_
wl_display *wl_display_
uint32_t width_
uint32_t height_
VkDebugReportCallbackEXT mDebugCallback = VK_NULL_HANDLE
VkDebugUtilsMessengerEXT mDebugMessenger = VK_NULL_HANDLE

Private Static Functions

static FlutterVulkanImage GetNextImageCallback(void *user_data, const FlutterFrameInfo *frame_info)

Callback to get the next Vulkan image.

Relations

wayland

Parameters:
  • user_data[in] Pointer to User data

  • frame_info[in] No use

Return values:

Next – Vulkan image

Returns:

FlutterVulkanImage

static bool PresentCallback(void *user_data, const FlutterVulkanImage *image)

Callback to queue Vulkan image for presentation.

Relations

wayland

Parameters:
  • user_data[in] Pointer to User data

  • image[in] No use

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

static void *GetInstanceProcAddressCallback(void *user_data, FlutterVulkanInstanceHandle instance, const char *procname)

Callback to Get instance Process Address.

Relations

wayland

Parameters:
  • user_data[in] Pointer to User data

  • instance[in] Vulkan instance handle

  • procname[in] Process name

Return values:

Instance – Process Address

Returns:

void*

static VKAPI_ATTR VkBool32 VKAPI_CALL debugUtilsCallback (VkDebugUtilsMessageSeverityFlagBitsEXT severity, VkDebugUtilsMessageTypeFlagsEXT types, const VkDebugUtilsMessengerCallbackDataEXT *cbdata, void *pUserData)

Callback to VK_EXT_debug_utils.

Relations

wayland

Parameters:
  • severity[in] Bitmask of VkDebugUtilsMessageSeverityFlagBitsEXT

  • types[in] No use

  • cbdata[in] Structure specifying parameters returned to the callback

  • pUserData[in] No use

Return values:

VK_FALSE – Abnormal end

Returns:

VkBool32

static VKAPI_ATTR VkBool32 VKAPI_CALL debugReportCallback (VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char *pLayerPrefix, const char *pMessage, void *pUserData)

Callback to VK_EXT_debug_report.

Relations

wayland

Parameters:
  • flags[in] Bitmask of VkDebugReportFlagBitsEXT

  • objectType[in] No use

  • object[in] No use

  • location[in] No use

  • messageCode[in] No use

  • pLayerPrefix[in] The name of the component

  • pMessage[in] Output message

  • pUserData[in] No use

Return values:

VK_FALSE – Abnormal end

Returns:

VkBool32

static bool CollectBackingStore(const FlutterBackingStore *renderer, void *user_data)

Callback to output information “CollectBackingStore”.

Relations

internal

Parameters:
  • renderer[in] No use

  • user_data[in] No use

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

static bool CreateBackingStore(const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out, void *user_data)

Callback to output information “CreateBackingStore”.

Relations

internal

Parameters:
  • config[in] No use

  • backing_store_out[in] No use

  • user_data[in] No use

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

static bool PresentLayers(const FlutterLayer **layers, size_t layers_count, void *user_data)

Callback to output information “PresentLayers”.

Relations

internal

Parameters:
  • layers[in] No use

  • layers_count[in] No use

  • user_data[in] No use

Return values:
  • true – Normal end

  • false – Abnormal end

Returns:

bool

Private Static Attributes

static constexpr VkPresentModeKHR kPreferredPresentMode = VK_PRESENT_MODE_FIFO_KHR

platform_view_touch.h

class PlatformViewTouch

Public Functions

explicit PlatformViewTouch(const std::vector<flutter::EncodableValue> &params)
inline int32_t getId() const
inline int32_t getAction() const
inline int32_t getPointerCount() const
inline double getX() const
inline double getY() const
inline const std::vector<double> &getRawPointerCoords() const
void Print()

Private Members

int32_t id_

The ID of the platform view as seen by the Flutter side.

int32_t downTime_

The amount of time that the touch has been pressed.

int32_t eventTime_
int32_t action_
int32_t pointerCount_

The number of pointers (e.g, fingers) involved in the touch event.

std::vector<int32_t> rawPointerPropertiesList_

Properties for each pointer, encoded in a raw format.

std::vector<double> rawPointerCoords_

Coordinates for each pointer, encoded in a raw format.

int32_t metaState_
int32_t buttonState_
double xPrecision_

Coordinate precision along the x-axis.

double yPrecision_

Coordinate precision along the y-axis.

int32_t deviceId_
int32_t edgeFlags_
int32_t source_
int32_t flags_
int32_t motionEventId_

compositor_surface.h

struct wl

Public Members

struct wl_display *display
struct wl_surface *surface
EGLDisplay egl_display
struct wl_egl_window *egl_window
uint32_t width
uint32_t height

flutter_desktop_plugin_registrar.h

struct FlutterDesktopPluginRegistrar

Public Members

FlutterDesktopEngineState *engine
FlutterDesktopOnPluginRegistrarDestroyed destruction_handler

logging.h

class Logging

Public Functions

inline Logging()
inline ~Logging()

Private Members

std::shared_ptr<spdlog::logger> m_logger = {}
std::shared_ptr<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>> m_console_sink

dlt.h

class Dlt

Public Static Functions

static bool IsSupported()

Check if DLT is supported on the current platform.

Relations

dlt

Return values:

true – if DLT is supported, false otherwise.

Returns:

boot

static bool Register()

Register DLT context.

Relations

dlt

Return values:

true – if DLT is registered, false otherwise.

Returns:

boot

static bool Unregister()

Unregister DLT context.

Relations

dlt

Return values:

true – if DLT is unregistered, false otherwise.

Returns:

boot

static void LogString(DltLogLevelType log_level, const char *buff)

Convert a specified string to DLT log string.

Relations

dlt

Parameters:
  • log_level[in] DLT log level.

  • buff[in] String to be converted.

Returns:

void

static void LogSizedString(DltLogLevelType log_level, const char *buff, uint16_t length)

Convert a specified string to DLT log string specifying a buffer length.

Relations

dlt

Parameters:
  • log_level[in] DLT log level.

  • buff[in] String to be converted.

  • length[in] length of buffer.

Returns:

void

Private Functions

FML_DISALLOW_COPY_AND_ASSIGN(Dlt)

wayland_egl.h

class WaylandEglBackend : public Egl, public Backend

Public Functions

WaylandEglBackend(struct wl_display *display, uint32_t initial_width, uint32_t initial_height, bool debug_backend, int buffer_size = kEglBufferSize)
virtual void Resize(size_t index, Engine *flutter_engine, int32_t width, int32_t height) override

Resize Flutter engine Window size.

Relations

wayland

Parameters:
  • index[in] No use

  • engine[in] Pointer to Flutter engine

  • width[in] Set window width

  • height[in] Set window height

Returns:

void

virtual void CreateSurface(const size_t index, struct wl_surface *surface, const int32_t width, const int32_t height) override

Create EGL surface.

Relations

wayland

Parameters:
  • index[in] No use

  • surface[in] Pointer to surface

  • width[in] Set surface width

  • height[in] Set surface height

Returns:

void

virtual bool TextureMakeCurrent() override
virtual bool TextureClearCurrent() override
virtual FlutterRendererConfig GetRenderConfig() override

Get FlutterRendererConfig.

Relations

wayland

Return values:

Pointer – to FlutterRendererConfig

Returns:

FlutterRendererConfig

virtual FlutterCompositor GetCompositorConfig() override

Get FlutterCompositor.

Relations

wayland

Return values:

Pointer – to FlutterCompositor

Returns:

FlutterCompositor

inline void UpdateSize(int _width, int _height)

Public Static Attributes

static constexpr int kMaxHistorySize = 10

Private Members

struct wl_egl_window *m_egl_window = {}
uint32_t m_initial_width
uint32_t m_initial_height
std::unordered_map<intptr_t, FlutterRect*> m_existing_damage_map
std::list<FlutterRect> m_damage_history = {}

Private Static Functions

static void JoinFlutterRect(FlutterRect *rect, const FlutterRect &additional_rect)

Auxiliary function to union the damage regions comprised by two FlutterRect element. It saves the result of this join in the rect variable.

Relations

wayland

Returns:

void

platform_view_listener.h

struct platform_view_listener

Public Members

void (*resize)(double width, double height, void *data)
void (*set_direction)(int32_t direction, void *data)

Sets the layout direction for the Android view.

void (*set_offset)(double left, double top, void *data)
void (*on_touch)(int32_t action, int32_t point_count, const size_t pointer_data_size, const double *pointer_data, void *data)
void (*dispose)(bool hybrid, void *data)
void (*accept_gesture)(int32_t id)

When a touch sequence is happening on the embedded UIView all touch events are delayed. Calling this method releases the delayed events to the embedded UIView and makes it consume any following touch events for the pointers involved in the active gesture.

void (*reject_gesture)(int32_t id)

When a touch sequence is happening on the embedded UIView all touch events are delayed. Calling this method drops the buffered touch events and prevents any future touch events for the pointers that are part of the active touch sequence from arriving to the embedded view.