forked from AuroraMiddleware/gtk
gdk: add gdk_device_get_n_keys() to access the sealed num_keys member
This commit is contained in:
parent
07c00b9969
commit
d0f2b13309
@ -281,6 +281,14 @@ gdk_device_get_axis_use (GdkDevice *device,
|
||||
return device->axes[index].use;
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_device_get_n_keys (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->num_keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_get_n_axes:
|
||||
* @device: a #GdkDevice.
|
||||
|
@ -388,6 +388,7 @@ gdk_device_get_key
|
||||
gdk_device_get_mode
|
||||
gdk_device_get_name
|
||||
gdk_device_get_n_axes
|
||||
gdk_device_get_n_keys
|
||||
gdk_device_get_source
|
||||
gdk_device_get_type G_GNUC_CONST
|
||||
gdk_device_set_axis_use
|
||||
|
@ -141,6 +141,7 @@ void gdk_device_get_key (GdkDevice *device,
|
||||
GdkModifierType *modifiers);
|
||||
GdkAxisUse gdk_device_get_axis_use (GdkDevice *device,
|
||||
guint index);
|
||||
gint gdk_device_get_n_keys (GdkDevice *device);
|
||||
gint gdk_device_get_n_axes (GdkDevice *device);
|
||||
|
||||
/* Functions to configure a device */
|
||||
|
@ -198,6 +198,14 @@ gdk_device_get_axis_use (GdkDevice *device,
|
||||
return device->axes[index].use;
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_device_get_n_keys (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->num_keys;
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_device_get_n_axes (GdkDevice *device)
|
||||
{
|
||||
|
@ -193,6 +193,14 @@ gdk_device_get_axis_use (GdkDevice *device,
|
||||
return device->axes[index].use;
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_device_get_n_keys (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->num_keys;
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_device_get_n_axes (GdkDevice *device)
|
||||
{
|
||||
|
@ -317,6 +317,24 @@ gdk_device_get_axis_use (GdkDevice *device,
|
||||
return device->axes[index].use;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_get_n_keys:
|
||||
* @device: a #GdkDevice.
|
||||
*
|
||||
* Gets the number of keys of a device.
|
||||
*
|
||||
* Returns: the number of keys of @device
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
gint
|
||||
gdk_device_get_n_keys (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->num_keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_get_n_axes:
|
||||
* @device: a #GdkDevice.
|
||||
|
Loading…
Reference in New Issue
Block a user