add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / pango / pangomm / cairofontmap.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <pangomm/cairofontmap.h>
5 #include <pangomm/private/cairofontmap_p.h>
6
7 // -*- c++ -*-
8 /* $Id: cairofontmap.ccg,v 1.1 2006/05/30 17:14:21 murrayc Exp $ */
9
10 /* 
11  *
12  * Copyright 2001      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 #include <pangomm/context.h>
30 #include <pango/pangocairo.h>
31
32 namespace Pango
33 {
34
35 } /* namespace Pango */
36
37
38 namespace
39 {
40 } // anonymous namespace
41
42
43 namespace Glib
44 {
45
46 Glib::RefPtr<Pango::CairoFontMap> wrap(PangoCairoFontMap* object, bool take_copy)
47 {
48   return Glib::RefPtr<Pango::CairoFontMap>( dynamic_cast<Pango::CairoFontMap*> (Glib::wrap_auto_interface<Pango::CairoFontMap> ((GObject*)(object), take_copy)) );
49   //We use dynamic_cast<> in case of multiple inheritance.
50 }
51
52 } // namespace Glib
53
54
55 namespace Pango
56 {
57
58
59 /* The *_Class implementation: */
60
61 const Glib::Interface_Class& CairoFontMap_Class::init()
62 {
63   if(!gtype_) // create the GType if necessary
64   {
65     // Glib::Interface_Class has to know the interface init function
66     // in order to add interfaces to implementing types.
67     class_init_func_ = &CairoFontMap_Class::iface_init_function;
68
69     // We can not derive from another interface, and it is not necessary anyway.
70     gtype_ = pango_cairo_font_map_get_type();
71   }
72
73   return *this;
74 }
75
76 void CairoFontMap_Class::iface_init_function(void* g_iface, void*)
77 {
78   BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
79
80   //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
81   //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
82   g_assert(klass != 0); 
83
84 #ifdef GLIBMM_VFUNCS_ENABLED
85 #endif //GLIBMM_VFUNCS_ENABLED
86
87 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
88 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
89 }
90
91 #ifdef GLIBMM_VFUNCS_ENABLED
92 #endif //GLIBMM_VFUNCS_ENABLED
93
94 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
95 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
96
97
98 Glib::ObjectBase* CairoFontMap_Class::wrap_new(GObject* object)
99 {
100   return new CairoFontMap((PangoCairoFontMap*)(object));
101 }
102
103
104 /* The implementation: */
105
106 CairoFontMap::CairoFontMap()
107 :
108   Glib::Interface(cairofontmap_class_.init())
109 {}
110
111 CairoFontMap::CairoFontMap(PangoCairoFontMap* castitem)
112 :
113   Glib::Interface((GObject*)(castitem))
114 {}
115
116 CairoFontMap::~CairoFontMap()
117 {}
118
119 // static
120 void CairoFontMap::add_interface(GType gtype_implementer)
121 {
122   cairofontmap_class_.init().add_interface(gtype_implementer);
123 }
124
125 CairoFontMap::CppClassType CairoFontMap::cairofontmap_class_; // initialize static member
126
127 GType CairoFontMap::get_type()
128 {
129   return cairofontmap_class_.init().get_type();
130 }
131
132 GType CairoFontMap::get_base_type()
133 {
134   return pango_cairo_font_map_get_type();
135 }
136
137
138 Cairo::FontType CairoFontMap::get_font_type() const
139 {
140   return static_cast<Cairo::FontType>(pango_cairo_font_map_get_font_type(const_cast<PangoCairoFontMap*>(gobj())));
141 }
142
143 void CairoFontMap::set_resolution(double dpi)
144 {
145 pango_cairo_font_map_set_resolution(gobj(), dpi); 
146 }
147
148 double CairoFontMap::get_resolution() const
149 {
150   return pango_cairo_font_map_get_resolution(const_cast<PangoCairoFontMap*>(gobj()));
151 }
152
153 Glib::RefPtr<Context> CairoFontMap::create_context()
154 {
155   return Glib::wrap(pango_cairo_font_map_create_context(gobj()));
156 }
157
158
159 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
160 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
161
162 #ifdef GLIBMM_VFUNCS_ENABLED
163 #endif //GLIBMM_VFUNCS_ENABLED
164
165
166 } // namespace Pango
167
168