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
29G_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 */
41typedef struct _GtkCssSection GtkCssSection;
42
43GDK_AVAILABLE_IN_ALL
44GType gtk_css_section_get_type (void) G_GNUC_CONST;
45
46GDK_AVAILABLE_IN_ALL
47GtkCssSection * gtk_css_section_new (GFile *file,
48 const GtkCssLocation *start,
49 const GtkCssLocation *end);
50GDK_AVAILABLE_IN_ALL
51GtkCssSection * gtk_css_section_ref (GtkCssSection *section);
52GDK_AVAILABLE_IN_ALL
53void gtk_css_section_unref (GtkCssSection *section);
54
55GDK_AVAILABLE_IN_ALL
56void gtk_css_section_print (const GtkCssSection *section,
57 GString *string);
58GDK_AVAILABLE_IN_ALL
59char * gtk_css_section_to_string (const GtkCssSection *section);
60
61GDK_AVAILABLE_IN_ALL
62GtkCssSection * gtk_css_section_get_parent (const GtkCssSection *section);
63GDK_AVAILABLE_IN_ALL
64GFile * gtk_css_section_get_file (const GtkCssSection *section);
65GDK_AVAILABLE_IN_ALL
66const GtkCssLocation *
67 gtk_css_section_get_start_location (const GtkCssSection *section);
68GDK_AVAILABLE_IN_ALL
69const GtkCssLocation *
70 gtk_css_section_get_end_location (const GtkCssSection *section);
71
72G_END_DECLS
73
74#endif /* __GTK_CSS_SECTION_H__ */
75

source code of gtk/gtk/css/gtkcsssection.h