]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkdevice.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gdk / gdkdevice.c
index 693cedb9b228c8a7992dca3cf21b17ca5180f05c..3147d9e6a0a5be5e9f6ef08946942b03bd7b90ac 100644 (file)
@@ -939,7 +939,7 @@ GList *
 gdk_device_list_slave_devices (GdkDevice *device)
 {
   g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
-  g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER, NULL);
+  g_return_val_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER, NULL);
 
   return g_list_copy (device->slaves);
 }
@@ -1369,6 +1369,29 @@ _gdk_device_add_axis (GdkDevice   *device,
   return pos;
 }
 
+void
+_gdk_device_get_axis_info (GdkDevice   *device,
+                          guint        index_,
+                          GdkAtom      *label_atom,
+                          GdkAxisUse   *use,
+                          gdouble      *min_value,
+                          gdouble      *max_value,
+                          gdouble      *resolution)
+{
+  GdkAxisInfo *info;
+
+  g_return_if_fail (GDK_IS_DEVICE (device));
+  g_return_if_fail (index_ < device->axes->len);
+
+  info = &g_array_index (device->axes, GdkAxisInfo, index_);
+
+  *label_atom = info->label;
+  *use = info->use;
+  *min_value = info->min_value;
+  *max_value = info->max_value;
+  *resolution = info->resolution;
+}
+
 void
 _gdk_device_set_keys (GdkDevice *device,
                       guint      num_keys)
@@ -1588,7 +1611,7 @@ _gdk_device_translate_axis (GdkDevice *device,
   return TRUE;
 }
 
-gboolean
+void
 _gdk_device_query_state (GdkDevice        *device,
                          GdkWindow        *window,
                          GdkWindow       **root_window,
@@ -1599,15 +1622,15 @@ _gdk_device_query_state (GdkDevice        *device,
                          gint             *win_y,
                          GdkModifierType  *mask)
 {
-  return GDK_DEVICE_GET_CLASS (device)->query_state (device,
-                                                     window,
-                                                     root_window,
-                                                     child_window,
-                                                     root_x,
-                                                     root_y,
-                                                     win_x,
-                                                     win_y,
-                                                     mask);
+  GDK_DEVICE_GET_CLASS (device)->query_state (device,
+                                              window,
+                                              root_window,
+                                              child_window,
+                                              root_x,
+                                              root_y,
+                                              win_x,
+                                              win_y,
+                                              mask);
 }
 
 GdkWindow *