Subversion Repositories Scribus

Rev

Rev 14952 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14952 fschmid 1
/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
2
/* cairo - a vector graphics library with display and print output
3
 *
4
 * Copyright © 2002 University of Southern California
5
 * Copyright © 2005 Red Hat, Inc.
6
 *
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.
14
 *
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
18122 mrdocs 17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
14952 fschmid 18
 * You should have received a copy of the MPL along with this library
19
 * in the file COPYING-MPL-1.1
20
 *
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/
25
 *
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.
29
 *
30
 * The Original Code is the cairo graphics library.
31
 *
32
 * The Initial Developer of the Original Code is University of Southern
33
 * California.
34
 *
35
 * Contributor(s):
36
 *      Carl D. Worth <cworth@cworth.org>
37
 */
38
 
39
#define CAIRO_VERSION_H 1
40
 
41
#include "cairoint.h"
42
 
43
/* get the "real" version info instead of dummy cairo-version.h */
44
#undef CAIRO_VERSION_H
45
#include "cairo-version.h"
46
 
47
/**
48
 * cairo_version:
49
 *
50
 * Returns the version of the cairo library encoded in a single
51
 * integer as per %CAIRO_VERSION_ENCODE. The encoding ensures that
52
 * later versions compare greater than earlier versions.
53
 *
54
 * A run-time comparison to check that cairo's version is greater than
55
 * or equal to version X.Y.Z could be performed as follows:
56
 *
57
 * <informalexample><programlisting>
58
 * if (cairo_version() >= CAIRO_VERSION_ENCODE(X,Y,Z)) {...}
59
 * </programlisting></informalexample>
60
 *
61
 * See also cairo_version_string() as well as the compile-time
62
 * equivalents %CAIRO_VERSION and %CAIRO_VERSION_STRING.
63
 *
64
 * Return value: the encoded version.
65
 **/
66
int
67
cairo_version (void)
68
{
69
    return CAIRO_VERSION;
70
}
71
 
72
/**
73
 * cairo_version_string:
74
 *
75
 * Returns the version of the cairo library as a human-readable string
76
 * of the form "X.Y.Z".
77
 *
78
 * See also cairo_version() as well as the compile-time equivalents
79
 * %CAIRO_VERSION_STRING and %CAIRO_VERSION.
80
 *
81
 * Return value: a string containing the version.
82
 **/
83
const char*
84
cairo_version_string (void)
85
{
86
    return CAIRO_VERSION_STRING;
87
}
88
slim_hidden_def (cairo_version_string);