1/* Copyright (C) 2011 The cluttermm Development Team 2 * 3 * This library is free software; you can redistribute it and/or 4 * modify it under the terms of the GNU Lesser General Public 5 * License as published by the Free Software Foundation; either 6 * version 2.1 of the License, or (at your option) any later version. 7 * 8 * This library is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public 14 * License along with this library; if not, write to the Free 15 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 */ 17 18#include <cluttermm/types.h> 19#include <cluttermm/backend.h> 20#include <cluttermm/input-device.h> 21 22_DEFS(cluttermm,clutter) 23_PINCLUDE(glibmm/private/object_p.h) 24 25namespace Clutter 26{ 27 28class DeviceManager : public Glib::Object 29{ 30 _CLASS_GOBJECT(DeviceManager, ClutterDeviceManager, CLUTTER_DEVICE_MANAGER, Glib::Object, GObject) 31 _DERIVES_INITIALLY_UNOWNED() 32protected: 33 _CTOR_DEFAULT() 34 35public: 36 37 _WRAP_METHOD(static Glib::RefPtr<DeviceManager> get_default(), clutter_device_manager_get_default, refreturn) 38 39#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<InputDevice> >',`Glib::SListHandler< Glib::RefPtr<InputDevice> >::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)') 40 _WRAP_METHOD(std::vector< Glib::RefPtr<InputDevice> > list_devices(), clutter_device_manager_list_devices) 41 42#m4 _CONVERSION(`const GSList*',`std::vector< Glib::RefPtr<const InputDevice> >',`Glib::SListHandler< Glib::RefPtr<const InputDevice> >::slist_to_vector(const_cast<GSList*>($3), Glib::OWNERSHIP_SHALLOW)') 43 _WRAP_METHOD(std::vector< Glib::RefPtr<const InputDevice> > list_devices() const, clutter_device_manager_peek_devices) 44 45 _WRAP_METHOD(Glib::RefPtr<InputDevice> get_device(int device_id), clutter_device_manager_get_device, refreturn) 46 _WRAP_METHOD(Glib::RefPtr<const InputDevice> get_device(int device_id) const, clutter_device_manager_get_device, refreturn, constversion) 47 48 _WRAP_METHOD(Glib::RefPtr<InputDevice> get_core_device(InputDeviceType device_type), clutter_device_manager_get_core_device, refreturn) 49 _WRAP_METHOD(Glib::RefPtr<const InputDevice> get_core_device(InputDeviceType device_type) const, clutter_device_manager_get_core_device, refreturn, constversion) 50 51 _IGNORE(clutter_get_input_device_for_id)// deprecated. 52 53 _WRAP_PROPERTY("backend", Glib::RefPtr<Backend>) 54}; 55 56} // namespace Clutter 57