mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 11:47:59 +02:00
device: Define the CAIRO_DEVICE_TYPE_INVALID device type
Define a new device type to indicate that the device is not valid. The -1 value is along the same line as CAIRO_FORMAT_INVALID (and is likely to have the same issues).
This commit is contained in:
parent
35d8d20635
commit
02a331de13
2 changed files with 4 additions and 2 deletions
|
|
@ -365,7 +365,7 @@ cairo_device_get_type (cairo_device_t *device)
|
|||
if (device == NULL ||
|
||||
CAIRO_REFERENCE_COUNT_IS_INVALID (&device->ref_count))
|
||||
{
|
||||
return (cairo_device_type_t) -1;
|
||||
return CAIRO_DEVICE_TYPE_INVALID;
|
||||
}
|
||||
|
||||
return device->backend->type;
|
||||
|
|
|
|||
|
|
@ -1984,7 +1984,9 @@ typedef enum _cairo_device_type {
|
|||
CAIRO_DEVICE_TYPE_SCRIPT,
|
||||
CAIRO_DEVICE_TYPE_XCB,
|
||||
CAIRO_DEVICE_TYPE_XLIB,
|
||||
CAIRO_DEVICE_TYPE_XML
|
||||
CAIRO_DEVICE_TYPE_XML,
|
||||
|
||||
CAIRO_DEVICE_TYPE_INVALID = -1
|
||||
} cairo_device_type_t;
|
||||
|
||||
cairo_public cairo_device_type_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue