GCC Code Coverage Report


Directory: ./
File: panels/power/cc-power-profile-row.h
Date: 2024-05-04 07:58:27
Exec Total Coverage
Lines: 0 1 0.0%
Functions: 0 2 0.0%
Branches: 0 6 0.0%

Line Branch Exec Source
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* cc-list-row.h
3 *
4 * Copyright 2020 Red Hat Inc
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Author(s):
20 * Bastien Nocera <hadess@hadess.net>
21 *
22 * SPDX-License-Identifier: GPL-3.0-or-later
23 */
24
25 #pragma once
26
27 #include <adwaita.h>
28 #include <gtk/gtk.h>
29
30 G_BEGIN_DECLS
31
32 typedef enum
33 {
34 CC_POWER_PROFILE_PERFORMANCE = 0,
35 CC_POWER_PROFILE_BALANCED = 1,
36 CC_POWER_PROFILE_POWER_SAVER = 2,
37 NUM_CC_POWER_PROFILES
38 } CcPowerProfile;
39
40 #define CC_TYPE_POWER_PROFILE_ROW (cc_power_profile_row_get_type())
41 G_DECLARE_FINAL_TYPE (CcPowerProfileRow, cc_power_profile_row, CC, POWER_PROFILE_ROW, AdwActionRow)
42
43 CcPowerProfileRow *cc_power_profile_row_new (CcPowerProfile power_profile);
44 CcPowerProfile cc_power_profile_row_get_profile (CcPowerProfileRow *row);
45 GtkCheckButton *cc_power_profile_row_get_radio_button (CcPowerProfileRow *row);
46 void cc_power_profile_row_set_active (CcPowerProfileRow *row, gboolean active);
47 gboolean cc_power_profile_row_get_active (CcPowerProfileRow *row);
48
49 CcPowerProfile cc_power_profile_from_str (const char *profile);
50 const char *cc_power_profile_to_str (CcPowerProfile profile);
51
52 G_END_DECLS
53