1 // Generated by gtkmmproc -- DO NOT MODIFY!
4 #include <pangomm/color.h>
5 #include <pangomm/private/color_p.h>
7 /* Copyright (C) 2002 The gtkmm Development Team
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 /* For some unknown reason pango doesn't provide pango_color_new(). Let's define an
28 * equivalent function ourself! */
29 PangoColor* _pango_color_new()
31 return g_new(PangoColor, 1);
34 Color::operator bool()
39 } /* namespace Pango */
43 } // anonymous namespace
49 Pango::Color& wrap(PangoColor* object)
51 return *reinterpret_cast<Pango::Color*>(object);
54 const Pango::Color& wrap(const PangoColor* object)
56 return *reinterpret_cast<const Pango::Color*>(object);
67 GType Color::get_type()
69 return pango_color_get_type();
74 GLIBMM_INITIALIZE_STRUCT(gobject_, PangoColor);
77 Color::Color(const PangoColor* gobject)
82 GLIBMM_INITIALIZE_STRUCT(gobject_, PangoColor);
86 guint16 Color::get_red() const
91 guint16 Color::get_green() const
96 guint16 Color::get_blue() const
101 void Color::set_red(const guint16& value)
106 void Color::set_green(const guint16& value)
108 gobj()->green = value;
111 void Color::set_blue(const guint16& value)
113 gobj()->blue = value;
116 bool Color::parse(const Glib::ustring& spec)
118 return pango_color_parse(gobj(), spec.c_str());
121 Glib::ustring Color::to_string() const
123 return Glib::convert_return_gchar_ptr_to_ustring(pango_color_to_string(const_cast<PangoColor*>(gobj())));