]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkdevice.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gdk / gdkdevice.h
index ecce89a338e7cd1f4c853dfec285ebf0a82f1f2f..c620905a60e5003632f35ecb548e4031ee0cbb6a 100644 (file)
  * 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>
 
 
@@ -35,23 +33,6 @@ G_BEGIN_DECLS
 
 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
@@ -61,6 +42,10 @@ typedef enum
  *                     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.
  */
@@ -70,7 +55,9 @@ typedef enum
   GDK_SOURCE_PEN,
   GDK_SOURCE_ERASER,
   GDK_SOURCE_CURSOR,
-  GDK_SOURCE_KEYBOARD
+  GDK_SOURCE_KEYBOARD,
+  GDK_SOURCE_TOUCHSCREEN,
+  GDK_SOURCE_TOUCHPAD
 } GdkInputSource;
 
 /**
@@ -99,7 +86,7 @@ typedef enum
  * @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.
  *
@@ -156,13 +143,11 @@ struct _GdkTimeCoord
 
 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,
@@ -193,6 +178,11 @@ void     gdk_device_get_position (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,