Package: gdk

Accessor gdk-device-vendor-id

Lambda List

gdk-device-vendor-id (object)

Syntax

(gdk-device-vendor-id object) => vendor-id

Arguments

object -- a gdk-device object
vendor-id -- a string with the vendor ID

Details

Accessor of the vendor-id slot of the gdk-device class.

The gdk-device-vendor-id slot access function returns the vendor ID of this device, or nil if this information could not be obtained. This ID is retrieved from the device, and is thus constant for it.

This function, together with the gdk-device-product-id function, can be used to e.g. compose GSettings paths to store settings for this device.

Example

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; }
 

See also

2020-11-8