forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fl_settings_portal.h
56 lines (46 loc) · 1.52 KB
/
fl_settings_portal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_PORTAL_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_PORTAL_H_
#include "flutter/shell/platform/linux/fl_settings.h"
G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(FlSettingsPortal,
fl_settings_portal,
FL,
SETTINGS_PORTAL,
GObject);
/**
* FlSettingsPortal:
* #FlSettingsPortal reads settings from the XDG desktop portal.
*/
/**
* fl_settings_portal_new:
*
* Creates a new settings portal instance.
*
* Returns: a new #FlSettingsPortal.
*/
FlSettingsPortal* fl_settings_portal_new();
/**
* fl_settings_portal_new_with_values:
* @values: (nullable): a #GVariantDict.
*
* Creates a new settings portal instance with initial values for testing.
*
* Returns: a new #FlSettingsPortal.
*/
FlSettingsPortal* fl_settings_portal_new_with_values(GVariantDict* values);
/**
* fl_settings_portal_start:
* @portal: an #FlSettingsPortal.
* @error: (allow-none): #GError location to store the error occurring, or %NULL
*
* Reads the current settings and starts monitoring for changes in the desktop
* portal settings.
*
* Returns: %TRUE on success, or %FALSE if the portal is not available.
*/
gboolean fl_settings_portal_start(FlSettingsPortal* portal, GError** error);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_SETTINGS_PORTAL_H_