1/* 2 * Copyright (C) 2012 Igalia S.L. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public License 15 * along with this library; see the file COPYING.LIB. If not, write to 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__) 21#error "Only <webkit2/webkit2.h> can be included directly." 22#endif 23 24#ifndef WebKitVersion_h 25#define WebKitVersion_h 26 27#include <webkit2/WebKitDefines.h> 28 29G_BEGIN_DECLS 30 31/** 32 * WEBKIT_MAJOR_VERSION: 33 * 34 * Like webkit_get_major_version(), but from the headers used at 35 * application compile time, rather than from the library linked 36 * against at application run time. 37 */ 38#define WEBKIT_MAJOR_VERSION (@PROJECT_VERSION_MAJOR@) 39 40/** 41 * WEBKIT_MINOR_VERSION: 42 * 43 * Like webkit_get_minor_version(), but from the headers used at 44 * application compile time, rather than from the library linked 45 * against at application run time. 46 */ 47#define WEBKIT_MINOR_VERSION (@PROJECT_VERSION_MINOR@) 48 49/** 50 * WEBKIT_MICRO_VERSION: 51 * 52 * Like webkit_get_micro_version(), but from the headers used at 53 * application compile time, rather than from the library linked 54 * against at application run time. 55 */ 56#define WEBKIT_MICRO_VERSION (@PROJECT_VERSION_PATCH@) 57 58/** 59 * WEBKIT_CHECK_VERSION: 60 * @major: major version (e.g. 1 for version 1.2.5) 61 * @minor: minor version (e.g. 2 for version 1.2.5) 62 * @micro: micro version (e.g. 5 for version 1.2.5) 63 * 64 * Returns: %TRUE if the version of the WebKit header files 65 * is the same as or newer than the passed-in version. 66 */ 67#define WEBKIT_CHECK_VERSION(major, minor, micro) \ 68 (WEBKIT_MAJOR_VERSION > (major) || \ 69 (WEBKIT_MAJOR_VERSION == (major) && WEBKIT_MINOR_VERSION > (minor)) || \ 70 (WEBKIT_MAJOR_VERSION == (major) && WEBKIT_MINOR_VERSION == (minor) && \ 71 WEBKIT_MICRO_VERSION >= (micro))) 72 73WEBKIT_API guint 74webkit_get_major_version (void); 75 76WEBKIT_API guint 77webkit_get_minor_version (void); 78 79WEBKIT_API guint 80webkit_get_micro_version (void); 81 82G_END_DECLS 83 84#endif 85