get_vendor_id


Description:

public unowned string? get_vendor_id ()

Returns the vendor ID of this device.

This ID is retrieved from the device, and does not change.

This function, together with [method@Gdk.Device.get_product_id], can be used to eg. compose `GSettings` paths to store settings for this device.

```c static GSettings * get_device_settings (GdkDevice *device) { const char *vendor, *product; GSettings *settings; GdkDevice *device; char *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; } ```

Parameters:

this

a physical `GdkDevice`

Returns:

the vendor ID