Add color channels getters ABI (#1513)
authorEbrahim Byagowi <ebrahim@gnu.org>
Mon, 29 Apr 2019 21:52:28 +0000 (14:52 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2019 21:52:28 +0000 (14:52 -0700)
So can be used with language wrappers

src/hb-common.cc
src/hb-common.h

index 60d16c8..c453443 100644 (file)
@@ -1160,6 +1160,59 @@ hb_variation_to_string (hb_variation_t *variation,
   buf[len] = '\0';
 }
 
+/**
+ * hb_color_get_alpha:
+ *
+ *
+ *
+ * Since: REPLACEME
+ */
+uint8_t
+(hb_color_get_alpha) (hb_color_t color)
+{
+  return hb_color_get_alpha (color);
+}
+
+/**
+ * hb_color_get_red:
+ *
+ *
+ *
+ * Since: REPLACEME
+ */
+uint8_t
+(hb_color_get_red) (hb_color_t color)
+{
+  return hb_color_get_red (color);
+}
+
+/**
+ * hb_color_get_green:
+ *
+ *
+ *
+ * Since: REPLACEME
+ */
+uint8_t
+(hb_color_get_green) (hb_color_t color)
+{
+  return hb_color_get_green (color);
+}
+
+/**
+ * hb_color_get_blue:
+ *
+ *
+ *
+ * Since: REPLACEME
+ */
+uint8_t
+(hb_color_get_blue) (hb_color_t color)
+{
+  return hb_color_get_blue (color);
+}
+
+
 /* If there is no visibility control, then hb-static.cc will NOT
  * define anything.  Instead, we get it to define one set in here
  * only, so only libharfbuzz.so defines them, not other libs. */
index 371b2bf..edd9ffb 100644 (file)
@@ -467,39 +467,21 @@ typedef uint32_t hb_color_t;
 
 #define HB_COLOR(b,g,r,a) ((hb_color_t) HB_TAG ((b),(g),(r),(a)))
 
-/**
- * hb_color_get_alpha:
- *
- *
- *
- * Since: 2.1.0
- */
+HB_EXTERN uint8_t
+hb_color_get_alpha (hb_color_t color);
 #define hb_color_get_alpha(color)      ((color) & 0xFF)
-/**
- * hb_color_get_red:
- *
- *
- *
- * Since: 2.1.0
- */
+
+HB_EXTERN uint8_t
+hb_color_get_red (hb_color_t color);
 #define hb_color_get_red(color)                (((color) >> 8) & 0xFF)
-/**
- * hb_color_get_green:
- *
- *
- *
- * Since: 2.1.0
- */
+
+HB_EXTERN uint8_t
+hb_color_get_green (hb_color_t color);
 #define hb_color_get_green(color)      (((color) >> 16) & 0xFF)
-/**
- * hb_color_get_blue:
- *
- *
- *
- * Since: 2.1.0
- */
-#define hb_color_get_blue(color)       (((color) >> 24) & 0xFF)
 
+HB_EXTERN uint8_t
+hb_color_get_blue (hb_color_t color);
+#define hb_color_get_blue(color)       (((color) >> 24) & 0xFF)
 
 HB_END_DECLS