Better description.
[tweakr] / libtweakr-section / tweakr-section.h
1 /*
2  * vim:ts=4:sw=4:et:cindent:cino=(0
3  */ 
4
5 #ifndef __TWEAKR_SECTION_H__
6 #define __TWEAKR_SECTION_H__
7
8 #include <glib-object.h>
9
10 G_BEGIN_DECLS
11
12
13 #define TWEAKR_TYPE_SECTION \
14         (tweakr_section_get_type ())
15 #define TWEAKR_SECTION(o) \
16         (G_TYPE_CHECK_INSTANCE_CAST ((o), TWEAKR_TYPE_SECTION, \
17         TweakrSection))
18 #define TWEAKR_SECTION_CLASS(k) \
19         (G_TYPE_CHECK_CLASS_CAST((k), TWEAKR_TYPE_SECTION, \
20         TweakrSectionClass))
21 #define TWEAKR_IS_SECTION(o) \
22         (G_TYPE_CHECK_INSTANCE_TYPE ((o), TWEAKR_TYPE_SECTION))
23 #define TWEAKR_IS_SECTION_CLASS(k) \
24         (G_TYPE_CHECK_CLASS_TYPE ((k), TWEAKR_TYPE_SECTION))
25 #define TWEAKR_SECTION_GET_CLASS(o) \
26         (G_TYPE_INSTANCE_GET_CLASS ((o), TWEAKR_TYPE_SECTION, \
27         TweakrSectionClass))
28
29
30 typedef struct _TweakrSection      TweakrSection;
31 typedef struct _TweakrSectionClass TweakrSectionClass;
32
33 struct _TweakrSection
34 {
35     GObject  parent_instance;
36
37     /* The widget that the section populates (usually a vbox */
38     GtkWidget *widget;
39     const gchar *name;
40 };
41
42 struct _TweakrSectionClass
43 {
44     GObjectClass  parent_class;
45
46     const gchar *name;
47
48     gboolean (*save) (TweakrSection *section,
49                       gboolean *requires_restart);
50 };
51
52
53 GType tweakr_section_get_type (void) G_GNUC_CONST;
54
55 TweakrSection * tweakr_section_new (GType type);
56
57 GtkWidget * tweakr_section_get_widget (TweakrSection *section);
58 gboolean tweakr_section_save (TweakrSection *section,
59                                     gboolean *requires_restart);
60
61 G_END_DECLS
62
63 #endif /* __TWEAKR_SECTION_H_ */
64