Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / pango / pangomm / fontface.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <pangomm/fontface.h>
5 #include <pangomm/private/fontface_p.h>
6
7 // -*- c++ -*-
8 /* $Id$ */
9
10 /* 
11  *
12  * Copyright 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28
29 namespace Pango
30 {
31
32 Glib::ArrayHandle<int> FontFace::list_sizes() const
33 {
34   int* sizes = 0;
35   int n_sizes = 0;
36   pango_font_face_list_sizes(const_cast<PangoFontFace*>(gobj()), &sizes, &n_sizes);
37
38   return Glib::ArrayHandle<int>(sizes, n_sizes, Glib::OWNERSHIP_SHALLOW); //The ArrayHandle will free the array.
39 }
40
41 } //namespace Pango
42
43
44 namespace
45 {
46 } // anonymous namespace
47
48
49 namespace Glib
50 {
51
52 Glib::RefPtr<Pango::FontFace> wrap(PangoFontFace* object, bool take_copy)
53 {
54   return Glib::RefPtr<Pango::FontFace>( dynamic_cast<Pango::FontFace*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
55   //We use dynamic_cast<> in case of multiple inheritance.
56 }
57
58 } /* namespace Glib */
59
60
61 namespace Pango
62 {
63
64
65 /* The *_Class implementation: */
66
67 const Glib::Class& FontFace_Class::init()
68 {
69   if(!gtype_) // create the GType if necessary
70   {
71     // Glib::Class has to know the class init function to clone custom types.
72     class_init_func_ = &FontFace_Class::class_init_function;
73
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();
77
78     // Create the wrapper type, with the same class/instance size as the base type.
79     register_derived_type(pango_font_face_get_type());
80
81     // Add derived versions of interfaces, if the C type implements any interfaces:
82   }
83
84   return *this;
85 }
86
87 void FontFace_Class::class_init_function(void* g_class, void* class_data)
88 {
89   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
90   CppClassParent::class_init_function(klass, class_data);
91
92 #ifdef GLIBMM_VFUNCS_ENABLED
93 #endif //GLIBMM_VFUNCS_ENABLED
94
95 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
96 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
97 }
98
99 #ifdef GLIBMM_VFUNCS_ENABLED
100 #endif //GLIBMM_VFUNCS_ENABLED
101
102 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
103 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
104
105
106 Glib::ObjectBase* FontFace_Class::wrap_new(GObject* object)
107 {
108   return new FontFace((PangoFontFace*)object);
109 }
110
111
112 /* The implementation: */
113
114 PangoFontFace* FontFace::gobj_copy()
115 {
116   reference();
117   return gobj();
118 }
119
120 FontFace::FontFace(const Glib::ConstructParams& construct_params)
121 :
122   Glib::Object(construct_params)
123 {}
124
125 FontFace::FontFace(PangoFontFace* castitem)
126 :
127   Glib::Object((GObject*)(castitem))
128 {}
129
130 FontFace::~FontFace()
131 {}
132
133
134 FontFace::CppClassType FontFace::fontface_class_; // initialize static member
135
136 GType FontFace::get_type()
137 {
138   return fontface_class_.init().get_type();
139 }
140
141 GType FontFace::get_base_type()
142 {
143   return pango_font_face_get_type();
144 }
145
146
147 FontDescription FontFace::describe() const
148 {
149   return FontDescription((pango_font_face_describe(const_cast<PangoFontFace*>(gobj()))));
150 }
151
152 Glib::ustring FontFace::get_name() const
153 {
154   return Glib::convert_const_gchar_ptr_to_ustring(pango_font_face_get_face_name(const_cast<PangoFontFace*>(gobj())));
155 }
156
157 bool FontFace::is_synthesized() const
158 {
159   return pango_font_face_is_synthesized(const_cast<PangoFontFace*>(gobj()));
160 }
161
162
163 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
164 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
165
166 #ifdef GLIBMM_VFUNCS_ENABLED
167 #endif //GLIBMM_VFUNCS_ENABLED
168
169
170 } // namespace Pango
171
172