mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
gdk: Drop gdk_device_get_associated_device()
Devices are no longer associated like this, the seat should be used to resolve queries on other devices.
This commit is contained in:
parent
2f792396d7
commit
9912c80d70
@ -352,7 +352,6 @@ gdk_device_get_name
|
|||||||
gdk_device_get_vendor_id
|
gdk_device_get_vendor_id
|
||||||
gdk_device_get_product_id
|
gdk_device_get_product_id
|
||||||
gdk_device_get_source
|
gdk_device_get_source
|
||||||
gdk_device_get_associated_device
|
|
||||||
gdk_device_list_physical_devices
|
gdk_device_list_physical_devices
|
||||||
gdk_device_get_device_type
|
gdk_device_get_device_type
|
||||||
gdk_device_get_display
|
gdk_device_get_display
|
||||||
|
@ -86,7 +86,6 @@ enum {
|
|||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_DISPLAY,
|
PROP_DISPLAY,
|
||||||
PROP_NAME,
|
PROP_NAME,
|
||||||
PROP_ASSOCIATED_DEVICE,
|
|
||||||
PROP_TYPE,
|
PROP_TYPE,
|
||||||
PROP_SOURCE,
|
PROP_SOURCE,
|
||||||
PROP_HAS_CURSOR,
|
PROP_HAS_CURSOR,
|
||||||
@ -155,20 +154,6 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
|||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_STRINGS);
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
/**
|
|
||||||
* GdkDevice:associated-device:
|
|
||||||
*
|
|
||||||
* Associated pointer or keyboard with this device, if any. Devices of
|
|
||||||
* type #GDK_DEVICE_TYPE_LOGICAL always come in keyboard/pointer pairs.
|
|
||||||
* Other device types will have a %NULL associated device.
|
|
||||||
*/
|
|
||||||
device_props[PROP_ASSOCIATED_DEVICE] =
|
|
||||||
g_param_spec_object ("associated-device",
|
|
||||||
P_("Associated device"),
|
|
||||||
P_("Associated pointer or keyboard with this device"),
|
|
||||||
GDK_TYPE_DEVICE,
|
|
||||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GdkDevice:source:
|
* GdkDevice:source:
|
||||||
*
|
*
|
||||||
@ -460,9 +445,6 @@ gdk_device_get_property (GObject *object,
|
|||||||
case PROP_DISPLAY:
|
case PROP_DISPLAY:
|
||||||
g_value_set_object (value, device->display);
|
g_value_set_object (value, device->display);
|
||||||
break;
|
break;
|
||||||
case PROP_ASSOCIATED_DEVICE:
|
|
||||||
g_value_set_object (value, device->associated);
|
|
||||||
break;
|
|
||||||
case PROP_NAME:
|
case PROP_NAME:
|
||||||
g_value_set_string (value, device->name);
|
g_value_set_string (value, device->name);
|
||||||
break;
|
break;
|
||||||
@ -670,30 +652,6 @@ gdk_device_get_display (GdkDevice *device)
|
|||||||
return device->display;
|
return device->display;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gdk_device_get_associated_device:
|
|
||||||
* @device: a #GdkDevice
|
|
||||||
*
|
|
||||||
* Returns the #GdkDevice associated to @device:
|
|
||||||
*
|
|
||||||
* - if @device is of type %GDK_DEVICE_TYPE_LOGICAL, it will return
|
|
||||||
* the paired pointer or keyboard.
|
|
||||||
* - if @device is of type %GDK_DEVICE_TYPE_PHYSICAL, it will return
|
|
||||||
* the logical device to which @device is attached to.
|
|
||||||
* - if @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be
|
|
||||||
* returned, as there is no associated device.
|
|
||||||
*
|
|
||||||
* Returns: (nullable) (transfer none): The associated device, or
|
|
||||||
* %NULL
|
|
||||||
**/
|
|
||||||
GdkDevice *
|
|
||||||
gdk_device_get_associated_device (GdkDevice *device)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
|
||||||
|
|
||||||
return device->associated;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_gdk_device_set_device_type (GdkDevice *device,
|
_gdk_device_set_device_type (GdkDevice *device,
|
||||||
GdkDeviceType type)
|
GdkDeviceType type)
|
||||||
|
@ -114,8 +114,6 @@ GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
|
|||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GdkDisplay * gdk_device_get_display (GdkDevice *device);
|
GdkDisplay * gdk_device_get_display (GdkDevice *device);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
|
||||||
GdkDevice * gdk_device_get_associated_device (GdkDevice *device);
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GList * gdk_device_list_physical_devices (GdkDevice *device);
|
GList * gdk_device_list_physical_devices (GdkDevice *device);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user