1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <pangomm/fontfamily.h>
4 #include <pangomm/private/fontfamily_p.h>
11 * Copyright 2001 The gtkmm Development Team
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 Glib::ArrayHandle< Glib::RefPtr<FontFace> > FontFamily::list_faces() const
34 PangoFontFace** pFontFaces = 0;
36 pango_font_family_list_faces(const_cast<PangoFontFamily*>(gobj()), &pFontFaces, &n_fonts);
38 return Glib::ArrayHandle<Glib::RefPtr <FontFace> > (pFontFaces, n_fonts, Glib::OWNERSHIP_SHALLOW);
41 } /* namespace Pango */
46 } // anonymous namespace
52 Glib::RefPtr<Pango::FontFamily> wrap(PangoFontFamily* object, bool take_copy)
54 return Glib::RefPtr<Pango::FontFamily>( dynamic_cast<Pango::FontFamily*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
55 //We use dynamic_cast<> in case of multiple inheritance.
58 } /* namespace Glib */
65 /* The *_Class implementation: */
67 const Glib::Class& FontFamily_Class::init()
69 if(!gtype_) // create the GType if necessary
71 // Glib::Class has to know the class init function to clone custom types.
72 class_init_func_ = &FontFamily_Class::class_init_function;
74 // This is actually just optimized away, apparently with no harm.
75 // Make sure that the parent type has been created.
76 //CppClassParent::CppObjectType::get_type();
78 // Create the wrapper type, with the same class/instance size as the base type.
79 register_derived_type(pango_font_family_get_type());
81 // Add derived versions of interfaces, if the C type implements any interfaces:
87 void FontFamily_Class::class_init_function(void* g_class, void* class_data)
89 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
90 CppClassParent::class_init_function(klass, class_data);
95 Glib::ObjectBase* FontFamily_Class::wrap_new(GObject* object)
97 return new FontFamily((PangoFontFamily*)object);
101 /* The implementation: */
103 PangoFontFamily* FontFamily::gobj_copy()
109 FontFamily::FontFamily(const Glib::ConstructParams& construct_params)
111 Glib::Object(construct_params)
114 FontFamily::FontFamily(PangoFontFamily* castitem)
116 Glib::Object((GObject*)(castitem))
119 FontFamily::~FontFamily()
123 FontFamily::CppClassType FontFamily::fontfamily_class_; // initialize static member
125 GType FontFamily::get_type()
127 return fontfamily_class_.init().get_type();
130 GType FontFamily::get_base_type()
132 return pango_font_family_get_type();
136 Glib::ustring FontFamily::get_name() const
138 return Glib::convert_const_gchar_ptr_to_ustring(pango_font_family_get_name(const_cast<PangoFontFamily*>(gobj())));
141 bool FontFamily::is_monospace() const
143 return pango_font_family_is_monospace(const_cast<PangoFontFamily*>(gobj()));