Ardour  9.0-pre0-350-gf17a656217
device.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_DEVICE_H
4 #define _GDKMM_DEVICE_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: device.hg,v 1.3 2004/02/10 17:29:54 mxpxpod Exp $ */
11 
12 /* Copyright (C) 2002-2004 The gtkmm 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 <gdkmm/window.h>
30 #include <gdkmm/event.h>
31 
32 //#include <gdkmm/display.h>
33 #include <gdk/gdk.h>
34 
35 
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _GdkDevice GdkDevice;
38 typedef struct _GdkDeviceClass GdkDeviceClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 
41 
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 namespace Gdk
44 { class Device_Class; } // namespace Gdk
45 #endif //DOXYGEN_SHOULD_SKIP_THIS
46 
47 namespace Gdk
48 {
49 
57 {
61 };
62 
63 } // namespace Gdk
64 
65 
66 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 namespace Glib
68 {
69 
70 template <>
71 class Value<Gdk::InputMode> : public Glib::Value_Enum<Gdk::InputMode>
72 {
73 public:
74  static GType value_type() G_GNUC_CONST;
75 };
76 
77 } // namespace Glib
78 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79 
80 
81 namespace Gdk
82 {
83 
89 {
94 };
95 
96 } // namespace Gdk
97 
98 
99 #ifndef DOXYGEN_SHOULD_SKIP_THIS
100 namespace Glib
101 {
102 
103 template <>
104 class Value<Gdk::InputSource> : public Glib::Value_Enum<Gdk::InputSource>
105 {
106 public:
107  static GType value_type() G_GNUC_CONST;
108 };
109 
110 } // namespace Glib
111 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
112 
113 
114 namespace Gdk
115 {
116 
117 
118 class Display;
119 
123 class Device : public Glib::Object
124 {
125 
126 #ifndef DOXYGEN_SHOULD_SKIP_THIS
127 
128 public:
129  typedef Device CppObjectType;
130  typedef Device_Class CppClassType;
131  typedef GdkDevice BaseObjectType;
132  typedef GdkDeviceClass BaseClassType;
133 
134 private: friend class Device_Class;
135  static CppClassType device_class_;
136 
137 private:
138  // noncopyable
139  Device(const Device&);
140  Device& operator=(const Device&);
141 
142 protected:
143  explicit Device(const Glib::ConstructParams& construct_params);
144  explicit Device(GdkDevice* castitem);
145 
146 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
147 
148 public:
149  virtual ~Device();
150 
153  static GType get_type() G_GNUC_CONST;
154 
155 #ifndef DOXYGEN_SHOULD_SKIP_THIS
156 
157 
158  static GType get_base_type() G_GNUC_CONST;
159 #endif
160 
162  GdkDevice* gobj() { return reinterpret_cast<GdkDevice*>(gobject_); }
163 
165  const GdkDevice* gobj() const { return reinterpret_cast<GdkDevice*>(gobject_); }
166 
169 
170 private:
171 
172 
173 protected:
175 
176 public:
177 
178 
179  void set_source(InputSource source);
180 
181  bool set_mode(InputMode mode);
182 
190  void get_key(guint index, guint& keyval, ModifierType& modifiers) const;
191 
192  void set_key(guint index, guint keyval, ModifierType modifiers);
193 
199  AxisUse get_axis_use(guint index) const;
200 
201  void set_axis_use(guint index_, AxisUse use);
202 
210  void get_state(const Glib::RefPtr<Window>& window, double& axes, ModifierType& mask);
211 
227  bool get_history(const Glib::RefPtr<Window>& window, guint32 start, guint32 stop, GdkTimeCoord**& events, int& n_events);
228 
237  bool get_axis(double& axes, AxisUse use, double& value) const;
238 
239 
244  Glib::ustring get_name() const;
245 
251 
257 
262  bool get_has_cursor() const;
263 
264 
269  gint get_n_axes() const;
270 
271 
272 public:
273 
274 public:
275  //C++ methods used to invoke GTK+ virtual functions:
276 
277 protected:
278  //GTK+ Virtual Functions (override these to change behaviour):
279 
280  //Default Signal Handlers::
281 
282 
283 };
284 
285 } // namespace Gdk
286 
287 
288 namespace Glib
289 {
298  Glib::RefPtr<Gdk::Device> wrap(GdkDevice* object, bool take_copy = false);
299 }
300 
301 
302 #endif /* _GDKMM_DEVICE_H */
303 
gint get_n_axes() const
AxisUse get_axis_use(guint index) const
Glib::ustring get_name() const
bool set_mode(InputMode mode)
void set_axis_use(guint index_, AxisUse use)
static GType get_type() G_GNUC_CONST
bool get_has_cursor() const
InputSource get_source() const
Glib::RefPtr< Gdk::Device > wrap(GdkDevice *object, bool take_copy=false)
bool get_history(const Glib::RefPtr< Window > &window, guint32 start, guint32 stop, GdkTimeCoord **&events, int &n_events)
virtual ~Device()
void set_source(InputSource source)
void get_state(const Glib::RefPtr< Window > &window, double &axes, ModifierType &mask)
void set_key(guint index, guint keyval, ModifierType modifiers)
InputMode get_mode() const
GdkDevice * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
GdkDevice * gobj()
Provides access to the underlying C GObject.
Definition: device.h:162
const GdkDevice * gobj() const
Provides access to the underlying C GObject.
Definition: device.h:165
void get_key(guint index, guint &keyval, ModifierType &modifiers) const
bool get_axis(double &axes, AxisUse use, double &value) const
InputSource
Definition: device.h:89
AxisUse
Definition: event.h:160
InputMode
Definition: device.h:57
@ SOURCE_CURSOR
Definition: device.h:93
@ SOURCE_PEN
Definition: device.h:91
@ SOURCE_MOUSE
Definition: device.h:90
@ SOURCE_ERASER
Definition: device.h:92
@ MODE_SCREEN
Definition: device.h:59
@ MODE_DISABLED
Definition: device.h:58
@ MODE_WINDOW
Definition: device.h:60
PBD::PropertyDescriptor< timepos_t > start
Definition: lobject.h:100