GCC Code Coverage Report


Directory: ./
File: panels/display/cc-display-config-manager.c
Date: 2024-05-04 07:58:27
Exec Total Coverage
Lines: 0 16 0.0%
Functions: 0 9 0.0%
Branches: 0 7 0.0%

Line Branch Exec Source
1 /*
2 * Copyright (C) 2016 Red Hat, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 */
19
20 #include "cc-display-config-manager.h"
21
22 G_DEFINE_TYPE (CcDisplayConfigManager,
23 cc_display_config_manager,
24 G_TYPE_OBJECT)
25
26 enum
27 {
28 CONFIG_MANAGER_CHANGED,
29 N_CONFIG_MANAGER_SIGNALS,
30 };
31
32 static guint config_manager_signals[N_CONFIG_MANAGER_SIGNALS] = { 0 };
33
34 static void
35 cc_display_config_manager_init (CcDisplayConfigManager *self)
36 {
37 }
38
39 static void
40 cc_display_config_manager_class_init (CcDisplayConfigManagerClass *klass)
41 {
42 config_manager_signals[CONFIG_MANAGER_CHANGED] =
43 g_signal_new ("changed",
44 CC_TYPE_DISPLAY_CONFIG_MANAGER,
45 G_SIGNAL_RUN_LAST,
46 0, NULL, NULL,
47 g_cclosure_marshal_VOID__VOID,
48 G_TYPE_NONE, 0);
49 }
50
51 void
52 _cc_display_config_manager_emit_changed (CcDisplayConfigManager *self)
53 {
54 g_signal_emit (self, config_manager_signals[CONFIG_MANAGER_CHANGED], 0);
55 }
56
57 CcDisplayConfig *
58 cc_display_config_manager_get_current (CcDisplayConfigManager *self)
59 {
60 return CC_DISPLAY_CONFIG_MANAGER_GET_CLASS (self)->get_current (self);
61 }
62
63 gboolean
64 cc_display_config_manager_get_apply_allowed (CcDisplayConfigManager *self)
65 {
66 return CC_DISPLAY_CONFIG_MANAGER_GET_CLASS (self)->get_apply_allowed (self);
67 }
68
69 gboolean
70 cc_display_config_manager_get_night_light_supported (CcDisplayConfigManager *self)
71 {
72 return CC_DISPLAY_CONFIG_MANAGER_GET_CLASS (self)->get_night_light_supported (self);
73 }
74