summaryrefslogtreecommitdiffstats
path: root/subprojects/libhandy/src/hdy-header-group.h
blob: dc20a7627dcf6c8e041570a1f47e435ff1090a5d (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
 * Copyright (C) 2018 Purism SPC
 *
 * SPDX-License-Identifier: LGPL-2.1+
 */

#pragma once

#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif

#include "hdy-version.h"

#include <gtk/gtk.h>
#include "hdy-header-bar.h"

G_BEGIN_DECLS

#define HDY_TYPE_HEADER_GROUP_CHILD (hdy_header_group_child_get_type())

HDY_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (HdyHeaderGroupChild, hdy_header_group_child, HDY, HEADER_GROUP_CHILD, GObject)

#define HDY_TYPE_HEADER_GROUP (hdy_header_group_get_type())

HDY_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (HdyHeaderGroup, hdy_header_group, HDY, HEADER_GROUP, GObject)

typedef enum {
  HDY_HEADER_GROUP_CHILD_TYPE_HEADER_BAR,
  HDY_HEADER_GROUP_CHILD_TYPE_GTK_HEADER_BAR,
  HDY_HEADER_GROUP_CHILD_TYPE_HEADER_GROUP,
} HdyHeaderGroupChildType;

HDY_AVAILABLE_IN_ALL
HdyHeaderBar   *hdy_header_group_child_get_header_bar     (HdyHeaderGroupChild *self);
HDY_AVAILABLE_IN_ALL
GtkHeaderBar   *hdy_header_group_child_get_gtk_header_bar (HdyHeaderGroupChild *self);
HDY_AVAILABLE_IN_ALL
HdyHeaderGroup *hdy_header_group_child_get_header_group   (HdyHeaderGroupChild *self);

HDY_AVAILABLE_IN_ALL
HdyHeaderGroupChildType hdy_header_group_child_get_child_type (HdyHeaderGroupChild *self);

HDY_AVAILABLE_IN_ALL
HdyHeaderGroup *hdy_header_group_new (void);

HDY_AVAILABLE_IN_ALL
void hdy_header_group_add_header_bar     (HdyHeaderGroup *self,
                                          HdyHeaderBar   *header_bar);
HDY_AVAILABLE_IN_ALL
void hdy_header_group_add_gtk_header_bar (HdyHeaderGroup *self,
                                          GtkHeaderBar   *header_bar);
HDY_AVAILABLE_IN_ALL
void hdy_header_group_add_header_group   (HdyHeaderGroup *self,
                                          HdyHeaderGroup *header_group);

HDY_AVAILABLE_IN_ALL
GSList *hdy_header_group_get_children (HdyHeaderGroup *self);

HDY_AVAILABLE_IN_ALL
void hdy_header_group_remove_header_bar     (HdyHeaderGroup *self,
                                             HdyHeaderBar   *header_bar);
HDY_AVAILABLE_IN_ALL
void hdy_header_group_remove_gtk_header_bar (HdyHeaderGroup *self,
                                             GtkHeaderBar   *header_bar);
HDY_AVAILABLE_IN_ALL
void hdy_header_group_remove_header_group   (HdyHeaderGroup *self,
                                             HdyHeaderGroup *header_group);
HDY_AVAILABLE_IN_ALL
void hdy_header_group_remove_child          (HdyHeaderGroup      *self,
                                             HdyHeaderGroupChild *child);

HDY_AVAILABLE_IN_ALL
gboolean hdy_header_group_get_decorate_all (HdyHeaderGroup *self);
HDY_AVAILABLE_IN_ALL
void     hdy_header_group_set_decorate_all (HdyHeaderGroup *self,
                                            gboolean        decorate_all);

G_END_DECLS