poppler-features.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* poppler-features.h: glib interface to poppler
  2. * Copyright (C) 2006, Red Hat, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2, or (at your option)
  7. * any later version.
  8. *
  9. * This program 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
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef __POPPLER_FEATURES_H__
  19. #define __POPPLER_FEATURES_H__
  20. /**
  21. * SECTION:poppler-features
  22. * @short_description: Variables and functions to check the poppler version and features
  23. * @Title: Version and Features Information
  24. *
  25. * Poppler provides version information, and information about features
  26. * enabled at compile time. This is primarily useful in configure checks
  27. * for builds that have a configure script, or for allowing code to optionally
  28. * depend but not require a specific poppler version.
  29. */
  30. /**
  31. * POPPLER_HAS_CAIRO:
  32. *
  33. * Defined if poppler was compiled with cairo support.
  34. */
  35. #define POPPLER_HAS_CAIRO 1
  36. /**
  37. * POPPLER_MAJOR_VERSION:
  38. *
  39. * The major version number of the poppler header files (e.g. in poppler version
  40. * 0.1.2 this is 0.)
  41. *
  42. * Since: 0.12
  43. */
  44. #define POPPLER_MAJOR_VERSION (24)
  45. /**
  46. * POPPLER_MINOR_VERSION:
  47. *
  48. * The major version number of the poppler header files (e.g. in poppler version
  49. * 0.1.2 this is 1.)
  50. *
  51. * Since: 0.12
  52. */
  53. #define POPPLER_MINOR_VERSION (10)
  54. /**
  55. * POPPLER_MICRO_VERSION:
  56. *
  57. * The micro version number of the poppler header files (e.g. in poppler version
  58. * 0.1.2 this is 2.)
  59. *
  60. * Since: 0.12
  61. */
  62. #define POPPLER_MICRO_VERSION (0)
  63. /**
  64. * POPPLER_CHECK_VERSION:
  65. * @major: major version (e.g. 0 for version 0.1.2)
  66. * @minor: minor version (e.g. 1 for version 0.1.2)
  67. * @micro: micro version (e.g. 2 for version 0.1.2)
  68. *
  69. * Checks the version fo the poppler library
  70. *
  71. * Returns: %TRUE if the version of the poppler header files is the same
  72. * as or newer than the passed-in version
  73. *
  74. * Since: 0.12
  75. */
  76. #define POPPLER_CHECK_VERSION(major,minor,micro) \
  77. (POPPLER_MAJOR_VERSION > (major) || \
  78. (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
  79. (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
  80. #endif /* __POPPLER_FEATURES_H__ */