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.
This commit is contained in:
Chris Wilson 2010-09-02 13:15:07 +01:00
parent e3afbc1875
commit 8258532794
2 changed files with 12 additions and 61 deletions

View file

@ -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

View file

@ -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);