| 1 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- |
| 2 |
* |
| 3 |
* Copyright (C) 2010 Richard Hughes <[email protected]> |
| 4 |
* |
| 5 |
* Licensed under the GNU Lesser General Public License Version 2.1 |
| 6 |
* |
| 7 |
* This library is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU Lesser General Public |
| 9 |
* License as published by the Free Software Foundation; either |
| 10 |
* version 2.1 of the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This library is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
* Lesser General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU Lesser General Public |
| 18 |
* License along with this library; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 |
*/ |
| 21 |
|
| 22 |
/** |
| 23 |
* SECTION:cd-version |
| 24 |
* @short_description: Obtains the version for the installed colord |
| 25 |
* |
| 26 |
* These compile time macros allow the user to enable parts of client code |
| 27 |
* depending on the version of libcolord installed. |
| 28 |
* |
| 29 |
* See also: #CdClient, #CdDevice |
| 30 |
*/ |
| 31 |
|
| 32 |
#if !defined (__COLORD_GTK_H_INSIDE__) && !defined (CD_COMPILATION) |
| 33 |
#error "Only <colord.h> can be included directly." |
| 34 |
#endif |
| 35 |
|
| 36 |
#ifndef __CD_VERSION_H |
| 37 |
#define __CD_VERSION_H |
| 38 |
|
| 39 |
/** |
| 40 |
* CD_GTK_MAJOR_VERSION: |
| 41 |
* |
| 42 |
* The compile-time major version |
| 43 |
*/ |
| 44 |
#define CD_GTK_MAJOR_VERSION (@CD_GTK_MAJOR_VERSION@) |
| 45 |
|
| 46 |
/** |
| 47 |
* CD_GTK_MINOR_VERSION: |
| 48 |
* |
| 49 |
* The compile-time minor version |
| 50 |
*/ |
| 51 |
#define CD_GTK_MINOR_VERSION (@CD_GTK_MINOR_VERSION@) |
| 52 |
|
| 53 |
/** |
| 54 |
* CD_GTK_MICRO_VERSION: |
| 55 |
* |
| 56 |
* The compile-time micro version |
| 57 |
*/ |
| 58 |
#define CD_GTK_MICRO_VERSION (@CD_GTK_MICRO_VERSION@) |
| 59 |
|
| 60 |
/** |
| 61 |
* CD_CHECK_VERSION: |
| 62 |
* |
| 63 |
* Check whether a colord version equal to or greater than |
| 64 |
* major.minor.micro. |
| 65 |
*/ |
| 66 |
#define CD_CHECK_VERSION(major,minor,micro) \ |
| 67 |
(CD_GTK_MAJOR_VERSION > (major) || \ |
| 68 |
(CD_GTK_MAJOR_VERSION == (major) && CD_GTK_MINOR_VERSION > (minor)) || \ |
| 69 |
(CD_GTK_MAJOR_VERSION == (major) && CD_GTK_MINOR_VERSION == (minor) && \ |
| 70 |
CD_GTK_MICRO_VERSION >= (micro))) |
| 71 |
|
| 72 |
#endif /* __CD_VERSION_H */ |