Debian Codegraph @

gtk/src/csssection.hg

raw
1 /* Copyright (C) 2014 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 _CONFIGINCLUDE(gtkmmconfig.h)
18
19 #include <glibmm/refptr.h>
20 #include <giomm/file.h>
21
22 _DEFS(gtkmm,gtk)
23
24 #ifndef DOXYGEN_SHOULD_SKIP_THIS
25 typedef struct _GtkCssSection GtkCssSection;
26 #endif
27
28 namespace Gtk
29 {
30 _WRAP_ENUM(CssSectionType, GtkCssSectionType, decl_prefix GTKMM_API)
31
32 /** Defines a part of a CSS document.
33 * Because sections are nested into one another, you can use get_parent()
34 * to get the containing region.
35 *
36 * There is no public method that creates a CssSection, but it is input data to
37 * a Gtk::CssProvider::signal_parsing_error() handler.
38 *
39 * @newin{3,16}
40 */
41 class GTKMM_API CssSection final
42 {
43 _CLASS_OPAQUE_REFCOUNTED(CssSection, GtkCssSection, NONE, gtk_css_section_ref, gtk_css_section_unref, GTKMM_API)
44 _IGNORE(gtk_css_section_ref, gtk_css_section_unref)
45
46 public:
47 _WRAP_METHOD(CssSectionType get_section_type() const, gtk_css_section_get_section_type)
48 _WRAP_METHOD(Glib::RefPtr<CssSection> get_parent(), gtk_css_section_get_parent, refreturn)
49 _WRAP_METHOD(Glib::RefPtr<const CssSection> get_parent() const, gtk_css_section_get_parent, refreturn, constversion)
50 _WRAP_METHOD(Glib::RefPtr<Gio::File> get_file(), gtk_css_section_get_file, refreturn)
51 _WRAP_METHOD(Glib::RefPtr<const Gio::File> get_file() const, gtk_css_section_get_file, refreturn, constversion)
52 _WRAP_METHOD(unsigned int get_start_line() const, gtk_css_section_get_start_line)
53 _WRAP_METHOD(unsigned int get_start_position() const, gtk_css_section_get_start_position)
54 _WRAP_METHOD(unsigned int get_end_line() const, gtk_css_section_get_end_line)
55 _WRAP_METHOD(unsigned int get_end_position() const, gtk_css_section_get_end_position)
56 };
57
58 } // namespace Gtk