1 | /* GTK - The GIMP Toolkit |
---|---|
2 | * Copyright (C) 2011 Red Hat, Inc. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library 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 GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 | */ |
17 | |
18 | #ifndef __GTK_CSS_SECTION_H__ |
19 | #define __GTK_CSS_SECTION_H__ |
20 | |
21 | #if !defined (__GTK_CSS_H_INSIDE__) && !defined (GTK_COMPILATION) |
22 | #error "Only <gtk/css/gtkcss.h> can be included directly." |
23 | #endif |
24 | |
25 | #include <gio/gio.h> |
26 | #include <gdk/gdkversionmacros.h> |
27 | #include <gtk/css/gtkcsslocation.h> |
28 | |
29 | G_BEGIN_DECLS |
30 | |
31 | #define GTK_TYPE_CSS_SECTION (gtk_css_section_get_type ()) |
32 | |
33 | /** |
34 | * GtkCssSection: |
35 | * |
36 | * Defines a part of a CSS document. |
37 | * |
38 | * Because sections are nested into one another, you can use |
39 | * [method@CssSection.get_parent] to get the containing region. |
40 | */ |
41 | typedef struct _GtkCssSection GtkCssSection; |
42 | |
43 | GDK_AVAILABLE_IN_ALL |
44 | GType gtk_css_section_get_type (void) G_GNUC_CONST; |
45 | |
46 | GDK_AVAILABLE_IN_ALL |
47 | GtkCssSection * gtk_css_section_new (GFile *file, |
48 | const GtkCssLocation *start, |
49 | const GtkCssLocation *end); |
50 | GDK_AVAILABLE_IN_ALL |
51 | GtkCssSection * gtk_css_section_ref (GtkCssSection *section); |
52 | GDK_AVAILABLE_IN_ALL |
53 | void gtk_css_section_unref (GtkCssSection *section); |
54 | |
55 | GDK_AVAILABLE_IN_ALL |
56 | void gtk_css_section_print (const GtkCssSection *section, |
57 | GString *string); |
58 | GDK_AVAILABLE_IN_ALL |
59 | char * gtk_css_section_to_string (const GtkCssSection *section); |
60 | |
61 | GDK_AVAILABLE_IN_ALL |
62 | GtkCssSection * gtk_css_section_get_parent (const GtkCssSection *section); |
63 | GDK_AVAILABLE_IN_ALL |
64 | GFile * gtk_css_section_get_file (const GtkCssSection *section); |
65 | GDK_AVAILABLE_IN_ALL |
66 | const GtkCssLocation * |
67 | gtk_css_section_get_start_location (const GtkCssSection *section); |
68 | GDK_AVAILABLE_IN_ALL |
69 | const GtkCssLocation * |
70 | gtk_css_section_get_end_location (const GtkCssSection *section); |
71 | |
72 | G_END_DECLS |
73 | |
74 | #endif /* __GTK_CSS_SECTION_H__ */ |
75 |