xref: /aosp_15_r20/external/harfbuzz_ng/src/hb-version.h (revision 2d1272b857b1f7575e6e246373e1cb218663db8a)
1*2d1272b8SAndroid Build Coastguard Worker /*
2*2d1272b8SAndroid Build Coastguard Worker  * Copyright © 2011  Google, Inc.
3*2d1272b8SAndroid Build Coastguard Worker  *
4*2d1272b8SAndroid Build Coastguard Worker  *  This is part of HarfBuzz, a text shaping library.
5*2d1272b8SAndroid Build Coastguard Worker  *
6*2d1272b8SAndroid Build Coastguard Worker  * Permission is hereby granted, without written agreement and without
7*2d1272b8SAndroid Build Coastguard Worker  * license or royalty fees, to use, copy, modify, and distribute this
8*2d1272b8SAndroid Build Coastguard Worker  * software and its documentation for any purpose, provided that the
9*2d1272b8SAndroid Build Coastguard Worker  * above copyright notice and the following two paragraphs appear in
10*2d1272b8SAndroid Build Coastguard Worker  * all copies of this software.
11*2d1272b8SAndroid Build Coastguard Worker  *
12*2d1272b8SAndroid Build Coastguard Worker  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13*2d1272b8SAndroid Build Coastguard Worker  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14*2d1272b8SAndroid Build Coastguard Worker  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15*2d1272b8SAndroid Build Coastguard Worker  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16*2d1272b8SAndroid Build Coastguard Worker  * DAMAGE.
17*2d1272b8SAndroid Build Coastguard Worker  *
18*2d1272b8SAndroid Build Coastguard Worker  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19*2d1272b8SAndroid Build Coastguard Worker  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20*2d1272b8SAndroid Build Coastguard Worker  * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
21*2d1272b8SAndroid Build Coastguard Worker  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22*2d1272b8SAndroid Build Coastguard Worker  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23*2d1272b8SAndroid Build Coastguard Worker  *
24*2d1272b8SAndroid Build Coastguard Worker  * Google Author(s): Behdad Esfahbod
25*2d1272b8SAndroid Build Coastguard Worker  */
26*2d1272b8SAndroid Build Coastguard Worker 
27*2d1272b8SAndroid Build Coastguard Worker #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
28*2d1272b8SAndroid Build Coastguard Worker #error "Include <hb.h> instead."
29*2d1272b8SAndroid Build Coastguard Worker #endif
30*2d1272b8SAndroid Build Coastguard Worker 
31*2d1272b8SAndroid Build Coastguard Worker #ifndef HB_VERSION_H
32*2d1272b8SAndroid Build Coastguard Worker #define HB_VERSION_H
33*2d1272b8SAndroid Build Coastguard Worker 
34*2d1272b8SAndroid Build Coastguard Worker #include "hb-common.h"
35*2d1272b8SAndroid Build Coastguard Worker 
36*2d1272b8SAndroid Build Coastguard Worker HB_BEGIN_DECLS
37*2d1272b8SAndroid Build Coastguard Worker 
38*2d1272b8SAndroid Build Coastguard Worker 
39*2d1272b8SAndroid Build Coastguard Worker /**
40*2d1272b8SAndroid Build Coastguard Worker  * HB_VERSION_MAJOR:
41*2d1272b8SAndroid Build Coastguard Worker  *
42*2d1272b8SAndroid Build Coastguard Worker  * The major component of the library version available at compile-time.
43*2d1272b8SAndroid Build Coastguard Worker  */
44*2d1272b8SAndroid Build Coastguard Worker #define HB_VERSION_MAJOR 10
45*2d1272b8SAndroid Build Coastguard Worker /**
46*2d1272b8SAndroid Build Coastguard Worker  * HB_VERSION_MINOR:
47*2d1272b8SAndroid Build Coastguard Worker  *
48*2d1272b8SAndroid Build Coastguard Worker  * The minor component of the library version available at compile-time.
49*2d1272b8SAndroid Build Coastguard Worker  */
50*2d1272b8SAndroid Build Coastguard Worker #define HB_VERSION_MINOR 1
51*2d1272b8SAndroid Build Coastguard Worker /**
52*2d1272b8SAndroid Build Coastguard Worker  * HB_VERSION_MICRO:
53*2d1272b8SAndroid Build Coastguard Worker  *
54*2d1272b8SAndroid Build Coastguard Worker  * The micro component of the library version available at compile-time.
55*2d1272b8SAndroid Build Coastguard Worker  */
56*2d1272b8SAndroid Build Coastguard Worker #define HB_VERSION_MICRO 0
57*2d1272b8SAndroid Build Coastguard Worker 
58*2d1272b8SAndroid Build Coastguard Worker /**
59*2d1272b8SAndroid Build Coastguard Worker  * HB_VERSION_STRING:
60*2d1272b8SAndroid Build Coastguard Worker  *
61*2d1272b8SAndroid Build Coastguard Worker  * A string literal containing the library version available at compile-time.
62*2d1272b8SAndroid Build Coastguard Worker  */
63*2d1272b8SAndroid Build Coastguard Worker #define HB_VERSION_STRING "10.1.0"
64*2d1272b8SAndroid Build Coastguard Worker 
65*2d1272b8SAndroid Build Coastguard Worker /**
66*2d1272b8SAndroid Build Coastguard Worker  * HB_VERSION_ATLEAST:
67*2d1272b8SAndroid Build Coastguard Worker  * @major: the major component of the version number
68*2d1272b8SAndroid Build Coastguard Worker  * @minor: the minor component of the version number
69*2d1272b8SAndroid Build Coastguard Worker  * @micro: the micro component of the version number
70*2d1272b8SAndroid Build Coastguard Worker  *
71*2d1272b8SAndroid Build Coastguard Worker  * Tests the library version at compile-time against a minimum value,
72*2d1272b8SAndroid Build Coastguard Worker  * as three integer components.
73*2d1272b8SAndroid Build Coastguard Worker  */
74*2d1272b8SAndroid Build Coastguard Worker #define HB_VERSION_ATLEAST(major,minor,micro) \
75*2d1272b8SAndroid Build Coastguard Worker 	((major)*10000+(minor)*100+(micro) <= \
76*2d1272b8SAndroid Build Coastguard Worker 	 HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
77*2d1272b8SAndroid Build Coastguard Worker 
78*2d1272b8SAndroid Build Coastguard Worker 
79*2d1272b8SAndroid Build Coastguard Worker HB_EXTERN void
80*2d1272b8SAndroid Build Coastguard Worker hb_version (unsigned int *major,
81*2d1272b8SAndroid Build Coastguard Worker 	    unsigned int *minor,
82*2d1272b8SAndroid Build Coastguard Worker 	    unsigned int *micro);
83*2d1272b8SAndroid Build Coastguard Worker 
84*2d1272b8SAndroid Build Coastguard Worker HB_EXTERN const char *
85*2d1272b8SAndroid Build Coastguard Worker hb_version_string (void);
86*2d1272b8SAndroid Build Coastguard Worker 
87*2d1272b8SAndroid Build Coastguard Worker HB_EXTERN hb_bool_t
88*2d1272b8SAndroid Build Coastguard Worker hb_version_atleast (unsigned int major,
89*2d1272b8SAndroid Build Coastguard Worker 		    unsigned int minor,
90*2d1272b8SAndroid Build Coastguard Worker 		    unsigned int micro);
91*2d1272b8SAndroid Build Coastguard Worker 
92*2d1272b8SAndroid Build Coastguard Worker 
93*2d1272b8SAndroid Build Coastguard Worker HB_END_DECLS
94*2d1272b8SAndroid Build Coastguard Worker 
95*2d1272b8SAndroid Build Coastguard Worker #endif /* HB_VERSION_H */
96