1 /* === S I N F G =========================================================== */
2 /*! \file devicetracker.cpp
3 ** \brief Template File
5 ** $Id: devicetracker.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === H E A D E R S ======================================================= */
31 #include "devicetracker.h"
32 #include <gdkmm/device.h>
33 #include <sinfgapp/main.h>
37 /* === U S I N G =========================================================== */
41 using namespace sinfg;
42 using namespace studio;
44 /* === M A C R O S ========================================================= */
46 /* === G L O B A L S ======================================================= */
48 /* === P R O C E D U R E S ================================================= */
50 /* === M E T H O D S ======================================================= */
52 DeviceTracker::DeviceTracker()
54 // By default, set the input mode on devices to
59 device_list=gdk_devices_list();
61 for(iter=device_list;iter;iter=g_list_next(iter))
63 GdkDevice* device=reinterpret_cast<GdkDevice*>(iter->data);
64 gdk_device_set_mode(device,GDK_MODE_SCREEN);
66 sinfgapp::InputDevice::Handle input_device;
67 input_device=sinfgapp::Main::add_input_device(device->name,sinfgapp::InputDevice::Type(device->source));
68 if(input_device->get_type()==sinfgapp::InputDevice::TYPE_MOUSE)
69 sinfgapp::Main::select_input_device(input_device);
74 DeviceTracker::~DeviceTracker()