Code

0b532aae28a979dd82b5272d2ff9481976e1f13d
[inkscape.git] / src / device-manager.h
1 /*
2  * Inkscape::DeviceManager - a view of input devices available.
3  *
4  * Copyright 2006  Jon A. Cruz  <jon@joncruz.org>
5  *
6  * Released under GNU GPL, read the file 'COPYING' for more information
7  */
9 #ifndef SEEN_INKSCAPE_DEVICE_MANAGER_H
10 #define SEEN_INKSCAPE_DEVICE_MANAGER_H
13 #include <list>
14 #include <glibmm/ustring.h>
15 #include <gdkmm/device.h>
17 namespace Inkscape {
19 class InputDevice {
20 public:
21     virtual Glib::ustring getName() const = 0;
22     virtual Gdk::InputSource getSource() const = 0;
23     virtual Gdk::InputMode getMode() const = 0;
24     virtual bool hasCursor() const = 0;
25     virtual gint getNumAxes() const = 0;
26     virtual gint getNumKeys() const = 0;
28 protected:
29     InputDevice();
30     virtual ~InputDevice();
32 private:
33     InputDevice(InputDevice const &); // no copy
34     void operator=(InputDevice const &); // no assign
35 };
37 class DeviceManager {
38 public:
39     static DeviceManager& getManager();
41     virtual std::list<InputDevice const *> getDevices() = 0;
43 protected:
44     DeviceManager();
45     virtual ~DeviceManager();
47 private:
48     DeviceManager(DeviceManager const &); // no copy
49     void operator=(DeviceManager const &); // no assign
50 };
54 } // namespace Inkscape
56 #endif // SEEN_INKSCAPE_DEVICE_MANAGER_H
58 /*
59   Local Variables:
60   mode:c++
61   c-file-style:"stroustrup"
62   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
63   indent-tabs-mode:nil
64   fill-column:99
65   End:
66 */
67 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :