[gimp/gtk3-port: 98/444] app: introduce struct GimpDeviceKey because GdkDeviceKey is gone
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 98/444] app: introduce struct GimpDeviceKey because GdkDeviceKey is gone
- Date: Sun, 13 May 2018 20:07:47 +0000 (UTC)
commit 6353cbaf8e80109c1ada158bfc6e516d24c4c3fd
Author: Michael Natterer <mitch gimp org>
Date: Wed Nov 24 20:41:13 2010 +0100
app: introduce struct GimpDeviceKey because GdkDeviceKey is gone
app/widgets/gimpdeviceinfo.c | 8 ++++----
app/widgets/gimpdeviceinfo.h | 11 ++++++++++-
2 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 255647c..e3e0440 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -335,8 +335,8 @@ gimp_device_info_set_property (GObject *object,
n_device_values = gimp_value_array_length (array);
info->n_keys = n_device_values;
- info->keys = g_renew (GdkDeviceKey, info->keys, info->n_keys);
- memset (info->keys, 0, info->n_keys * sizeof (GdkDeviceKey));
+ info->keys = g_renew (GimpDeviceKey, info->keys, info->n_keys);
+ memset (info->keys, 0, info->n_keys * sizeof (GimpDeviceKey));
}
for (i = 0; i < n_device_values; i++)
@@ -614,8 +614,8 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
gdk_device_get_axis_use (device, i));
info->n_keys = gdk_device_get_n_keys (device);
- info->keys = g_renew (GdkDeviceKey, info->keys, info->n_keys);
- memset (info->keys, 0, info->n_keys * sizeof (GdkDeviceKey));
+ info->keys = g_renew (GimpDeviceKey, info->keys, info->n_keys);
+ memset (info->keys, 0, info->n_keys * sizeof (GimpDeviceKey));
for (i = 0; i < MIN (info->n_keys, gdk_device_get_n_keys (device)); i++)
{
diff --git a/app/widgets/gimpdeviceinfo.h b/app/widgets/gimpdeviceinfo.h
index 9b191cb..4ec04de 100644
--- a/app/widgets/gimpdeviceinfo.h
+++ b/app/widgets/gimpdeviceinfo.h
@@ -35,6 +35,15 @@ G_BEGIN_DECLS
GIMP_CONTEXT_PROP_MASK_GRADIENT)
+typedef struct _GimpDeviceKey GimpDeviceKey;
+
+struct _GimpDeviceKey
+{
+ guint keyval;
+ GdkModifierType modifiers;
+};
+
+
#define GIMP_TYPE_DEVICE_INFO (gimp_device_info_get_type ())
#define GIMP_DEVICE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DEVICE_INFO,
GimpDeviceInfo))
#define GIMP_DEVICE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DEVICE_INFO,
GimpDeviceInfoClass))
@@ -58,7 +67,7 @@ struct _GimpDeviceInfo
gint n_axes;
GdkAxisUse *axes;
gint n_keys;
- GdkDeviceKey *keys;
+ GimpDeviceKey *keys;
/* curves */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]