From ff2dee65bdff0e3bce239a6617b7acb680d5ad27 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 10 Jun 2005 23:47:23 +0000 Subject: [PATCH] Pull the enum out from inside cairo_path_data_t and give it a name of cairo_path_data_type_t. This allows C++ programs to see the enum values. It also allows variables to be declared of this type for manually constructing a cairo_path_t. --- ChangeLog | 7 +++++++ src/cairo.h | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c0e70fe9..2833ad545 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-06-10 Carl Worth + + * src/cairo.h: Pull the enum out from inside cairo_path_data_t and + give it a name of cairo_path_data_type_t. This allows C++ programs + to see the enum values. It also allows variables to be declared of + this type for manually constructing a cairo_path_t. + 2005-06-10 Carl Worth * ROADMAP: Add 'consistent error handling' to 1.0 roadmap. (This diff --git a/src/cairo.h b/src/cairo.h index 61119c25f..ec81f4c9f 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -825,14 +825,16 @@ cairo_get_target (cairo_t *cr); * cairo_path_destroy (path); * */ +typedef enum cairo_path_data_type { + CAIRO_PATH_MOVE_TO, + CAIRO_PATH_LINE_TO, + CAIRO_PATH_CURVE_TO, + CAIRO_PATH_CLOSE_PATH +} cairo_path_data_type_t; + typedef union { struct { - enum { - CAIRO_PATH_MOVE_TO, - CAIRO_PATH_LINE_TO, - CAIRO_PATH_CURVE_TO, - CAIRO_PATH_CLOSE_PATH - } type; + cairo_path_data_type_t type; int length; } header; struct {