1 // Generated by gtkmmproc -- DO NOT MODIFY!
4 #include <giomm/desktopappinfo.h>
5 #include <giomm/private/desktopappinfo_p.h>
7 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
9 /* Copyright (C) 2007 The gtkmm Development Team
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.
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.
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.
27 #include <gio/gdesktopappinfo.h>
31 } // anonymous namespace
37 Glib::RefPtr<Gio::DesktopAppInfo> wrap(GDesktopAppInfo* object, bool take_copy)
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.
43 } /* namespace Glib */
50 /* The *_Class implementation: */
52 const Glib::Class& DesktopAppInfo_Class::init()
54 if(!gtype_) // create the GType if necessary
56 // Glib::Class has to know the class init function to clone custom types.
57 class_init_func_ = &DesktopAppInfo_Class::class_init_function;
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();
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());
66 // Add derived versions of interfaces, if the C type implements any interfaces:
67 AppInfo::add_interface(get_type());
74 void DesktopAppInfo_Class::class_init_function(void* g_class, void* class_data)
76 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
77 CppClassParent::class_init_function(klass, class_data);
79 #ifdef GLIBMM_VFUNCS_ENABLED
80 #endif //GLIBMM_VFUNCS_ENABLED
82 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
83 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
86 #ifdef GLIBMM_VFUNCS_ENABLED
87 #endif //GLIBMM_VFUNCS_ENABLED
89 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
90 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
93 Glib::ObjectBase* DesktopAppInfo_Class::wrap_new(GObject* object)
95 return new DesktopAppInfo((GDesktopAppInfo*)object);
99 /* The implementation: */
101 GDesktopAppInfo* DesktopAppInfo::gobj_copy()
107 DesktopAppInfo::DesktopAppInfo(const Glib::ConstructParams& construct_params)
109 Glib::Object(construct_params)
114 DesktopAppInfo::DesktopAppInfo(GDesktopAppInfo* castitem)
116 Glib::Object((GObject*)(castitem))
120 DesktopAppInfo::~DesktopAppInfo()
124 DesktopAppInfo::CppClassType DesktopAppInfo::desktopappinfo_class_; // initialize static member
126 GType DesktopAppInfo::get_type()
128 return desktopappinfo_class_.init().get_type();
131 GType DesktopAppInfo::get_base_type()
133 return g_desktop_app_info_get_type();
137 DesktopAppInfo::DesktopAppInfo(const std::string& desktop_id)
139 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
141 Glib::Object(Glib::ConstructParams(desktopappinfo_class_.init(), "desktop_id", desktop_id.c_str(), static_cast<char*>(0)))
147 Glib::RefPtr<DesktopAppInfo> DesktopAppInfo::create(const std::string& desktop_id)
149 return Glib::RefPtr<DesktopAppInfo>( new DesktopAppInfo(desktop_id) );
151 Glib::RefPtr<DesktopAppInfo> DesktopAppInfo::create_from_filename(const std::string& filename)
153 return Glib::wrap(g_desktop_app_info_new_from_filename(filename.c_str()));
157 bool DesktopAppInfo::is_hidden() const
159 return g_desktop_app_info_get_is_hidden(const_cast<GDesktopAppInfo*>(gobj()));
162 void DesktopAppInfo::set_desktop_env(const std::string& desktop_env)
164 g_desktop_app_info_set_desktop_env(desktop_env.c_str());
168 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
169 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
171 #ifdef GLIBMM_VFUNCS_ENABLED
172 #endif //GLIBMM_VFUNCS_ENABLED