Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / glibmm2 / gio / giomm / desktopappinfo.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3
4 #include <giomm/desktopappinfo.h>
5 #include <giomm/private/desktopappinfo_p.h>
6
7 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
8
9 /* Copyright (C) 2007 The gtkmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25
26 #include <gio/gio.h>
27 #include <gio/gdesktopappinfo.h>
28
29 namespace
30 {
31 } // anonymous namespace
32
33
34 namespace Glib
35 {
36
37 Glib::RefPtr<Gio::DesktopAppInfo> wrap(GDesktopAppInfo* object, bool take_copy)
38 {
39   return Glib::RefPtr<Gio::DesktopAppInfo>( dynamic_cast<Gio::DesktopAppInfo*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
40   //We use dynamic_cast<> in case of multiple inheritance.
41 }
42
43 } /* namespace Glib */
44
45
46 namespace Gio
47 {
48
49
50 /* The *_Class implementation: */
51
52 const Glib::Class& DesktopAppInfo_Class::init()
53 {
54   if(!gtype_) // create the GType if necessary
55   {
56     // Glib::Class has to know the class init function to clone custom types.
57     class_init_func_ = &DesktopAppInfo_Class::class_init_function;
58
59     // This is actually just optimized away, apparently with no harm.
60     // Make sure that the parent type has been created.
61     //CppClassParent::CppObjectType::get_type();
62
63     // Create the wrapper type, with the same class/instance size as the base type.
64     register_derived_type(g_desktop_app_info_get_type());
65
66     // Add derived versions of interfaces, if the C type implements any interfaces:
67   AppInfo::add_interface(get_type());
68
69   }
70
71   return *this;
72 }
73
74 void DesktopAppInfo_Class::class_init_function(void* g_class, void* class_data)
75 {
76   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
77   CppClassParent::class_init_function(klass, class_data);
78
79 #ifdef GLIBMM_VFUNCS_ENABLED
80 #endif //GLIBMM_VFUNCS_ENABLED
81
82 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
83 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
84 }
85
86 #ifdef GLIBMM_VFUNCS_ENABLED
87 #endif //GLIBMM_VFUNCS_ENABLED
88
89 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
90 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
91
92
93 Glib::ObjectBase* DesktopAppInfo_Class::wrap_new(GObject* object)
94 {
95   return new DesktopAppInfo((GDesktopAppInfo*)object);
96 }
97
98
99 /* The implementation: */
100
101 GDesktopAppInfo* DesktopAppInfo::gobj_copy()
102 {
103   reference();
104   return gobj();
105 }
106
107 DesktopAppInfo::DesktopAppInfo(const Glib::ConstructParams& construct_params)
108 :
109   Glib::Object(construct_params)
110 {
111
112 }
113
114 DesktopAppInfo::DesktopAppInfo(GDesktopAppInfo* castitem)
115 :
116   Glib::Object((GObject*)(castitem))
117 {}
118
119
120 DesktopAppInfo::~DesktopAppInfo()
121 {}
122
123
124 DesktopAppInfo::CppClassType DesktopAppInfo::desktopappinfo_class_; // initialize static member
125
126 GType DesktopAppInfo::get_type()
127 {
128   return desktopappinfo_class_.init().get_type();
129 }
130
131 GType DesktopAppInfo::get_base_type()
132 {
133   return g_desktop_app_info_get_type();
134 }
135
136
137 DesktopAppInfo::DesktopAppInfo(const std::string& desktop_id)
138 :
139   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
140   Glib::ObjectBase(0),
141   Glib::Object(Glib::ConstructParams(desktopappinfo_class_.init(), "desktop_id", desktop_id.c_str(), static_cast<char*>(0)))
142 {
143   
144
145 }
146
147 Glib::RefPtr<DesktopAppInfo> DesktopAppInfo::create(const std::string& desktop_id)
148 {
149   return Glib::RefPtr<DesktopAppInfo>( new DesktopAppInfo(desktop_id) );
150 }
151 Glib::RefPtr<DesktopAppInfo> DesktopAppInfo::create_from_filename(const std::string& filename)
152 {
153   return Glib::wrap(g_desktop_app_info_new_from_filename(filename.c_str()));
154 }
155
156
157 bool DesktopAppInfo::is_hidden() const
158 {
159   return g_desktop_app_info_get_is_hidden(const_cast<GDesktopAppInfo*>(gobj()));
160 }
161
162 void DesktopAppInfo::set_desktop_env(const std::string& desktop_env)
163 {
164 g_desktop_app_info_set_desktop_env(desktop_env.c_str());
165 }
166
167
168 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
169 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
170
171 #ifdef GLIBMM_VFUNCS_ENABLED
172 #endif //GLIBMM_VFUNCS_ENABLED
173
174
175 } // namespace Gio
176
177