| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#pragma once |
| 23 |
|
| 24 |
#include <glib.h> |
| 25 |
|
| 26 |
#include "dex-version.h" |
| 27 |
|
| 28 |
#ifndef _DEX_EXTERN |
| 29 |
# define _DEX_EXTERN extern |
| 30 |
#endif |
| 31 |
|
| 32 |
#define DEX_VERSION_CUR_STABLE (G_ENCODE_VERSION (DEX_MAJOR_VERSION, DEX_MINOR_VERSION)) |
| 33 |
|
| 34 |
#ifdef DEX_DISABLE_DEPRECATION_WARNINGS |
| 35 |
# define DEX_DEPRECATED _DEX_EXTERN |
| 36 |
# define DEX_DEPRECATED_FOR(f) _DEX_EXTERN |
| 37 |
# define DEX_UNAVAILABLE(maj,min) _DEX_EXTERN |
| 38 |
#else |
| 39 |
# define DEX_DEPRECATED G_DEPRECATED _DEX_EXTERN |
| 40 |
# define DEX_DEPRECATED_FOR(f) G_DEPRECATED_FOR (f) _DEX_EXTERN |
| 41 |
# define DEX_UNAVAILABLE(maj,min) G_UNAVAILABLE (maj, min) _DEX_EXTERN |
| 42 |
#endif |
| 43 |
|
| 44 |
#define DEX_VERSION_1_0 (G_ENCODE_VERSION (1, 0)) |
| 45 |
#define DEX_VERSION_1_1 (G_ENCODE_VERSION (1, 1)) |
| 46 |
#define DEX_VERSION_1_2 (G_ENCODE_VERSION (1, 2)) |
| 47 |
|
| 48 |
#if DEX_MAJOR_VERSION == DEX_VERSION_1_0 |
| 49 |
# define DEX_VERSION_PREV_STABLE (DEX_VERSION_1_0) |
| 50 |
#else |
| 51 |
# define DEX_VERSION_PREV_STABLE (G_ENCODE_VERSION (DEX_MAJOR_VERSION, DEX_MINOR_VERSION - 1)) |
| 52 |
#endif |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
#ifndef DEX_VERSION_MIN_REQUIRED |
| 70 |
# define DEX_VERSION_MIN_REQUIRED (DEX_VERSION_CUR_STABLE) |
| 71 |
#endif |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
#ifndef DEX_VERSION_MAX_ALLOWED |
| 89 |
# if DEX_VERSION_MIN_REQUIRED > DEX_VERSION_PREV_STABLE |
| 90 |
# define DEX_VERSION_MAX_ALLOWED (DEX_VERSION_MIN_REQUIRED) |
| 91 |
# else |
| 92 |
# define DEX_VERSION_MAX_ALLOWED (DEX_VERSION_CUR_STABLE) |
| 93 |
# endif |
| 94 |
#endif |
| 95 |
|
| 96 |
#define DEX_AVAILABLE_IN_ALL _DEX_EXTERN |
| 97 |
|
| 98 |
#if DEX_VERSION_MIN_REQUIRED >= DEX_VERSION_1_0 |
| 99 |
# define DEX_DEPRECATED_IN_1_0 DEX_DEPRECATED |
| 100 |
# define DEX_DEPRECATED_IN_1_0_FOR(f) DEX_DEPRECATED_FOR(f) |
| 101 |
#else |
| 102 |
# define DEX_DEPRECATED_IN_1_0 _DEX_EXTERN |
| 103 |
# define DEX_DEPRECATED_IN_1_0_FOR(f) _DEX_EXTERN |
| 104 |
#endif |
| 105 |
#if DEX_VERSION_MAX_ALLOWED < DEX_VERSION_1_0 |
| 106 |
# define DEX_AVAILABLE_IN_1_0 DEX_UNAVAILABLE(1, 0) |
| 107 |
#else |
| 108 |
# define DEX_AVAILABLE_IN_1_0 _DEX_EXTERN |
| 109 |
#endif |
| 110 |
|
| 111 |
#if DEX_VERSION_MIN_REQUIRED >= DEX_VERSION_1_1 |
| 112 |
# define DEX_DEPRECATED_IN_1_1 DEX_DEPRECATED |
| 113 |
# define DEX_DEPRECATED_IN_1_1_FOR(f) DEX_DEPRECATED_FOR(f) |
| 114 |
#else |
| 115 |
# define DEX_DEPRECATED_IN_1_1 _DEX_EXTERN |
| 116 |
# define DEX_DEPRECATED_IN_1_1_FOR(f) _DEX_EXTERN |
| 117 |
#endif |
| 118 |
#if DEX_VERSION_MAX_ALLOWED < DEX_VERSION_1_1 |
| 119 |
# define DEX_AVAILABLE_IN_1_1 DEX_UNAVAILABLE(1, 1) |
| 120 |
#else |
| 121 |
# define DEX_AVAILABLE_IN_1_1 _DEX_EXTERN |
| 122 |
#endif |
| 123 |
|
| 124 |
#if DEX_VERSION_MIN_REQUIRED >= DEX_VERSION_1_2 |
| 125 |
# define DEX_DEPRECATED_IN_1_2 DEX_DEPRECATED |
| 126 |
# define DEX_DEPRECATED_IN_1_2_FOR(f) DEX_DEPRECATED_FOR(f) |
| 127 |
#else |
| 128 |
# define DEX_DEPRECATED_IN_1_2 _DEX_EXTERN |
| 129 |
# define DEX_DEPRECATED_IN_1_2_FOR(f) _DEX_EXTERN |
| 130 |
#endif |
| 131 |
#if DEX_VERSION_MAX_ALLOWED < DEX_VERSION_1_2 |
| 132 |
# define DEX_AVAILABLE_IN_1_2 DEX_UNAVAILABLE(1, 2) |
| 133 |
#else |
| 134 |
# define DEX_AVAILABLE_IN_1_2 _DEX_EXTERN |
| 135 |
#endif |
| 136 |
|
| 137 |
G_BEGIN_DECLS |
| 138 |
|
| 139 |
DEX_AVAILABLE_IN_1_1 |
| 140 |
int dex_get_major_version (void); |
| 141 |
DEX_AVAILABLE_IN_1_1 |
| 142 |
int dex_get_minor_version (void); |
| 143 |
DEX_AVAILABLE_IN_1_1 |
| 144 |
int dex_get_micro_version (void); |
| 145 |
|
| 146 |
G_END_DECLS |