1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <giomm/dbusmenumodel.h>
7 #include <giomm/private/dbusmenumodel_p.h>
8
9
10 /* Copyright (C) 2012 The giomm Development Team
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26 #include <gio/gio.h>
27 #include <giomm/dbusconnection.h>
28
29 namespace Gio
30 {
31
32 } // namespace Gio
33
34 namespace
35 {
36 } // anonymous namespace
37
38
39 namespace Glib
40 {
41
wrap(GDBusMenuModel * object,bool take_copy)42 Glib::RefPtr<Gio::DBus::MenuModel> wrap(GDBusMenuModel* object, bool take_copy)
43 {
44 return Glib::RefPtr<Gio::DBus::MenuModel>( dynamic_cast<Gio::DBus::MenuModel*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
45 //We use dynamic_cast<> in case of multiple inheritance.
46 }
47
48 } /* namespace Glib */
49
50
51 namespace Gio
52 {
53
54 namespace DBus
55 {
56
57
58 /* The *_Class implementation: */
59
init()60 const Glib::Class& MenuModel_Class::init()
61 {
62 if(!gtype_) // create the GType if necessary
63 {
64 // Glib::Class has to know the class init function to clone custom types.
65 class_init_func_ = &MenuModel_Class::class_init_function;
66
67 // This is actually just optimized away, apparently with no harm.
68 // Make sure that the parent type has been created.
69 //CppClassParent::CppObjectType::get_type();
70
71 // Create the wrapper type, with the same class/instance size as the base type.
72 register_derived_type(g_dbus_menu_model_get_type());
73
74 // Add derived versions of interfaces, if the C type implements any interfaces:
75
76 }
77
78 return *this;
79 }
80
81
class_init_function(void * g_class,void * class_data)82 void MenuModel_Class::class_init_function(void* g_class, void* class_data)
83 {
84 const auto klass = static_cast<BaseClassType*>(g_class);
85 CppClassParent::class_init_function(klass, class_data);
86
87
88 }
89
90
wrap_new(GObject * object)91 Glib::ObjectBase* MenuModel_Class::wrap_new(GObject* object)
92 {
93 return new MenuModel((GDBusMenuModel*)object);
94 }
95
96
97 /* The implementation: */
98
gobj_copy()99 GDBusMenuModel* MenuModel::gobj_copy()
100 {
101 reference();
102 return gobj();
103 }
104
MenuModel(const Glib::ConstructParams & construct_params)105 MenuModel::MenuModel(const Glib::ConstructParams& construct_params)
106 :
107 ::Gio::MenuModel(construct_params)
108 {
109
110 }
111
MenuModel(GDBusMenuModel * castitem)112 MenuModel::MenuModel(GDBusMenuModel* castitem)
113 :
114 ::Gio::MenuModel((GMenuModel*)(castitem))
115 {}
116
117
MenuModel(MenuModel && src)118 MenuModel::MenuModel(MenuModel&& src) noexcept
119 : ::Gio::MenuModel(std::move(src))
120 {}
121
operator =(MenuModel && src)122 MenuModel& MenuModel::operator=(MenuModel&& src) noexcept
123 {
124 ::Gio::MenuModel::operator=(std::move(src));
125 return *this;
126 }
127
128
~MenuModel()129 MenuModel::~MenuModel() noexcept
130 {}
131
132
133 MenuModel::CppClassType MenuModel::menumodel_class_; // initialize static member
134
get_type()135 GType MenuModel::get_type()
136 {
137 return menumodel_class_.init().get_type();
138 }
139
140
get_base_type()141 GType MenuModel::get_base_type()
142 {
143 return g_dbus_menu_model_get_type();
144 }
145
146
MenuModel()147 MenuModel::MenuModel()
148 :
149 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
150 Glib::ObjectBase(nullptr),
151 ::Gio::MenuModel(Glib::ConstructParams(menumodel_class_.init()))
152 {
153
154
155 }
156
get(const Glib::RefPtr<Connection> & connection,const Glib::ustring & bus_name,const Glib::ustring & object_path)157 Glib::RefPtr<MenuModel> MenuModel::get(const Glib::RefPtr<Connection>& connection, const Glib::ustring& bus_name, const Glib::ustring& object_path)
158 {
159 return Glib::wrap(g_dbus_menu_model_get(Glib::unwrap(connection), bus_name.c_str(), object_path.c_str()));
160 }
161
162
163 } // namespace DBus
164
165 } // namespace Gio
166
167
168