Method
GdkDeviceget_vendor_id
since: 3.16
Declaration [src]
const gchar*
gdk_device_get_vendor_id (
GdkDevice* device
)
Description [src]
Returns the vendor ID of this device, or NULL
if this information couldn’t
be obtained. This ID is retrieved from the device, and is thus constant for it.
This function, together with gdk_device_get_product_id(), can be used to eg.
compose GSettings
paths to store settings for this device.
static GSettings *
get_device_settings (GdkDevice *device)
{
const gchar *vendor, *product;
GSettings *settings;
GdkDevice *device;
gchar *path;
vendor = gdk_device_get_vendor_id (device);
product = gdk_device_get_product_id (device);
path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product);
settings = g_settings_new_with_path (DEVICE_SCHEMA, path);
g_free (path);
return settings;
}
Available since: 3.16
Gets property | Gdk.Device:vendor-id |