Skip to content

Commit

Permalink
tee: Move definitions into separate header
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Otte committed Jul 30, 2010
1 parent 14639e6 commit 9f4d677
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 19 deletions.
6 changes: 4 additions & 2 deletions src/Makefile.sources
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/cairo-tee-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
66 changes: 66 additions & 0 deletions src/cairo-tee.h
Original file line number Diff line number Diff line change
@@ -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 <chris@chris-wilson.co.uk>
*/

#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*/
17 changes: 0 additions & 17 deletions src/cairo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
3 changes: 3 additions & 0 deletions test/api-special-cases.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
#if CAIRO_HAS_SVG_SURFACE
#include <cairo-svg.h>
#endif
#if CAIRO_HAS_TEE_SURFACE
#include <cairo-tee.h>
#endif
#if CAIRO_HAS_XCB_SURFACE
#include <cairo-xcb.h>
#endif
Expand Down

0 comments on commit 9f4d677

Please sign in to comment.