1 /* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
2 /* cairo - a vector graphics library with display and print output
4 * Copyright © 2007 * Mozilla Corporation
5 * Copyright © 2009 Chris Wilson
7 * This library is free software; you can redistribute it and/or
8 * modify it either under the terms of the GNU Lesser General Public
9 * License version 2.1 as published by the Free Software Foundation
10 * (the "LGPL") or, at your option, under the terms of the Mozilla
11 * Public License Version 1.1 (the "MPL"). If you do not alter this
12 * notice, a recipient may use your version of this file under either
13 * the MPL or the LGPL.
15 * You should have received a copy of the LGPL along with this library
16 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
18 * You should have received a copy of the MPL along with this library
19 * in the file COPYING-MPL-1.1
21 * The contents of this file are subject to the Mozilla Public License
22 * Version 1.1 (the "License"); you may not use this file except in
23 * compliance with the License. You may obtain a copy of the License at
24 * http://www.mozilla.org/MPL/
26 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
27 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
28 * the specific language governing rights and limitations.
30 * The Original Code is the cairo graphics library.
32 * The Initial Developer of the Original Code is Mozilla Corporation.
35 * Vladimir Vukicevic <vladimir@mozilla.com>
36 * Chris Wilson <chris@chris-wilson.co.uk>
44 #if CAIRO_HAS_VG_SURFACE
46 #include <VG/openvg.h>
50 typedef struct _cairo_vg_context cairo_vg_context_t
;
52 #if CAIRO_HAS_GLX_FUNCTIONS
53 typedef struct __GLXcontextRec
*GLXContext
;
54 typedef struct _XDisplay Display
;
56 cairo_public cairo_vg_context_t
*
57 cairo_vg_context_create_for_glx (Display
*dpy
,
61 #if CAIRO_HAS_EGL_FUNCTIONS
64 cairo_public cairo_vg_context_t
*
65 cairo_vg_context_create_for_egl (EGLDisplay egl_display
,
66 EGLContext egl_context
);
69 cairo_public cairo_status_t
70 cairo_vg_context_status (cairo_vg_context_t
*context
);
73 cairo_vg_context_destroy (cairo_vg_context_t
*context
);
75 cairo_public cairo_surface_t
*
76 cairo_vg_surface_create (cairo_vg_context_t
*context
,
77 cairo_content_t content
, int width
, int height
);
79 cairo_public cairo_surface_t
*
80 cairo_vg_surface_create_for_image (cairo_vg_context_t
*context
,
83 int width
, int height
);
86 cairo_vg_surface_get_image (cairo_surface_t
*abstract_surface
);
88 cairo_public VGImageFormat
89 cairo_vg_surface_get_format (cairo_surface_t
*abstract_surface
);
92 cairo_vg_surface_get_height (cairo_surface_t
*abstract_surface
);
95 cairo_vg_surface_get_width (cairo_surface_t
*abstract_surface
);
99 #else /* CAIRO_HAS_VG_SURFACE*/
100 # error Cairo was not compiled with support for the OpenVG backend
101 #endif /* CAIRO_HAS_VG_SURFACE*/
103 #endif /* CAIRO_VG_H */