![]() |
![]() |
![]() |
GNOME Color Manager Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#define GCM_DDC_DEVICE_ERROR #define GCM_DDC_DEVICE_TYPE_ERROR enum GcmDdcDeviceError; struct GcmDdcDevice; struct GcmDdcDeviceClass; enum GcmDdcDeviceKind; GQuark gcm_ddc_device_error_quark (void
); GcmDdcDevice * gcm_ddc_device_new (void
); gboolean gcm_ddc_device_open (GcmDdcDevice *device
,const gchar *filename
,GError **error
); gboolean gcm_ddc_device_close (GcmDdcDevice *device
,GError **error
); const guint8 * gcm_ddc_device_get_edid (GcmDdcDevice *device
,gsize *length
,GError **error
); const gchar * gcm_ddc_device_get_edid_md5 (GcmDdcDevice *device
,GError **error
); gboolean gcm_ddc_device_write (GcmDdcDevice *device
,guchar *data
,gsize length
,GError **error
); gboolean gcm_ddc_device_read (GcmDdcDevice *device
,guchar *data
,gsize data_length
,gsize *recieved_length
,GError **error
); gboolean gcm_ddc_device_save (GcmDdcDevice *device
,GError **error
); const gchar * gcm_ddc_device_get_pnpid (GcmDdcDevice *device
,GError **error
); const gchar * gcm_ddc_device_get_model (GcmDdcDevice *device
,GError **error
); GcmDdcDeviceKind gcm_ddc_device_get_kind (GcmDdcDevice *device
,GError **error
); GPtrArray * gcm_ddc_device_get_controls (GcmDdcDevice *device
,GError **error
); GcmDdcControl * gcm_ddc_device_get_control_by_id (GcmDdcDevice *device
,guchar id
,GError **error
); void gcm_ddc_device_set_verbose (GcmDdcDevice *device
,GcmVerbose verbose
); GcmDdcDevicePrivate;
A GObject to use for controlling I2C devices with DDC/CI. A GcmDdcDevice will contain many GcmDdcControl's.
typedef enum { GCM_DDC_DEVICE_ERROR_FAILED } GcmDdcDeviceError;
Errors that can be thrown
struct GcmDdcDeviceClass { GObjectClass parent_class; /* signals */ void (* changed) (GcmDdcDevice *device); /* padding for future expansion */ void (*_gcm_reserved1) (void); void (*_gcm_reserved2) (void); void (*_gcm_reserved3) (void); void (*_gcm_reserved4) (void); void (*_gcm_reserved5) (void); };
typedef enum { GCM_DDC_DEVICE_KIND_LCD, GCM_DDC_DEVICE_KIND_CRT, GCM_DDC_DEVICE_KIND_UNKNOWN } GcmDdcDeviceKind;
The device type
GQuark gcm_ddc_device_error_quark (void
);
Returns : |
Our personal error quark. |
Since 2.91.1
GcmDdcDevice * gcm_ddc_device_new (void
);
Returns : |
A new GcmDdcDevice instance |
Since 2.91.1
gboolean gcm_ddc_device_open (GcmDdcDevice *device
,const gchar *filename
,GError **error
);
Open a device, and take control of the OSD if possible.
|
A valid GcmDdcDevice |
|
the device node, e.g. "/dev/ddc-1" |
|
a GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_ddc_device_close (GcmDdcDevice *device
,GError **error
);
Close the device, and returning control back to the OSD.
|
A valid GcmDdcDevice |
|
a GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
const guint8 * gcm_ddc_device_get_edid (GcmDdcDevice *device
,gsize *length
,GError **error
);
Gets the raw EDID data for the device.
|
A valid GcmDdcDevice |
|
the length of the return buffer, or NULL
|
|
a GError, or NULL
|
Returns : |
a pointer to the EDID block. Do not free this value. |
Since 2.91.1
const gchar * gcm_ddc_device_get_edid_md5 (GcmDdcDevice *device
,GError **error
);
Gets the MD5 of the EDID.
|
A valid GcmDdcDevice |
|
a GError, or NULL
|
Returns : |
The MD5 value of the current EDID. Do not free this value. |
Since 2.91.1
gboolean gcm_ddc_device_write (GcmDdcDevice *device
,guchar *data
,gsize length
,GError **error
);
Write data to DDC/CI at previoulsly set address address.
|
A valid GcmDdcDevice |
|
the data to write |
|
the length of the data to write |
|
a GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_ddc_device_read (GcmDdcDevice *device
,guchar *data
,gsize data_length
,gsize *recieved_length
,GError **error
);
Read DDC/CI formatted frame from the device.
|
A valid GcmDdcDevice |
|
the data location to read into |
|
the length of the data buffer |
|
the amount of data that was copied |
|
a GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_ddc_device_save (GcmDdcDevice *device
,GError **error
);
Saves any state to the device EEPROM.
|
A valid GcmDdcDevice |
|
a GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
const gchar * gcm_ddc_device_get_pnpid (GcmDdcDevice *device
,GError **error
);
Gets the PNPID for the device.
|
A valid GcmDdcDevice |
|
a GError, or NULL
|
Returns : |
The PNPID, or NULL . |
Since 2.91.1
const gchar * gcm_ddc_device_get_model (GcmDdcDevice *device
,GError **error
);
Gets the model of the device.
|
A valid GcmDdcDevice |
|
a GError, or NULL
|
Returns : |
The model string, or NULL . |
Since 2.91.1
GcmDdcDeviceKind gcm_ddc_device_get_kind (GcmDdcDevice *device
,GError **error
);
Gets the device kind.
|
A valid GcmDdcDevice |
|
a GError, or NULL
|
Returns : |
The device kind, e.g. GCM_DDC_DEVICE_KIND_LCD, or GCM_DDC_DEVICE_KIND_UNKNOWN for an error. |
Since 2.91.1
GPtrArray * gcm_ddc_device_get_controls (GcmDdcDevice *device
,GError **error
);
Get the list of controls for this device.
|
A valid GcmDdcDevice |
|
a GError, or NULL
|
Returns : |
A GPtrArray of GcmDdcControl's, free with g_ptr_array_unref() when done. |
Since 2.91.1
GcmDdcControl * gcm_ddc_device_get_control_by_id (GcmDdcDevice *device
,guchar id
,GError **error
);
Gets a GcmDdcControl object from the ID.
|
A valid GcmDdcDevice |
|
the device ID, e.g. GCM_DDC_CONTROL_ID_BRIGHTNESS |
|
a GError, or NULL
|
Returns : |
NULL , or a GcmDdcControl which needs to be freed with g_object_unref() . |
Since 2.91.1
void gcm_ddc_device_set_verbose (GcmDdcDevice *device
,GcmVerbose verbose
);
Sets the logging mode of the device. By default we log nothing.
|
A valid GcmDdcDevice |
|
if we should print out debugging to the console |
Since 2.91.1
typedef struct _GcmDdcDevicePrivate GcmDdcDevicePrivate;
Private GcmDdcDevice data