* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef __GDK_DEVICE_H__
+#define __GDK_DEVICE_H__
+
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
-#ifndef __GDK_DEVICE_H__
-#define __GDK_DEVICE_H__
-
#include <gdk/gdktypes.h>
typedef struct _GdkTimeCoord GdkTimeCoord;
-/**
- * GdkExtensionMode:
- * @GDK_EXTENSION_EVENTS_NONE: no extension events are desired.
- * @GDK_EXTENSION_EVENTS_ALL: all extension events are desired.
- * @GDK_EXTENSION_EVENTS_CURSOR: extension events are desired only if a cursor
- * will be displayed for the device.
- *
- * An enumeration used to specify which extension events
- * are desired for a particular widget.
- */
-typedef enum
-{
- GDK_EXTENSION_EVENTS_NONE,
- GDK_EXTENSION_EVENTS_ALL,
- GDK_EXTENSION_EVENTS_CURSOR
-} GdkExtensionMode;
-
/**
* GdkInputSource:
* @GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core
* of a stylus on a graphics tablet.
* @GDK_SOURCE_CURSOR: the device is a graphics tablet "puck" or similar device.
* @GDK_SOURCE_KEYBOARD: the device is a keyboard.
+ * @GDK_SOURCE_TOUCHSCREEN: the device is a direct-input touch device, such
+ * as a touchscreen or tablet. This device type has been added in 3.4.
+ * @GDK_SOURCE_TOUCHPAD: the device is an indirect touch device, such
+ * as a touchpad. This device type has been added in 3.4.
*
* An enumeration describing the type of an input device in general terms.
*/
GDK_SOURCE_PEN,
GDK_SOURCE_ERASER,
GDK_SOURCE_CURSOR,
- GDK_SOURCE_KEYBOARD
+ GDK_SOURCE_KEYBOARD,
+ GDK_SOURCE_TOUCHSCREEN,
+ GDK_SOURCE_TOUCHPAD
} GdkInputSource;
/**
* @GDK_AXIS_Y: the axis is used as the y axis.
* @GDK_AXIS_PRESSURE: the axis is used for pressure information.
* @GDK_AXIS_XTILT: the axis is used for x tilt information.
- * @GDK_AXIS_YTILT: the axis is used for x tilt information.
+ * @GDK_AXIS_YTILT: the axis is used for y tilt information.
* @GDK_AXIS_WHEEL: the axis is used for wheel information.
* @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
*
GType gdk_device_get_type (void) G_GNUC_CONST;
-G_CONST_RETURN gchar *gdk_device_get_name (GdkDevice *device);
+const gchar * gdk_device_get_name (GdkDevice *device);
gboolean gdk_device_get_has_cursor (GdkDevice *device);
/* Functions to configure a device */
GdkInputSource gdk_device_get_source (GdkDevice *device);
-void gdk_device_set_source (GdkDevice *device,
- GdkInputSource source);
GdkInputMode gdk_device_get_mode (GdkDevice *device);
gboolean gdk_device_set_mode (GdkDevice *device,
GdkScreen **screen,
gint *x,
gint *y);
+GdkWindow *
+ gdk_device_get_window_at_position
+ (GdkDevice *device,
+ gint *win_x,
+ gint *win_y);
gboolean gdk_device_get_history (GdkDevice *device,
GdkWindow *window,
guint32 start,