#include "flutter/shell/platform/linux/fl_settings_plugin.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 | _FlSettingsPlugin |
Functions | |
static const gchar * | to_platform_brightness (FlColorScheme color_scheme) |
static void | update_settings (FlSettingsPlugin *self) |
static void | fl_settings_plugin_dispose (GObject *object) |
static void | fl_settings_plugin_class_init (FlSettingsPluginClass *klass) |
static void | fl_settings_plugin_init (FlSettingsPlugin *self) |
FlSettingsPlugin * | fl_settings_plugin_new (FlEngine *engine) |
void | fl_settings_plugin_start (FlSettingsPlugin *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_plugin.cc.
References fl_settings_plugin_dispose().
|
static |
|
static |
Definition at line 92 of file fl_settings_plugin.cc.
FlSettingsPlugin* fl_settings_plugin_new | ( | FlEngine * | engine | ) |
FlSettingsPlugin:
#FlSettingsPlugin is a plugin that implements the Flutter user settings channel. fl_settings_plugin_new: @messenger: an #FlEngine
Creates a new plugin that sends user settings to the Flutter engine.
Returns: a new #FlSettingsPlugin
Definition at line 94 of file fl_settings_plugin.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_plugin_start | ( | FlSettingsPlugin * | plugin, |
FlSettings * | settings | ||
) |
fl_settings_plugin_start: @self: an #FlSettingsPlugin.
Sends the current settings to the engine and updates when they change.
Definition at line 112 of file fl_settings_plugin.cc.
References update_settings().
Referenced by fl_engine_start(), and TEST().
|
static |
Definition at line 32 of file fl_settings_plugin.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_plugin.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_plugin_start().
|
staticconstexpr |
Definition at line 17 of file fl_settings_plugin.cc.
Referenced by update_settings().
|
staticconstexpr |
Definition at line 15 of file fl_settings_plugin.cc.
Referenced by fl_settings_plugin_new().
|
staticconstexpr |
Definition at line 20 of file fl_settings_plugin.cc.
Referenced by to_platform_brightness().
|
staticconstexpr |
Definition at line 18 of file fl_settings_plugin.cc.
Referenced by update_settings().
|
staticconstexpr |
Definition at line 19 of file fl_settings_plugin.cc.
Referenced by to_platform_brightness().
|
staticconstexpr |
Definition at line 16 of file fl_settings_plugin.cc.
Referenced by update_settings().