Rename HB_UNICODE_GENERAL_CATEGORY_COMBINING_MARK to HB_UNICODE_GENERAL_CATEGORY_SPAC...
[profile/ivi/org.tizen.video-player.git] / src / hb-common.h
index 74030f4..a0ab17e 100644 (file)
 
 HB_BEGIN_DECLS
 
-
-#ifdef _MSC_VER
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
+#if !defined (HB_DONT_DEFINE_STDINT)
+
+#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \
+    defined (_sgi) || defined (__sun) || defined (sun) || \
+    defined (__digital__) || defined (__HP_cc)
+#  include <inttypes.h>
+#elif defined (_AIX)
+#  include <sys/inttypes.h>
+/* VS 2010 (_MSC_VER 1600) has stdint.h */
+#elif defined (_MSC_VER) && _MSC_VER < 1600
+typedef __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
 #else
-#include <stdint.h>
+#  include <stdint.h>
+#endif
+
 #endif
 
+
 typedef int hb_bool_t;
 
 typedef uint32_t hb_codepoint_t;
@@ -74,6 +85,7 @@ typedef union _hb_var_int_t {
 typedef uint32_t hb_tag_t;
 
 #define HB_TAG(a,b,c,d) ((hb_tag_t)((((uint8_t)(a))<<24)|(((uint8_t)(b))<<16)|(((uint8_t)(c))<<8)|((uint8_t)(d))))
+#define HB_UNTAG(tag)   ((uint8_t)((tag)>>24)), ((uint8_t)((tag)>>16)), ((uint8_t)((tag)>>8)), ((uint8_t)(tag))
 
 #define HB_TAG_NONE HB_TAG(0,0,0,0)
 
@@ -113,6 +125,11 @@ hb_language_from_string (const char *str);
 const char *
 hb_language_to_string (hb_language_t language);
 
+#define HB_LANGUAGE_INVALID ((hb_language_t) NULL)
+
+hb_language_t
+hb_language_get_default (void);
+
 
 /* hb_unicode_general_category_t */
 
@@ -128,7 +145,7 @@ typedef enum
   HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER,            /* Lo */
   HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER,                /* Lt */
   HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER,                /* Lu */
-  HB_UNICODE_GENERAL_CATEGORY_COMBINING_MARK,          /* Mc */
+  HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK,            /* Mc */
   HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK,          /* Me */
   HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK,                /* Mn */
   HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER,          /* Nd */
@@ -153,16 +170,17 @@ typedef enum
 
 /* hb_script_t */
 
+/* http://unicode.org/iso15924/ */
 typedef enum
 {
   HB_SCRIPT_COMMON                  = HB_TAG ('Z','y','y','y'),
-  HB_SCRIPT_INHERITED               = HB_TAG ('Q','a','a','i'),
+  HB_SCRIPT_INHERITED               = HB_TAG ('Z','i','n','h'),
   HB_SCRIPT_ARABIC                  = HB_TAG ('A','r','a','b'),
   HB_SCRIPT_ARMENIAN                = HB_TAG ('A','r','m','n'),
   HB_SCRIPT_BENGALI                 = HB_TAG ('B','e','n','g'),
   HB_SCRIPT_BOPOMOFO                = HB_TAG ('B','o','p','o'),
   HB_SCRIPT_CHEROKEE                = HB_TAG ('C','h','e','r'),
-  HB_SCRIPT_COPTIC                  = HB_TAG ('Q','a','a','c'),
+  HB_SCRIPT_COPTIC                  = HB_TAG ('C','o','p','t'),
   HB_SCRIPT_CYRILLIC                = HB_TAG ('C','y','r','l'),
   HB_SCRIPT_DESERET                 = HB_TAG ('D','s','r','t'),
   HB_SCRIPT_DEVANAGARI              = HB_TAG ('D','e','v','a'),