2012-05-23 19:59:26 +04:00
|
|
|
diff --git a/gfx/ots/include/opentype-sanitiser.h b/gfx/ots/include/opentype-sanitiser.h
|
|
|
|
--- a/gfx/ots/include/opentype-sanitiser.h
|
|
|
|
+++ b/gfx/ots/include/opentype-sanitiser.h
|
|
|
|
@@ -1,15 +1,35 @@
|
|
|
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef OPENTYPE_SANITISER_H_
|
|
|
|
#define OPENTYPE_SANITISER_H_
|
|
|
|
|
|
|
|
+#if defined(_WIN32) || defined(__CYGWIN__)
|
|
|
|
+ #define OTS_DLL_IMPORT __declspec(dllimport)
|
|
|
|
+ #define OTS_DLL_EXPORT __declspec(dllexport)
|
|
|
|
+#else
|
|
|
|
+ #if __GNUC__ >= 4
|
|
|
|
+ #define OTS_DLL_IMPORT __attribute__((visibility ("default")))
|
|
|
|
+ #define OTS_DLL_EXPORT __attribute__((visibility ("default")))
|
|
|
|
+ #endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+#ifdef OTS_DLL
|
|
|
|
+ #ifdef OTS_DLL_EXPORTS
|
|
|
|
+ #define OTS_API OTS_DLL_EXPORT
|
|
|
|
+ #else
|
|
|
|
+ #define OTS_API OTS_DLL_IMPORT
|
|
|
|
+ #endif
|
|
|
|
+#else
|
|
|
|
+ #define OTS_API
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#include <stdlib.h>
|
|
|
|
typedef signed char int8_t;
|
|
|
|
typedef unsigned char uint8_t;
|
|
|
|
typedef short int16_t;
|
|
|
|
typedef unsigned short uint16_t;
|
|
|
|
typedef int int32_t;
|
|
|
|
typedef unsigned int uint32_t;
|
2014-06-05 19:09:00 +04:00
|
|
|
@@ -197,17 +217,17 @@ enum TableAction {
|
2014-01-31 19:09:09 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// Signature of the function to be provided by the client to decide what action
|
|
|
|
// to do for a given table.
|
2014-06-05 19:09:00 +04:00
|
|
|
// tag: table tag as an integer in big-endian byte order, independent of platform endianness
|
|
|
|
// user_data: user defined data that are passed to SetTableActionCallback()
|
2014-01-31 19:09:09 +04:00
|
|
|
typedef TableAction (*TableActionFunc)(uint32_t tag, void *user_data);
|
|
|
|
|
2014-06-05 19:09:00 +04:00
|
|
|
-class OTSContext {
|
|
|
|
+class OTS_API OTSContext {
|
|
|
|
public:
|
|
|
|
OTSContext()
|
|
|
|
: message_func(0),
|
|
|
|
message_user_data(0),
|
|
|
|
table_action_func(0),
|
|
|
|
table_action_user_data(0)
|
|
|
|
{}
|
2012-05-23 19:59:26 +04:00
|
|
|
|