gimp-print-version.h.in [plain text]
/* -*- Mode: C -*-
* $Id: gimp-print-version.h.in,v 1.1.1.1 2004/07/23 06:26:27 jlovell Exp $
*
* Version of Gimp-print
*
* Copyright 2002 Robert Krawitz (rlk@alum.mit.edu)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Revision History:
*
* See ChangeLog
*/
/**
* @file gimp-print-version.h
* @brief Version functions.
*/
#ifndef __GIMP_PRINT_VERSION_H__
#define __GIMP_PRINT_VERSION_H__
/**
* Version information. Version information may be used to check the
* library version at compile-time, using macros, or at run-time,
* using constants.
*
* @defgroup version version
* @{
*/
/*
* Autogen-time versioning.
*/
#define GIMPPRINT_MAJOR_VERSION (@GIMPPRINT_MAJOR_VERSION@)
#define GIMPPRINT_MINOR_VERSION (@GIMPPRINT_MINOR_VERSION@)
#define GIMPPRINT_MICRO_VERSION (@GIMPPRINT_MICRO_VERSION@)
#define GIMPPRINT_CURRENT_INTERFACE (@GIMPPRINT_CURRENT_INTERFACE@)
#define GIMPPRINT_BINARY_AGE (@GIMPPRINT_BINARY_AGE@)
#define GIMPPRINT_INTERFACE_AGE (@GIMPPRINT_INTERFACE_AGE@)
#define GIMPPRINT_CHECK_VERSION(major,minor,micro) \
(GIMPPRINT_MAJOR_VERSION > (major) || \
(GIMPPRINT_MAJOR_VERSION == (major) && \
GIMPPRINT_MINOR_VERSION > (minor)) || \
(GIMPPRINT_MAJOR_VERSION == (major) && \
GIMPPRINT_MINOR_VERSION == (minor) && \
GIMPPRINT_MICRO_VERSION >= (micro)))
/** The library major version number. */
extern const unsigned int gimpprint_major_version;
/** The library minor version number. */
extern const unsigned int gimpprint_minor_version;
/** The library micro version number. */
extern const unsigned int gimpprint_micro_version;
/** The library ABI revision number (number of incompatible revisions). */
extern const unsigned int gimpprint_current_interface;
/** The library ABI binary age number (number of forward-compatible revisions). */
extern const unsigned int gimpprint_binary_age;
/** The library ABI interface age number (number of revisions of this ABI). */
extern const unsigned int gimpprint_interface_age;
/**
* Check whether the library provides the requested version.
* @param required_major the minimum major revision.
* @param required_minor the minimum minor revision.
* @param required_micro the minimum micro revision.
* @returns NULL if the version matches, or else a description of the
* error if the library is too old or too new.
*/
extern const char *stp_check_version(unsigned int required_major,
unsigned int required_minor,
unsigned int required_micro);
/** @} */
#endif /* __GIMP_PRINT_VERSION_H__ */