summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-02 13:15:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-06 13:11:22 +0100
commit8258532794d0579f6c1b825b8cfb9c8f7ced4369 (patch)
treeecd03ded63451072c859f21e4dea6298a92efcf0
parente3afbc1875d618c6d7e893971372be8f9889fc8b (diff)
Reduce the cairo_device_type_t to only hold the used entries.
This should help clarify the documentation by not mentioning non-existent devices and prevent any assumed coupling between surface-type values and devices.
-rw-r--r--src/cairo.h49
-rw-r--r--util/cairo-gobject/cairo-gobject-enums.c24
2 files changed, 12 insertions, 61 deletions
diff --git a/src/cairo.h b/src/cairo.h
index fd95c4d04..913320fdc 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -1941,29 +1941,12 @@ cairo_device_reference (cairo_device_t *device);
/**
* cairo_device_type_t:
- * @CAIRO_DEVICE_TYPE_IMAGE: The surface is of type image
- * @CAIRO_DEVICE_TYPE_PDF: The surface is of type pdf
- * @CAIRO_DEVICE_TYPE_PS: The surface is of type ps
- * @CAIRO_DEVICE_TYPE_XLIB: The surface is of type xlib
- * @CAIRO_DEVICE_TYPE_XCB: The surface is of type xcb
- * @CAIRO_DEVICE_TYPE_GLITZ: The surface is of type glitz
- * @CAIRO_DEVICE_TYPE_QUARTZ: The surface is of type quartz
- * @CAIRO_DEVICE_TYPE_WIN32: The surface is of type win32
- * @CAIRO_DEVICE_TYPE_BEOS: The surface is of type beos
- * @CAIRO_DEVICE_TYPE_DIRECTFB: The surface is of type directfb
- * @CAIRO_DEVICE_TYPE_SVG: The surface is of type svg
- * @CAIRO_DEVICE_TYPE_OS2: The surface is of type os2
- * @CAIRO_DEVICE_TYPE_WIN32_PRINTING: The surface is a win32 printing surface
- * @CAIRO_DEVICE_TYPE_QUARTZ_IMAGE: The surface is of type quartz_image
- * @CAIRO_DEVICE_TYPE_SCRIPT: The surface is of type script
- * @CAIRO_DEVICE_TYPE_QT: The surface is of type Qt
- * @CAIRO_DEVICE_TYPE_RECORDING: The surface is of type recording
- * @CAIRO_DEVICE_TYPE_VG: The surface is a OpenVG surface
- * @CAIRO_DEVICE_TYPE_GL: The surface is of type OpenGL
* @CAIRO_DEVICE_TYPE_DRM: The surface is of type Direct Render Manager
+ * @CAIRO_DEVICE_TYPE_GL: The surface is of type OpenGL
+ * @CAIRO_DEVICE_TYPE_SCRIPT: The surface is of type script
+ * @CAIRO_DEVICE_TYPE_XCB: The surface is of type xcb
+ * @CAIRO_DEVICE_TYPE_XLIB: The surface is of type xlib
* @CAIRO_DEVICE_TYPE_XML: The surface is of type XML
- * @CAIRO_DEVICE_TYPE_SKIA: The surface is of type Skia
- * @CAIRO_DEVICE_TYPE_SUBSURFACE: The surface is a subsurface created with
* cairo_surface_create_for_rectangle()
*
* #cairo_device_type_t is used to describe the type of a given
@@ -1985,28 +1968,12 @@ cairo_device_reference (cairo_device_t *device);
* Since: 1.10
**/
typedef enum _cairo_device_type {
- CAIRO_DEVICE_TYPE_IMAGE,
- CAIRO_DEVICE_TYPE_PDF,
- CAIRO_DEVICE_TYPE_PS,
- CAIRO_DEVICE_TYPE_XLIB,
- CAIRO_DEVICE_TYPE_XCB,
- CAIRO_DEVICE_TYPE_GLITZ,
- CAIRO_DEVICE_TYPE_QUARTZ,
- CAIRO_DEVICE_TYPE_WIN32,
- CAIRO_DEVICE_TYPE_BEOS,
- CAIRO_DEVICE_TYPE_DIRECTFB,
- CAIRO_DEVICE_TYPE_SVG,
- CAIRO_DEVICE_TYPE_OS2,
- CAIRO_DEVICE_TYPE_WIN32_PRINTING,
- CAIRO_DEVICE_TYPE_QUARTZ_IMAGE,
- CAIRO_DEVICE_TYPE_SCRIPT,
- CAIRO_DEVICE_TYPE_QT,
- CAIRO_DEVICE_TYPE_RECORDING,
- CAIRO_DEVICE_TYPE_VG,
- CAIRO_DEVICE_TYPE_GL,
CAIRO_DEVICE_TYPE_DRM,
+ CAIRO_DEVICE_TYPE_GL,
+ CAIRO_DEVICE_TYPE_SCRIPT,
+ CAIRO_DEVICE_TYPE_XCB,
+ CAIRO_DEVICE_TYPE_XLIB,
CAIRO_DEVICE_TYPE_XML,
- CAIRO_DEVICE_TYPE_SKIA
} cairo_device_type_t;
cairo_public cairo_device_type_t
diff --git a/util/cairo-gobject/cairo-gobject-enums.c b/util/cairo-gobject/cairo-gobject-enums.c
index c91cfea54..1fcd3d031 100644
--- a/util/cairo-gobject/cairo-gobject-enums.c
+++ b/util/cairo-gobject/cairo-gobject-enums.c
@@ -347,28 +347,12 @@ cairo_gobject_device_type_get_type (void)
static volatile gsize type_volatile = 0;
if (g_once_init_enter (&type_volatile)) {
static const GEnumValue values[] = {
- { CAIRO_DEVICE_TYPE_IMAGE, "CAIRO_DEVICE_TYPE_IMAGE", "image" },
- { CAIRO_DEVICE_TYPE_PDF, "CAIRO_DEVICE_TYPE_PDF", "pdf" },
- { CAIRO_DEVICE_TYPE_PS, "CAIRO_DEVICE_TYPE_PS", "ps" },
- { CAIRO_DEVICE_TYPE_XLIB, "CAIRO_DEVICE_TYPE_XLIB", "xlib" },
- { CAIRO_DEVICE_TYPE_XCB, "CAIRO_DEVICE_TYPE_XCB", "xcb" },
- { CAIRO_DEVICE_TYPE_GLITZ, "CAIRO_DEVICE_TYPE_GLITZ", "glitz" },
- { CAIRO_DEVICE_TYPE_QUARTZ, "CAIRO_DEVICE_TYPE_QUARTZ", "quartz" },
- { CAIRO_DEVICE_TYPE_WIN32, "CAIRO_DEVICE_TYPE_WIN32", "win32" },
- { CAIRO_DEVICE_TYPE_BEOS, "CAIRO_DEVICE_TYPE_BEOS", "beos" },
- { CAIRO_DEVICE_TYPE_DIRECTFB, "CAIRO_DEVICE_TYPE_DIRECTFB", "directfb" },
- { CAIRO_DEVICE_TYPE_SVG, "CAIRO_DEVICE_TYPE_SVG", "svg" },
- { CAIRO_DEVICE_TYPE_OS2, "CAIRO_DEVICE_TYPE_OS2", "os2" },
- { CAIRO_DEVICE_TYPE_WIN32_PRINTING, "CAIRO_DEVICE_TYPE_WIN32_PRINTING", "win32-printing" },
- { CAIRO_DEVICE_TYPE_QUARTZ_IMAGE, "CAIRO_DEVICE_TYPE_QUARTZ_IMAGE", "quartz-image" },
- { CAIRO_DEVICE_TYPE_SCRIPT, "CAIRO_DEVICE_TYPE_SCRIPT", "script" },
- { CAIRO_DEVICE_TYPE_QT, "CAIRO_DEVICE_TYPE_QT", "qt" },
- { CAIRO_DEVICE_TYPE_RECORDING, "CAIRO_DEVICE_TYPE_RECORDING", "recording" },
- { CAIRO_DEVICE_TYPE_VG, "CAIRO_DEVICE_TYPE_VG", "vg" },
- { CAIRO_DEVICE_TYPE_GL, "CAIRO_DEVICE_TYPE_GL", "gl" },
{ CAIRO_DEVICE_TYPE_DRM, "CAIRO_DEVICE_TYPE_DRM", "drm" },
+ { CAIRO_DEVICE_TYPE_GL, "CAIRO_DEVICE_TYPE_GL", "gl" },
+ { CAIRO_DEVICE_TYPE_SCRIPT, "CAIRO_DEVICE_TYPE_SCRIPT", "script" },
+ { CAIRO_DEVICE_TYPE_XCB, "CAIRO_DEVICE_TYPE_XCB", "xcb" },
+ { CAIRO_DEVICE_TYPE_XLIB, "CAIRO_DEVICE_TYPE_XLIB", "xlib" },
{ CAIRO_DEVICE_TYPE_XML, "CAIRO_DEVICE_TYPE_XML", "xml" },
- { CAIRO_DEVICE_TYPE_SKIA, "CAIRO_DEVICE_TYPE_SKIA", "skia" },
{ 0, NULL, NULL }
};
GType type = g_enum_register_static (g_intern_static_string ("cairo_device_type_t"), values);