[gimp] app: add gimp_device_info_has_cursor() as replacement for GdkDevice.has_cursor



commit 6932a6d0114f357ad0740e804b16b2a82d552803
Author: Michael Natterer <mitch gimp org>
Date:   Tue Feb 16 12:11:22 2010 +0100

    app: add gimp_device_info_has_cursor() as replacement for GdkDevice.has_cursor

 app/widgets/gimpdeviceinfo.c |   11 +++++++++++
 app/widgets/gimpdeviceinfo.h |    2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 64b0cc3..10cde7d 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -636,6 +636,17 @@ gimp_device_info_set_mode (GimpDeviceInfo *info,
     }
 }
 
+gboolean
+gimp_device_info_has_cursor (GimpDeviceInfo *info)
+{
+  g_return_val_if_fail (GIMP_IS_DEVICE_INFO (info), FALSE);
+
+  if (info->device)
+    return info->device->has_cursor;
+
+  return FALSE;
+}
+
 gint
 gimp_device_info_get_n_axes (GimpDeviceInfo *info)
 {
diff --git a/app/widgets/gimpdeviceinfo.h b/app/widgets/gimpdeviceinfo.h
index e745105..c235b36 100644
--- a/app/widgets/gimpdeviceinfo.h
+++ b/app/widgets/gimpdeviceinfo.h
@@ -89,6 +89,8 @@ GdkInputMode     gimp_device_info_get_mode          (GimpDeviceInfo  *info);
 void             gimp_device_info_set_mode          (GimpDeviceInfo  *info,
                                                      GdkInputMode     mode);
 
+gboolean         gimp_device_info_has_cursor        (GimpDeviceInfo  *info);
+
 gint             gimp_device_info_get_n_axes        (GimpDeviceInfo  *info);
 GdkAxisUse       gimp_device_info_get_axis_use      (GimpDeviceInfo  *info,
                                                      gint             axis);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]