1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <giomm/menulinkiter.h>
7 #include <giomm/private/menulinkiter_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/menumodel.h>
28
29 namespace Gio
30 {
31
32 bool
get_next(Glib::ustring & out_link,Glib::RefPtr<MenuModel> & value)33 MenuLinkIter::get_next(Glib::ustring& out_link, Glib::RefPtr<MenuModel>& value)
34 {
35 const char* g_out_link = nullptr;
36 GMenuModel* g_value = nullptr;
37
38 bool const result = g_menu_link_iter_get_next(gobj(), &g_out_link, &g_value);
39 out_link = g_out_link;
40 value = Glib::wrap(g_value);
41
42 return result;
43 }
44
45 } // namespace Gio
46
47 namespace
48 {
49 } // anonymous namespace
50
51
52 namespace Glib
53 {
54
wrap(GMenuLinkIter * object,bool take_copy)55 Glib::RefPtr<Gio::MenuLinkIter> wrap(GMenuLinkIter* object, bool take_copy)
56 {
57 return Glib::RefPtr<Gio::MenuLinkIter>( dynamic_cast<Gio::MenuLinkIter*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
58 //We use dynamic_cast<> in case of multiple inheritance.
59 }
60
61 } /* namespace Glib */
62
63
64 namespace Gio
65 {
66
67
68 /* The *_Class implementation: */
69
init()70 const Glib::Class& MenuLinkIter_Class::init()
71 {
72 if(!gtype_) // create the GType if necessary
73 {
74 // Glib::Class has to know the class init function to clone custom types.
75 class_init_func_ = &MenuLinkIter_Class::class_init_function;
76
77 // This is actually just optimized away, apparently with no harm.
78 // Make sure that the parent type has been created.
79 //CppClassParent::CppObjectType::get_type();
80
81 // Create the wrapper type, with the same class/instance size as the base type.
82 register_derived_type(g_menu_link_iter_get_type());
83
84 // Add derived versions of interfaces, if the C type implements any interfaces:
85
86 }
87
88 return *this;
89 }
90
91
class_init_function(void * g_class,void * class_data)92 void MenuLinkIter_Class::class_init_function(void* g_class, void* class_data)
93 {
94 const auto klass = static_cast<BaseClassType*>(g_class);
95 CppClassParent::class_init_function(klass, class_data);
96
97
98 }
99
100
wrap_new(GObject * object)101 Glib::ObjectBase* MenuLinkIter_Class::wrap_new(GObject* object)
102 {
103 return new MenuLinkIter((GMenuLinkIter*)object);
104 }
105
106
107 /* The implementation: */
108
gobj_copy()109 GMenuLinkIter* MenuLinkIter::gobj_copy()
110 {
111 reference();
112 return gobj();
113 }
114
MenuLinkIter(const Glib::ConstructParams & construct_params)115 MenuLinkIter::MenuLinkIter(const Glib::ConstructParams& construct_params)
116 :
117 Glib::Object(construct_params)
118 {
119
120 }
121
MenuLinkIter(GMenuLinkIter * castitem)122 MenuLinkIter::MenuLinkIter(GMenuLinkIter* castitem)
123 :
124 Glib::Object((GObject*)(castitem))
125 {}
126
127
MenuLinkIter(MenuLinkIter && src)128 MenuLinkIter::MenuLinkIter(MenuLinkIter&& src) noexcept
129 : Glib::Object(std::move(src))
130 {}
131
operator =(MenuLinkIter && src)132 MenuLinkIter& MenuLinkIter::operator=(MenuLinkIter&& src) noexcept
133 {
134 Glib::Object::operator=(std::move(src));
135 return *this;
136 }
137
138
~MenuLinkIter()139 MenuLinkIter::~MenuLinkIter() noexcept
140 {}
141
142
143 MenuLinkIter::CppClassType MenuLinkIter::menulinkiter_class_; // initialize static member
144
get_type()145 GType MenuLinkIter::get_type()
146 {
147 return menulinkiter_class_.init().get_type();
148 }
149
150
get_base_type()151 GType MenuLinkIter::get_base_type()
152 {
153 return g_menu_link_iter_get_type();
154 }
155
156
MenuLinkIter()157 MenuLinkIter::MenuLinkIter()
158 :
159 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
160 Glib::ObjectBase(nullptr),
161 Glib::Object(Glib::ConstructParams(menulinkiter_class_.init()))
162 {
163
164
165 }
166
get_name() const167 Glib::ustring MenuLinkIter::get_name() const
168 {
169 return Glib::convert_const_gchar_ptr_to_ustring(g_menu_link_iter_get_name(const_cast<GMenuLinkIter*>(gobj())));
170 }
171
get_value()172 Glib::RefPtr<MenuModel> MenuLinkIter::get_value()
173 {
174 return Glib::wrap(g_menu_link_iter_get_value(gobj()));
175 }
176
get_value() const177 Glib::RefPtr<const MenuModel> MenuLinkIter::get_value() const
178 {
179 return const_cast<MenuLinkIter*>(this)->get_value();
180 }
181
next()182 bool MenuLinkIter::next()
183 {
184 return g_menu_link_iter_next(gobj());
185 }
186
187
188 } // namespace Gio
189
190
191