1 // Generated by gmmproc 2.40.0 -- DO NOT MODIFY!
2 
3 #define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
4 
5 
6 #include <glibmm.h>
7 
8 #include <cluttermm/input-device.h>
9 #include <cluttermm/private/input-device_p.h>
10 
11 
12 /* Copyright (C) 2011 The cluttermm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 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  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser 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 <cluttermm/input-device.h>
30 #include <cluttermm/stage.h>
31 
32 #include <clutter/clutter.h>
33 
34 namespace Clutter
35 {
36 
37 } // namespace Clutter
38 
39 namespace
40 {
41 } // anonymous namespace
42 
43 // static
value_type()44 GType Glib::Value<Clutter::InputAxis>::value_type()
45 {
46   return clutter_input_axis_get_type();
47 }
48 
49 // static
value_type()50 GType Glib::Value<Clutter::InputMode>::value_type()
51 {
52   return clutter_input_mode_get_type();
53 }
54 
55 // static
value_type()56 GType Glib::Value<Clutter::InputDeviceType>::value_type()
57 {
58   return clutter_input_device_type_get_type();
59 }
60 
61 // static
value_type()62 GType Glib::Value<Clutter::ModifierType>::value_type()
63 {
64   return clutter_modifier_type_get_type();
65 }
66 
67 
68 namespace Glib
69 {
70 
wrap(ClutterInputDevice * object,bool take_copy)71 Glib::RefPtr<Clutter::InputDevice> wrap(ClutterInputDevice* object, bool take_copy)
72 {
73   return Glib::RefPtr<Clutter::InputDevice>( dynamic_cast<Clutter::InputDevice*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
74   //We use dynamic_cast<> in case of multiple inheritance.
75 }
76 
77 } /* namespace Glib */
78 
79 
80 namespace Clutter
81 {
82 
83 
84 /* The *_Class implementation: */
85 
init()86 const Glib::Class& InputDevice_Class::init()
87 {
88   if(!gtype_) // create the GType if necessary
89   {
90     // Glib::Class has to know the class init function to clone custom types.
91     class_init_func_ = &InputDevice_Class::class_init_function;
92 
93     // This is actually just optimized away, apparently with no harm.
94     // Make sure that the parent type has been created.
95     //CppClassParent::CppObjectType::get_type();
96 
97     // Create the wrapper type, with the same class/instance size as the base type.
98     register_derived_type(clutter_input_device_get_type());
99 
100     // Add derived versions of interfaces, if the C type implements any interfaces:
101 
102   }
103 
104   return *this;
105 }
106 
107 
class_init_function(void * g_class,void * class_data)108 void InputDevice_Class::class_init_function(void* g_class, void* class_data)
109 {
110   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
111   CppClassParent::class_init_function(klass, class_data);
112 
113 
114 }
115 
116 
wrap_new(GObject * object)117 Glib::ObjectBase* InputDevice_Class::wrap_new(GObject* object)
118 {
119   return new InputDevice((ClutterInputDevice*)object);
120 }
121 
122 
123 /* The implementation: */
124 
gobj_copy()125 ClutterInputDevice* InputDevice::gobj_copy()
126 {
127   reference();
128   return gobj();
129 }
130 
InputDevice(const Glib::ConstructParams & construct_params)131 InputDevice::InputDevice(const Glib::ConstructParams& construct_params)
132 :
133   Glib::Object(construct_params)
134 {
135    if(gobject_ && g_object_is_floating (gobject_))
136      g_object_ref_sink(gobject_); //Stops it from being floating.
137 
138 }
139 
InputDevice(ClutterInputDevice * castitem)140 InputDevice::InputDevice(ClutterInputDevice* castitem)
141 :
142   Glib::Object((GObject*)(castitem))
143 {}
144 
145 
~InputDevice()146 InputDevice::~InputDevice()
147 {}
148 
149 
150 InputDevice::CppClassType InputDevice::inputdevice_class_; // initialize static member
151 
get_type()152 GType InputDevice::get_type()
153 {
154   return inputdevice_class_.init().get_type();
155 }
156 
157 
get_base_type()158 GType InputDevice::get_base_type()
159 {
160   return clutter_input_device_get_type();
161 }
162 
163 
InputDevice()164 InputDevice::InputDevice()
165 :
166   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
167   Glib::ObjectBase(0),
168   Glib::Object(Glib::ConstructParams(inputdevice_class_.init()))
169 {
170 
171    if(gobject_ && g_object_is_floating (gobject_))
172      g_object_ref_sink(gobject_); //Stops it from being floating.
173 
174 }
175 
get_device_id() const176 int InputDevice::get_device_id() const
177 {
178   return clutter_input_device_get_device_id(const_cast<ClutterInputDevice*>(gobj()));
179 }
180 
get_coords(ClutterEventSequence * sequence,Point & point) const181 bool InputDevice::get_coords(ClutterEventSequence * sequence, Point& point) const
182 {
183   return clutter_input_device_get_coords(const_cast<ClutterInputDevice*>(gobj()), sequence, (point).gobj());
184 }
185 
get_coords(Point & point) const186 bool InputDevice::get_coords(Point& point) const
187 {
188   return clutter_input_device_get_coords(const_cast<ClutterInputDevice*>(gobj()), 0, (point).gobj());
189 }
190 
get_modifier_state() const191 ModifierType InputDevice::get_modifier_state() const
192 {
193   return ((ModifierType)(clutter_input_device_get_modifier_state(const_cast<ClutterInputDevice*>(gobj()))));
194 }
195 
get_device_type() const196 InputDeviceType InputDevice::get_device_type() const
197 {
198   return ((InputDeviceType)(clutter_input_device_get_device_type(const_cast<ClutterInputDevice*>(gobj()))));
199 }
200 
get_device_name() const201 Glib::ustring InputDevice::get_device_name() const
202 {
203   return Glib::convert_const_gchar_ptr_to_ustring(clutter_input_device_get_device_name(const_cast<ClutterInputDevice*>(gobj())));
204 }
205 
206 #ifndef CLUTTERMM_DISABLE_DEPRECATED
207 
get_device_coords(int & x,int & y) const208 void InputDevice::get_device_coords(int & x, int & y) const
209 {
210   clutter_input_device_get_device_coords(const_cast<ClutterInputDevice*>(gobj()), &(x), &(y));
211 }
212 
213 #endif // CLUTTERMM_DISABLE_DEPRECATED
214 
get_device_mode() const215 InputMode InputDevice::get_device_mode() const
216 {
217   return ((InputMode)(clutter_input_device_get_device_mode(const_cast<ClutterInputDevice*>(gobj()))));
218 }
219 
get_has_cursor() const220 bool InputDevice::get_has_cursor() const
221 {
222   return clutter_input_device_get_has_cursor(const_cast<ClutterInputDevice*>(gobj()));
223 }
224 
set_enabled(bool enabled)225 void InputDevice::set_enabled(bool enabled)
226 {
227   clutter_input_device_set_enabled(gobj(), static_cast<int>(enabled));
228 }
229 
get_enabled() const230 bool InputDevice::get_enabled() const
231 {
232   return clutter_input_device_get_enabled(const_cast<ClutterInputDevice*>(gobj()));
233 }
234 
get_associated_device()235 Glib::RefPtr<InputDevice> InputDevice::get_associated_device()
236 {
237   Glib::RefPtr<InputDevice> retvalue = Glib::wrap(clutter_input_device_get_associated_device(gobj()));
238   if(retvalue)
239     retvalue->reference(); //The function does not do a ref for us.
240   return retvalue;
241 }
242 
get_associated_device() const243 Glib::RefPtr<const InputDevice> InputDevice::get_associated_device() const
244 {
245   return const_cast<InputDevice*>(this)->get_associated_device();
246 }
247 
keycode_to_evdev(guint hardware_keycode,guint & evdev_keycode) const248 bool InputDevice::keycode_to_evdev(guint hardware_keycode, guint& evdev_keycode) const
249 {
250   return clutter_input_device_keycode_to_evdev(const_cast<ClutterInputDevice*>(gobj()), hardware_keycode, &(evdev_keycode));
251 }
252 
get_n_keys() const253 bool InputDevice::get_n_keys() const
254 {
255   return clutter_input_device_get_n_keys(const_cast<ClutterInputDevice*>(gobj()));
256 }
257 
set_key(guint index,guint keyval,ModifierType modifiers)258 void InputDevice::set_key(guint index, guint keyval, ModifierType modifiers)
259 {
260   clutter_input_device_set_key(gobj(), index, keyval, ((ClutterModifierType)(modifiers)));
261 }
262 
get_key(guint index,guint & keyval,ModifierType & modifiers) const263 bool InputDevice::get_key(guint index, guint& keyval, ModifierType& modifiers) const
264 {
265   return clutter_input_device_get_key(const_cast<ClutterInputDevice*>(gobj()), index, &(keyval), (ClutterModifierType*)(&(modifiers)));
266 }
267 
get_n_axes()268 guint InputDevice::get_n_axes()
269 {
270   return clutter_input_device_get_n_axes(gobj());
271 }
272 
get_axis(guint index_)273 InputAxis InputDevice::get_axis(guint index_)
274 {
275   return ((InputAxis)(clutter_input_device_get_axis(gobj(), index_)));
276 }
277 
get_pointer_actor()278 Glib::RefPtr<Actor> InputDevice::get_pointer_actor()
279 {
280   Glib::RefPtr<Actor> retvalue = Glib::wrap(clutter_input_device_get_pointer_actor(gobj()));
281   if(retvalue)
282     retvalue->reference(); //The function does not do a ref for us.
283   return retvalue;
284 }
285 
get_pointer_actor() const286 Glib::RefPtr<const Actor> InputDevice::get_pointer_actor() const
287 {
288   return const_cast<InputDevice*>(this)->get_pointer_actor();
289 }
290 
get_pointer_stage()291 Glib::RefPtr<Stage> InputDevice::get_pointer_stage()
292 {
293   Glib::RefPtr<Stage> retvalue = Glib::wrap(clutter_input_device_get_pointer_stage(gobj()));
294   if(retvalue)
295     retvalue->reference(); //The function does not do a ref for us.
296   return retvalue;
297 }
298 
get_pointer_stage() const299 Glib::RefPtr<const Stage> InputDevice::get_pointer_stage() const
300 {
301   return const_cast<InputDevice*>(this)->get_pointer_stage();
302 }
303 
grab(const Glib::RefPtr<const Actor> & actor)304 void InputDevice::grab(const Glib::RefPtr<const Actor>& actor)
305 {
306   clutter_input_device_grab(gobj(), const_cast<ClutterActor*>(Glib::unwrap(actor)));
307 }
308 
ungrab()309 void InputDevice::ungrab()
310 {
311   clutter_input_device_ungrab(gobj());
312 }
313 
314 
315 #ifdef GLIBMM_PROPERTIES_ENABLED
property_backend() const316 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Backend> > InputDevice::property_backend() const
317 {
318   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Backend> >(this, "backend");
319 }
320 #endif //GLIBMM_PROPERTIES_ENABLED
321 
322 #ifdef GLIBMM_PROPERTIES_ENABLED
property_device_manager() const323 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DeviceManager> > InputDevice::property_device_manager() const
324 {
325   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<DeviceManager> >(this, "device-manager");
326 }
327 #endif //GLIBMM_PROPERTIES_ENABLED
328 
329 #ifdef GLIBMM_PROPERTIES_ENABLED
property_device_mode() const330 Glib::PropertyProxy_ReadOnly< InputMode > InputDevice::property_device_mode() const
331 {
332   return Glib::PropertyProxy_ReadOnly< InputMode >(this, "device-mode");
333 }
334 #endif //GLIBMM_PROPERTIES_ENABLED
335 
336 #ifdef GLIBMM_PROPERTIES_ENABLED
property_device_type() const337 Glib::PropertyProxy_ReadOnly< InputDeviceType > InputDevice::property_device_type() const
338 {
339   return Glib::PropertyProxy_ReadOnly< InputDeviceType >(this, "device-type");
340 }
341 #endif //GLIBMM_PROPERTIES_ENABLED
342 
343 #ifdef GLIBMM_PROPERTIES_ENABLED
property_enabled()344 Glib::PropertyProxy< bool > InputDevice::property_enabled()
345 {
346   return Glib::PropertyProxy< bool >(this, "enabled");
347 }
348 #endif //GLIBMM_PROPERTIES_ENABLED
349 
350 #ifdef GLIBMM_PROPERTIES_ENABLED
property_enabled() const351 Glib::PropertyProxy_ReadOnly< bool > InputDevice::property_enabled() const
352 {
353   return Glib::PropertyProxy_ReadOnly< bool >(this, "enabled");
354 }
355 #endif //GLIBMM_PROPERTIES_ENABLED
356 
357 #ifdef GLIBMM_PROPERTIES_ENABLED
property_has_cursor() const358 Glib::PropertyProxy_ReadOnly< bool > InputDevice::property_has_cursor() const
359 {
360   return Glib::PropertyProxy_ReadOnly< bool >(this, "has-cursor");
361 }
362 #endif //GLIBMM_PROPERTIES_ENABLED
363 
364 #ifdef GLIBMM_PROPERTIES_ENABLED
property_id() const365 Glib::PropertyProxy_ReadOnly< int > InputDevice::property_id() const
366 {
367   return Glib::PropertyProxy_ReadOnly< int >(this, "id");
368 }
369 #endif //GLIBMM_PROPERTIES_ENABLED
370 
371 #ifdef GLIBMM_PROPERTIES_ENABLED
property_n_axes() const372 Glib::PropertyProxy_ReadOnly< int > InputDevice::property_n_axes() const
373 {
374   return Glib::PropertyProxy_ReadOnly< int >(this, "n-axes");
375 }
376 #endif //GLIBMM_PROPERTIES_ENABLED
377 
378 #ifdef GLIBMM_PROPERTIES_ENABLED
property_name() const379 Glib::PropertyProxy_ReadOnly< Glib::ustring > InputDevice::property_name() const
380 {
381   return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "name");
382 }
383 #endif //GLIBMM_PROPERTIES_ENABLED
384 
385 
386 } // namespace Clutter
387 
388 
389