mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 15:31:05 +01:00
Make it an error to include non-top-level headers
Users should #include <hb.h> (or hb-ft.h, hb-glib.h, etc), but never things like hb-shape.h directly. This makes it easier to refactor headers later on without breaking compatibility.
This commit is contained in:
1 parent
323190c27b
commit
d1c9eb458c
19 files changed
+58
-15
No files matched your search
@@ -24,6 +24,10 @@
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_H_IN
|
||||
#error "Include <hb.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_BLOB_H
|
||||
#define HB_BLOB_H
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
* Google Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_H_IN
|
||||
#error "Include <hb.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_BUFFER_H
|
||||
#define HB_BUFFER_H
|
||||
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
* Google Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_H_IN
|
||||
#error "Include <hb.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_COMMON_H
|
||||
#define HB_COMMON_H
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_H_IN
|
||||
#error "Include <hb.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_FONT_H
|
||||
#define HB_FONT_H
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
#include "hb.h"
|
||||
|
||||
#include "hb-font.h"
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define HB_GLIB_H
|
||||
|
||||
#include "hb.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
HB_BEGIN_DECLS
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#define HB_GOBJECT_H
|
||||
|
||||
#include "hb.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
HB_BEGIN_DECLS
|
||||
|
||||
+3
-2
@@ -26,8 +26,7 @@
|
||||
#ifndef HB_GRAPHITE2_H
|
||||
#define HB_GRAPHITE2_H
|
||||
|
||||
#include "hb-common.h"
|
||||
#include "hb-shape.h"
|
||||
#include "hb.h"
|
||||
|
||||
HB_BEGIN_DECLS
|
||||
|
||||
@@ -41,6 +40,8 @@ hb_graphite_shape (hb_font_t *font,
|
||||
unsigned int num_features,
|
||||
const char * const *shaper_options);
|
||||
|
||||
/* TODO add gr_font/face etc getters and other glue API */
|
||||
|
||||
HB_END_DECLS
|
||||
|
||||
#endif /* HB_GRAPHITE2_H */
|
||||
@@ -30,6 +30,7 @@
|
||||
#define HB_ICU_H
|
||||
|
||||
#include "hb.h"
|
||||
|
||||
#include <unicode/uscript.h>
|
||||
|
||||
|
||||
|
||||
+5
-3
@@ -24,12 +24,14 @@
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_OT_H_IN
|
||||
#error "Include <hb-ot.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_OT_LAYOUT_H
|
||||
#define HB_OT_LAYOUT_H
|
||||
|
||||
#include "hb-common.h"
|
||||
#include "hb-buffer.h"
|
||||
#include "hb-font.h"
|
||||
#include "hb.h"
|
||||
|
||||
#include "hb-ot-tag.h"
|
||||
|
||||
|
||||
+5
-4
@@ -24,15 +24,16 @@
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_OT_H_IN
|
||||
#error "Include <hb-ot.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_OT_SHAPE_H
|
||||
#define HB_OT_SHAPE_H
|
||||
|
||||
#include "hb-common.h"
|
||||
#include "hb-shape.h"
|
||||
|
||||
|
||||
HB_BEGIN_DECLS
|
||||
|
||||
#include "hb.h"
|
||||
|
||||
hb_bool_t
|
||||
hb_ot_shape (hb_font_t *font,
|
||||
|
||||
+5
-1
@@ -24,10 +24,14 @@
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_OT_H_IN
|
||||
#error "Include <hb-ot.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_OT_TAG_H
|
||||
#define HB_OT_TAG_H
|
||||
|
||||
#include "hb-common.h"
|
||||
#include "hb.h"
|
||||
|
||||
HB_BEGIN_DECLS
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#ifndef HB_OT_H
|
||||
#define HB_OT_H
|
||||
#define HB_OT_H_IN
|
||||
|
||||
#include "hb.h"
|
||||
|
||||
@@ -36,4 +37,5 @@
|
||||
HB_BEGIN_DECLS
|
||||
HB_END_DECLS
|
||||
|
||||
#undef HB_OT_H_IN
|
||||
#endif /* HB_OT_H */
|
||||
+4
-1
@@ -33,7 +33,10 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "hb-common.h"
|
||||
#include "hb.h"
|
||||
#include "hb-ot.h"
|
||||
#define HB_H_IN
|
||||
#define HB_OT_H_IN
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_H_IN
|
||||
#error "Include <hb.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_SHAPE_H
|
||||
#define HB_SHAPE_H
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
* Google Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_H_IN
|
||||
#error "Include <hb.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_UNICODE_H
|
||||
#define HB_UNICODE_H
|
||||
|
||||
|
||||
+1
-2
@@ -27,8 +27,7 @@
|
||||
#ifndef HB_UNISCRIBE_H
|
||||
#define HB_UNISCRIBE_H
|
||||
|
||||
#include "hb-common.h"
|
||||
#include "hb-shape.h"
|
||||
#include "hb.h"
|
||||
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#include <windows.h>
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
* Google Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
#ifndef HB_H_IN
|
||||
#error "Include <hb.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef HB_VERSION_H
|
||||
#define HB_VERSION_H
|
||||
|
||||
|
||||
Reference in new issue
Block a user