diff --git a/src/Makefile.sources b/src/Makefile.sources index e0153cdaf..e2759cc3f 100644 --- a/src/Makefile.sources +++ b/src/Makefile.sources @@ -97,7 +97,6 @@ cairo_private = \ cairo-surface-subsurface-private.h \ cairo-surface-snapshot-private.h \ cairo-surface-wrapper-private.h \ - cairo-tee-surface-private.h \ cairo-types-private.h \ cairo-user-font-private.h \ cairo-wideint-private.h \ @@ -168,7 +167,6 @@ cairo_sources = \ cairo-surface-subsurface.c \ cairo-surface-wrapper.c \ cairo-system.c \ - cairo-tee-surface.c \ cairo-tor-scan-converter.c \ cairo-toy-font-face.c \ cairo-traps.c \ @@ -377,6 +375,10 @@ if CAIRO_HAS_SCRIPT_SURFACE req_cairo_deflate_stream_sources = $(cairo_deflate_stream_sources) endif +cairo_tee_headers = cairo-tee.h +cairo_tee_private = cairo-tee-surface-private.h \ +cairo_tee_sources = cairo-tee-surface.c + cairo_xml_headers = cairo-xml.h cairo_xml_sources = cairo-xml-surface.c if CAIRO_HAS_XML_SURFACE diff --git a/src/cairo-tee-surface.c b/src/cairo-tee-surface.c index f17c37c22..e37cef801 100644 --- a/src/cairo-tee-surface.c +++ b/src/cairo-tee-surface.c @@ -40,6 +40,8 @@ #include "cairoint.h" +#include "cairo-tee.h" + #include "cairo-error-private.h" #include "cairo-tee-surface-private.h" #include "cairo-surface-wrapper-private.h" diff --git a/src/cairo-tee.h b/src/cairo-tee.h new file mode 100644 index 000000000..9c048c6fe --- /dev/null +++ b/src/cairo-tee.h @@ -0,0 +1,66 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2009 Chris Wilson + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Chris Wilson + * + * Contributor(s): + * Chris Wilson + */ + +#ifndef CAIRO_TEE_H +#define CAIRO_TEE_H + +#include "cairo.h" + +#if CAIRO_HAS_TEE_SURFACE + +CAIRO_BEGIN_DECLS + +cairo_public cairo_surface_t * +cairo_tee_surface_create (cairo_surface_t *master); + +cairo_public void +cairo_tee_surface_add (cairo_surface_t *surface, + cairo_surface_t *target); + +cairo_public void +cairo_tee_surface_remove (cairo_surface_t *surface, + cairo_surface_t *target); + +cairo_public cairo_surface_t * +cairo_tee_surface_index (cairo_surface_t *surface, + int index); + +CAIRO_END_DECLS + +#else /*CAIRO_HAS_TEE_SURFACE*/ +# error Cairo was not compiled with support for the TEE backend +#endif /*CAIRO_HAS_TEE_SURFACE*/ + +#endif /*CAIRO_TEE_H*/ diff --git a/src/cairo.h b/src/cairo.h index 9251bf6df..8e7594cc0 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -2338,23 +2338,6 @@ cairo_recording_surface_ink_extents (cairo_surface_t *surface, double *width, double *height); -/* Tee-surface functions */ - -cairo_public cairo_surface_t * -cairo_tee_surface_create (cairo_surface_t *master); - -cairo_public void -cairo_tee_surface_add (cairo_surface_t *surface, - cairo_surface_t *target); - -cairo_public void -cairo_tee_surface_remove (cairo_surface_t *surface, - cairo_surface_t *target); - -cairo_public cairo_surface_t * -cairo_tee_surface_index (cairo_surface_t *surface, - int index); - /* Pattern creation functions */ cairo_public cairo_pattern_t * diff --git a/test/api-special-cases.c b/test/api-special-cases.c index 63eb5d0fb..b25197655 100644 --- a/test/api-special-cases.c +++ b/test/api-special-cases.c @@ -84,6 +84,9 @@ #if CAIRO_HAS_SVG_SURFACE #include #endif +#if CAIRO_HAS_TEE_SURFACE +#include +#endif #if CAIRO_HAS_XCB_SURFACE #include #endif