| Flutter Linux Embedder |

fl_settings_channel.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_CHANNEL_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_CHANNEL_H_
7
8 #include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
9
10 G_BEGIN_DECLS
11
12 typedef enum {
13 FL_SETTINGS_CHANNEL_PLATFORM_BRIGHTNESS_LIGHT,
14 FL_SETTINGS_CHANNEL_PLATFORM_BRIGHTNESS_DARK
15 } FlSettingsChannelPlatformBrightness;
16
17 G_DECLARE_FINAL_TYPE(FlSettingsChannel,
18 fl_settings_channel,
19 FL,
20 SETTINGS_CHANNEL,
21 GObject);
22
23 /**
24 * FlSettingsChannel:
25 *
26 * #FlSettingsChannel is a channel that implements the Flutter user settings
27 * channel.
28 */
29
30 /**
31 * fl_settings_channel_new:
32 * @messenger: an #FlBinaryMessenger
33 *
34 * Creates a new channel that sends user settings to the platform.
35 *
36 * Returns: a new #FlSettingsChannel
37 */
38 FlSettingsChannel* fl_settings_channel_new(FlBinaryMessenger* messenger);
39
40 /*
41 * fl_settings_channel_send:
42 * @channel: an #FlSettingsChannel.
43 * @text_scale_factor: scale factor for text.
44 * @always_use_24_hour_format: TRUE if time should always be shown in 24 hour
45 * format.
46 * @platform_brightness: The brightness theme in use.
47 *
48 * Send a settings update to the platform.
49 */
50 void fl_settings_channel_send(
51 FlSettingsChannel* channel,
52 double text_scale_factor,
53 gboolean always_use_24_hour_format,
54 FlSettingsChannelPlatformBrightness platform_brightness);
55
56 G_END_DECLS
57
58 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_CHANNEL_H_
FL
FL
Definition: fl_binary_messenger.cc:27
fl_binary_messenger.h
fl_settings_channel_send
void fl_settings_channel_send(FlSettingsChannel *channel, double text_scale_factor, gboolean always_use_24_hour_format, FlSettingsChannelPlatformBrightness platform_brightness)
Definition: fl_settings_channel.cc:50
fl_settings_channel_new
FlSettingsChannel * fl_settings_channel_new(FlBinaryMessenger *messenger)
Definition: fl_settings_channel.cc:39
G_DECLARE_FINAL_TYPE
G_DECLARE_FINAL_TYPE(FlSettingsChannel, fl_settings_channel, FL, SETTINGS_CHANNEL, GObject)
FlSettingsChannelPlatformBrightness
FlSettingsChannelPlatformBrightness
Definition: fl_settings_channel.h:12
FL_SETTINGS_CHANNEL_PLATFORM_BRIGHTNESS_DARK
@ FL_SETTINGS_CHANNEL_PLATFORM_BRIGHTNESS_DARK
Definition: fl_settings_channel.h:14
FL_SETTINGS_CHANNEL_PLATFORM_BRIGHTNESS_LIGHT
@ FL_SETTINGS_CHANNEL_PLATFORM_BRIGHTNESS_LIGHT
Definition: fl_settings_channel.h:13