Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
fl_settings_portal.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_PORTAL_H_
6#define FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_PORTAL_H_
7
8#include "flutter/shell/platform/linux/fl_settings.h"
9
10G_BEGIN_DECLS
11
12G_DECLARE_FINAL_TYPE(FlSettingsPortal,
13 fl_settings_portal,
14 FL,
15 SETTINGS_PORTAL,
16 GObject);
17
18/**
19 * FlSettingsPortal:
20 * #FlSettingsPortal reads settings from the XDG desktop portal.
21 */
22
23/**
24 * fl_settings_portal_new:
25 *
26 * Creates a new settings portal instance.
27 *
28 * Returns: a new #FlSettingsPortal.
29 */
30FlSettingsPortal* fl_settings_portal_new();
31
32/**
33 * fl_settings_portal_new_with_values:
34 * @values: (nullable): a #GVariantDict.
35 *
36 * Creates a new settings portal instance with initial values for testing.
37 *
38 * Returns: a new #FlSettingsPortal.
39 */
40FlSettingsPortal* fl_settings_portal_new_with_values(GVariantDict* values);
41
42/**
43 * fl_settings_portal_start:
44 * @portal: an #FlSettingsPortal.
45 * @error: (allow-none): #GError location to store the error occurring, or %NULL
46 *
47 * Reads the current settings and starts monitoring for changes in the desktop
48 * portal settings.
49 *
50 * Returns: %TRUE on success, or %FALSE if the portal is not available.
51 */
52gboolean fl_settings_portal_start(FlSettingsPortal* portal, GError** error);
53
54G_END_DECLS
55
56#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_PORTAL_H_
const uint8_t uint32_t uint32_t GError ** error
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlSettingsPortal, fl_settings_portal, FL, SETTINGS_PORTAL, GObject)
gboolean fl_settings_portal_start(FlSettingsPortal *portal, GError **error)
FlSettingsPortal * fl_settings_portal_new()
FlSettingsPortal * fl_settings_portal_new_with_values(GVariantDict *values)