Branch data Line data Source code
1 : : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 : : /*
3 : : * Copyright 2024 GNOME Foundation, Inc.
4 : : *
5 : : * This library is free software; you can redistribute it and/or
6 : : * modify it under the terms of the GNU Lesser General Public
7 : : * License as published by the Free Software Foundation; either
8 : : * version 2 of the License, or (at your option) any later version.
9 : : *
10 : : * This library is distributed in the hope that it will be useful,
11 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 : : * Lesser General Public License for more details.
14 : : *
15 : : * You should have received a copy of the GNU Lesser General
16 : : * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 : : *
18 : : * Authors:
19 : : * - Philip Withnall <pwithnall@gnome.org>
20 : : *
21 : : * SPDX-License-Identifier: GPL-3.0-or-later
22 : : */
23 : :
24 : : #pragma once
25 : :
26 : : #include <glib-object.h>
27 : : #include <gtk/gtk.h>
28 : :
29 : : #include "cc-bar-chart-bar.h"
30 : :
31 : : G_BEGIN_DECLS
32 : :
33 : : #define CC_TYPE_BAR_CHART_GROUP (cc_bar_chart_group_get_type())
34 [ # # # # : 0 : G_DECLARE_FINAL_TYPE (CcBarChartGroup, cc_bar_chart_group, CC, BAR_CHART_GROUP, GtkWidget)
# # ]
35 : :
36 : : CcBarChartGroup *cc_bar_chart_group_new (void);
37 : :
38 : : CcBarChartBar * const *cc_bar_chart_group_get_bars (CcBarChartGroup *self,
39 : : size_t *out_n_bars);
40 : : void cc_bar_chart_group_insert_bar (CcBarChartGroup *self,
41 : : int idx,
42 : : CcBarChartBar *bar);
43 : : void cc_bar_chart_group_remove_bar (CcBarChartGroup *self,
44 : : CcBarChartBar *bar);
45 : :
46 : : gboolean cc_bar_chart_group_get_selectable (CcBarChartGroup *self);
47 : : void cc_bar_chart_group_set_selectable (CcBarChartGroup *self,
48 : : gboolean selectable);
49 : :
50 : : gboolean cc_bar_chart_group_get_is_selected (CcBarChartGroup *self);
51 : : void cc_bar_chart_group_set_is_selected (CcBarChartGroup *self,
52 : : gboolean is_selected);
53 : :
54 : : gboolean cc_bar_chart_group_get_selected_index (CcBarChartGroup *self,
55 : : size_t *out_index);
56 : : void cc_bar_chart_group_set_selected_index (CcBarChartGroup *self,
57 : : gboolean is_selected,
58 : : size_t idx);
59 : :
60 : : double cc_bar_chart_group_get_scale (CcBarChartGroup *self);
61 : : void cc_bar_chart_group_set_scale (CcBarChartGroup *self,
62 : : double scale);
63 : :
64 : : G_END_DECLS
|