#include "flutter/shell/platform/linux/fl_settings_handler.h"
#include <gmodule.h>
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/fl_engine_private.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_basic_message_channel.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_json_message_codec.h"
Go to the source code of this file.
Classes | |
struct | _FlSettingsHandler |
Functions | |
static const gchar * | to_platform_brightness (FlColorScheme color_scheme) |
static void | update_settings (FlSettingsHandler *self) |
static void | fl_settings_handler_dispose (GObject *object) |
static void | fl_settings_handler_class_init (FlSettingsHandlerClass *klass) |
static void | fl_settings_handler_init (FlSettingsHandler *self) |
FlSettingsHandler * | fl_settings_handler_new (FlEngine *engine) |
void | fl_settings_handler_start (FlSettingsHandler *self, FlSettings *settings) |
Variables | |
static constexpr char | kChannelName [] = "flutter/settings" |
static constexpr char | kTextScaleFactorKey [] = "textScaleFactor" |
static constexpr char | kAlwaysUse24HourFormatKey [] = "alwaysUse24HourFormat" |
static constexpr char | kPlatformBrightnessKey [] = "platformBrightness" |
static constexpr char | kPlatformBrightnessLight [] = "light" |
static constexpr char | kPlatformBrightnessDark [] = "dark" |
|
static |
Definition at line 88 of file fl_settings_handler.cc.
References fl_settings_handler_dispose().
|
static |
Definition at line 73 of file fl_settings_handler.cc.
Referenced by fl_settings_handler_class_init().
|
static |
Definition at line 92 of file fl_settings_handler.cc.
FlSettingsHandler* fl_settings_handler_new | ( | FlEngine * | engine | ) |
FlSettingsHandler:
#FlSettingsHandler is a handler that implements the Flutter user settings channel. fl_settings_handler_new: @messenger: an #FlEngine
Creates a new handler that sends user settings to the Flutter engine.
Returns: a new #FlSettingsHandler
Definition at line 94 of file fl_settings_handler.cc.
References fl_basic_message_channel_new(), fl_engine_get_binary_messenger(), fl_json_message_codec_new(), and kChannelName.
Referenced by fl_engine_start(), and TEST().
void fl_settings_handler_start | ( | FlSettingsHandler * | handler, |
FlSettings * | settings | ||
) |
fl_settings_handler_start: @handler: an #FlSettingsHandler.
Sends the current settings to the engine and updates when they change.
Definition at line 112 of file fl_settings_handler.cc.
References update_settings().
Referenced by fl_engine_start(), and TEST().
|
static |
Definition at line 32 of file fl_settings_handler.cc.
References FL_COLOR_SCHEME_DARK, FL_COLOR_SCHEME_LIGHT, kPlatformBrightnessDark, and kPlatformBrightnessLight.
Referenced by update_settings().
|
static |
Definition at line 44 of file fl_settings_handler.cc.
References fl_basic_message_channel_send(), FL_CLOCK_FORMAT_24H, fl_engine_update_accessibility_features(), fl_settings_get_clock_format(), fl_settings_get_color_scheme(), fl_settings_get_enable_animations(), fl_settings_get_high_contrast(), fl_settings_get_text_scaling_factor(), fl_value_new_bool(), fl_value_new_float(), fl_value_new_map(), fl_value_new_string(), fl_value_set_string_take(), flags, kAlwaysUse24HourFormatKey, kPlatformBrightnessKey, kTextScaleFactorKey, and to_platform_brightness().
Referenced by fl_settings_handler_start().
|
staticconstexpr |
Definition at line 17 of file fl_settings_handler.cc.
Referenced by update_settings().
|
staticconstexpr |
Definition at line 15 of file fl_settings_handler.cc.
Referenced by fl_settings_handler_new().
|
staticconstexpr |
Definition at line 20 of file fl_settings_handler.cc.
Referenced by to_platform_brightness().
|
staticconstexpr |
Definition at line 18 of file fl_settings_handler.cc.
Referenced by update_settings().
|
staticconstexpr |
Definition at line 19 of file fl_settings_handler.cc.
Referenced by to_platform_brightness().
|
staticconstexpr |
Definition at line 16 of file fl_settings_handler.cc.
Referenced by update_settings().