diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2023-06-14 01:25:30 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-13 19:25:30 +0200 |
| commit | e0dc494e71eacffc3a53ab59335298795752c740 (patch) | |
| tree | d41bb982d3efec0d81637f4750371d4ac24f24c4 /src | |
| parent | 4110956ddaf3c58a1e8e50aa7adba2ed43e3a6b7 (diff) | |
| download | box64-e0dc494e71eacffc3a53ab59335298795752c740.tar.gz box64-e0dc494e71eacffc3a53ab59335298795752c740.zip | |
[WRAPPER] Rework on libharfbuzz wrapper (#836)
* Rework of libharfbuzz, part 1 * Rework of libharfbuzz, part 2 * Rework of libharfbuzz, part 3 * Rework of libharfbuzz, part 4 * Rework of libharfbuzz, part 5 * Fixed typo * Fixed typo * Rework of libharfbuzz, part 6 * Rework of libharfbuzz, part 7 * Done
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 55 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibharfbuzztypes.h | 56 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 1 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibharfbuzz.c | 1198 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibharfbuzz_private.h | 306 | ||||
| -rwxr-xr-x | src/wrapped/wrappedpng16_private.h | 1 |
7 files changed, 1465 insertions, 154 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 9d5b7bb0..e4ff0b86 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -1831,6 +1831,7 @@ #() iFEpIppp #() iFEpuppp #() iFEpUppp +#() iFEppppi #() iFEppppp #() iFiiiiip #() iFiiiipp @@ -3938,6 +3939,60 @@ wrappedlibglx: - glXGetProcAddress - glXGetProcAddressARB wrappedlibharfbuzz: +- vFp: + - hb_draw_funcs_destroy + - hb_font_funcs_destroy +- pFp: + - hb_unicode_funcs_reference +- vFppp: + - hb_font_set_funcs_data +- pFppp: + - hb_face_create_for_tables +- vFpppp: + - hb_buffer_set_message_func + - hb_draw_funcs_set_close_path_func + - hb_draw_funcs_set_cubic_to_func + - hb_draw_funcs_set_line_to_func + - hb_draw_funcs_set_move_to_func + - hb_draw_funcs_set_quadratic_to_func + - hb_font_funcs_set_font_h_extents_func + - hb_font_funcs_set_font_v_extents_func + - hb_font_funcs_set_glyph_contour_point_func + - hb_font_funcs_set_glyph_extents_func + - hb_font_funcs_set_glyph_from_name_func + - hb_font_funcs_set_glyph_func + - hb_font_funcs_set_glyph_h_advance_func + - hb_font_funcs_set_glyph_h_advances_func + - hb_font_funcs_set_glyph_h_kerning_func + - hb_font_funcs_set_glyph_h_origin_func + - hb_font_funcs_set_glyph_name_func + - hb_font_funcs_set_glyph_shape_func + - hb_font_funcs_set_glyph_v_advance_func + - hb_font_funcs_set_glyph_v_advances_func + - hb_font_funcs_set_glyph_v_kerning_func + - hb_font_funcs_set_glyph_v_origin_func + - hb_font_funcs_set_nominal_glyph_func + - hb_font_funcs_set_nominal_glyphs_func + - hb_font_funcs_set_variation_glyph_func + - hb_font_set_funcs + - hb_unicode_funcs_set_combining_class_func + - hb_unicode_funcs_set_compose_func + - hb_unicode_funcs_set_decompose_compatibility_func + - hb_unicode_funcs_set_decompose_func + - hb_unicode_funcs_set_eastasian_width_func + - hb_unicode_funcs_set_general_category_func + - hb_unicode_funcs_set_mirroring_func + - hb_unicode_funcs_set_script_func +- iFppppi: + - hb_blob_set_user_data + - hb_buffer_set_user_data + - hb_face_set_user_data + - hb_font_funcs_set_user_data + - hb_font_set_user_data + - hb_unicode_funcs_set_user_data +- pFpuupp: + - hb_blob_create + - hb_blob_create_or_fail wrappedlibibus: - vFpippp: - ibus_bus_current_input_context_async diff --git a/src/wrapped/generated/wrappedlibharfbuzztypes.h b/src/wrapped/generated/wrappedlibharfbuzztypes.h index c3c430d0..250c9c15 100644 --- a/src/wrapped/generated/wrappedlibharfbuzztypes.h +++ b/src/wrapped/generated/wrappedlibharfbuzztypes.h @@ -11,7 +11,61 @@ #define ADDED_FUNCTIONS() #endif +typedef void (*vFp_t)(void*); +typedef void* (*pFp_t)(void*); +typedef void (*vFppp_t)(void*, void*, void*); +typedef void* (*pFppp_t)(void*, void*, void*); +typedef void (*vFpppp_t)(void*, void*, void*, void*); +typedef int32_t (*iFppppi_t)(void*, void*, void*, void*, int32_t); +typedef void* (*pFpuupp_t)(void*, uint32_t, uint32_t, void*, void*); -#define SUPER() ADDED_FUNCTIONS() +#define SUPER() ADDED_FUNCTIONS() \ + GO(hb_draw_funcs_destroy, vFp_t) \ + GO(hb_font_funcs_destroy, vFp_t) \ + GO(hb_unicode_funcs_reference, pFp_t) \ + GO(hb_font_set_funcs_data, vFppp_t) \ + GO(hb_face_create_for_tables, pFppp_t) \ + GO(hb_buffer_set_message_func, vFpppp_t) \ + GO(hb_draw_funcs_set_close_path_func, vFpppp_t) \ + GO(hb_draw_funcs_set_cubic_to_func, vFpppp_t) \ + GO(hb_draw_funcs_set_line_to_func, vFpppp_t) \ + GO(hb_draw_funcs_set_move_to_func, vFpppp_t) \ + GO(hb_draw_funcs_set_quadratic_to_func, vFpppp_t) \ + GO(hb_font_funcs_set_font_h_extents_func, vFpppp_t) \ + GO(hb_font_funcs_set_font_v_extents_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_contour_point_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_extents_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_from_name_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_h_advance_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_h_advances_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_h_kerning_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_h_origin_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_name_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_shape_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_v_advance_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_v_advances_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_v_kerning_func, vFpppp_t) \ + GO(hb_font_funcs_set_glyph_v_origin_func, vFpppp_t) \ + GO(hb_font_funcs_set_nominal_glyph_func, vFpppp_t) \ + GO(hb_font_funcs_set_nominal_glyphs_func, vFpppp_t) \ + GO(hb_font_funcs_set_variation_glyph_func, vFpppp_t) \ + GO(hb_font_set_funcs, vFpppp_t) \ + GO(hb_unicode_funcs_set_combining_class_func, vFpppp_t) \ + GO(hb_unicode_funcs_set_compose_func, vFpppp_t) \ + GO(hb_unicode_funcs_set_decompose_compatibility_func, vFpppp_t) \ + GO(hb_unicode_funcs_set_decompose_func, vFpppp_t) \ + GO(hb_unicode_funcs_set_eastasian_width_func, vFpppp_t) \ + GO(hb_unicode_funcs_set_general_category_func, vFpppp_t) \ + GO(hb_unicode_funcs_set_mirroring_func, vFpppp_t) \ + GO(hb_unicode_funcs_set_script_func, vFpppp_t) \ + GO(hb_blob_set_user_data, iFppppi_t) \ + GO(hb_buffer_set_user_data, iFppppi_t) \ + GO(hb_face_set_user_data, iFppppi_t) \ + GO(hb_font_funcs_set_user_data, iFppppi_t) \ + GO(hb_font_set_user_data, iFppppi_t) \ + GO(hb_unicode_funcs_set_user_data, iFppppi_t) \ + GO(hb_blob_create, pFpuupp_t) \ + GO(hb_blob_create_or_fail, pFpuupp_t) #endif // __wrappedlibharfbuzzTYPES_H_ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 75c5a9da..c652f42c 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -1867,6 +1867,7 @@ typedef int32_t (*iFEpippi_t)(x64emu_t*, void*, int32_t, void*, void*, int32_t); typedef int32_t (*iFEpIppp_t)(x64emu_t*, void*, int64_t, void*, void*, void*); typedef int32_t (*iFEpuppp_t)(x64emu_t*, void*, uint32_t, void*, void*, void*); typedef int32_t (*iFEpUppp_t)(x64emu_t*, void*, uint64_t, void*, void*, void*); +typedef int32_t (*iFEppppi_t)(x64emu_t*, void*, void*, void*, void*, int32_t); typedef int32_t (*iFEppppp_t)(x64emu_t*, void*, void*, void*, void*, void*); typedef int32_t (*iFiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, void*); typedef int32_t (*iFiiiipp_t)(int32_t, int32_t, int32_t, int32_t, void*, void*); @@ -4684,6 +4685,7 @@ void iFEpippi(x64emu_t *emu, uintptr_t fcn) { iFEpippi_t fn = (iFEpippi_t)fcn; R void iFEpIppp(x64emu_t *emu, uintptr_t fcn) { iFEpIppp_t fn = (iFEpIppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFEpuppp(x64emu_t *emu, uintptr_t fcn) { iFEpuppp_t fn = (iFEpuppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFEpUppp(x64emu_t *emu, uintptr_t fcn) { iFEpUppp_t fn = (iFEpUppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } +void iFEppppi(x64emu_t *emu, uintptr_t fcn) { iFEppppi_t fn = (iFEppppi_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); } void iFEppppp(x64emu_t *emu, uintptr_t fcn) { iFEppppp_t fn = (iFEppppp_t)fcn; R_RAX=(int32_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); } void iFiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiip_t fn = (iFiiiiip_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9); } void iFiiiipp(x64emu_t *emu, uintptr_t fcn) { iFiiiipp_t fn = (iFiiiipp_t)fcn; R_RAX=(int32_t)fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (void*)R_R8, (void*)R_R9); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 3d13ace0..f0e08c35 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -1868,6 +1868,7 @@ void iFEpippi(x64emu_t *emu, uintptr_t fnc); void iFEpIppp(x64emu_t *emu, uintptr_t fnc); void iFEpuppp(x64emu_t *emu, uintptr_t fnc); void iFEpUppp(x64emu_t *emu, uintptr_t fnc); +void iFEppppi(x64emu_t *emu, uintptr_t fnc); void iFEppppp(x64emu_t *emu, uintptr_t fnc); void iFiiiiip(x64emu_t *emu, uintptr_t fnc); void iFiiiipp(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibharfbuzz.c b/src/wrapped/wrappedlibharfbuzz.c index e98310a1..479285df 100644 --- a/src/wrapped/wrappedlibharfbuzz.c +++ b/src/wrapped/wrappedlibharfbuzz.c @@ -12,8 +12,1206 @@ #include <sys/mman.h> #include <errno.h> #include "debug.h" +#include "callback.h" const char* libharfbuzzName = "libharfbuzz.so.0"; #define LIBNAME libharfbuzz +#include "generated/wrappedlibharfbuzztypes.h" + +#include "wrappercallback.h" + +struct hb_atomic_int_t +{ + int v; +}; + +struct hb_reference_count_t +{ + struct hb_atomic_int_t ref_count; +}; + +struct hb_atomic_ptr_t { + void* v; +}; + +struct hb_object_header_t +{ + struct hb_reference_count_t ref_count; + struct hb_atomic_int_t writable; + struct hb_atomic_ptr_t user_data; +}; + +/* + * hb_draw_funcs_t + */ + +#define HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS \ + HB_DRAW_FUNC_IMPLEMENT (move_to) \ + HB_DRAW_FUNC_IMPLEMENT (line_to) \ + HB_DRAW_FUNC_IMPLEMENT (quadratic_to) \ + HB_DRAW_FUNC_IMPLEMENT (cubic_to) \ + HB_DRAW_FUNC_IMPLEMENT (close_path) \ + /* ^--- Add new callbacks here */ + +struct hb_draw_funcs_t__func { +#define HB_DRAW_FUNC_IMPLEMENT(name) void* name; + HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_DRAW_FUNC_IMPLEMENT +}; + +struct hb_draw_funcs_t__destroy { +#define HB_DRAW_FUNC_IMPLEMENT(name) void* name; + HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_DRAW_FUNC_IMPLEMENT +}; + +struct hb_draw_funcs_t +{ + struct hb_object_header_t header; + + struct hb_draw_funcs_t__func func; + + struct { +#define HB_DRAW_FUNC_IMPLEMENT(name) void *name; + HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_DRAW_FUNC_IMPLEMENT + } *user_data; + + struct hb_draw_funcs_t__destroy* destroy; +}; + +/* + * hb_font_funcs_t + */ + +#define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \ + HB_FONT_FUNC_IMPLEMENT (get_,font_h_extents) \ + HB_FONT_FUNC_IMPLEMENT (get_,font_v_extents) \ + HB_FONT_FUNC_IMPLEMENT (get_,nominal_glyph) \ + HB_FONT_FUNC_IMPLEMENT (get_,nominal_glyphs) \ + HB_FONT_FUNC_IMPLEMENT (get_,variation_glyph) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_advance) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_advance) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_advances) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_advances) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_origin) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_origin) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_kerning) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_kerning) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_extents) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_contour_point) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_name) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_from_name) \ + HB_FONT_FUNC_IMPLEMENT (,draw_glyph) \ + HB_FONT_FUNC_IMPLEMENT (,paint_glyph) \ + /* ^--- Add new callbacks here */ + +struct hb_font_funcs_t__destroy { +#define HB_FONT_FUNC_IMPLEMENT(get_,name) void* name; + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT +}; + +struct hb_font_funcs_t +{ + struct hb_object_header_t header; + + struct { +#define HB_FONT_FUNC_IMPLEMENT(get_,name) void* name; + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } *user_data; + + struct hb_font_funcs_t__destroy* destroy; + + union get_t { + struct get_funcs_t { +#define HB_FONT_FUNC_IMPLEMENT(get_,name) void* name; + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } f; + void (*array[0 +#define HB_FONT_FUNC_IMPLEMENT(get_,name) +1 + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + ]) (); + } get; +}; + +/* + * hb_unicode_funcs_t + */ + +#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS \ + HB_UNICODE_FUNC_IMPLEMENT (combining_class) \ + HB_UNICODE_FUNC_IMPLEMENT (eastasian_width) \ + HB_UNICODE_FUNC_IMPLEMENT (general_category) \ + HB_UNICODE_FUNC_IMPLEMENT (mirroring) \ + HB_UNICODE_FUNC_IMPLEMENT (script) \ + HB_UNICODE_FUNC_IMPLEMENT (compose) \ + HB_UNICODE_FUNC_IMPLEMENT (decompose) \ + HB_UNICODE_FUNC_IMPLEMENT (decompose_compatibility) \ + /* ^--- Add new callbacks here */ + +/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */ +#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \ + HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_combining_class_t, combining_class) \ + HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \ + HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \ + HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \ + HB_UNICODE_FUNC_IMPLEMENT (hb_script_t, script) \ + /* ^--- Add new simple callbacks here */ + + +struct hb_unicode_funcs_t__destroy { +#define HB_UNICODE_FUNC_IMPLEMENT(name) void* name; + HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_UNICODE_FUNC_IMPLEMENT +}; + +struct hb_unicode_funcs_t +{ + struct hb_object_header_t header; + struct hb_unicode_funcs_t *parent; + + struct { +#define HB_UNICODE_FUNC_IMPLEMENT(name) void* name; + HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_UNICODE_FUNC_IMPLEMENT + } func; + + struct { +#define HB_UNICODE_FUNC_IMPLEMENT(name) void* name; + HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_UNICODE_FUNC_IMPLEMENT + } user_data; + + struct hb_unicode_funcs_t__destroy destroy; +}; + +#define SUPER() \ + GO(0) \ + GO(1) \ + GO(2) \ + GO(3) \ + GO(4) \ + GO(5) \ + GO(6) \ + GO(7) \ + GO(8) \ + GO(9) \ + GO(10) \ + GO(11) \ + GO(12) \ + +// buffer_message +#define GO(A) \ +static uintptr_t my_buffer_message_fct_##A = 0; \ +static int my_buffer_message_##A(void* a, void* b, void* c, void* d)\ +{ \ + return (int)RunFunctionFmt(my_context, my_buffer_message_fct_##A, "pppp", a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_buffer_message_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_buffer_message_fct_##A == (uintptr_t)fct) return my_buffer_message_##A; + SUPER() + #undef GO + #define GO(A) if (my_buffer_message_fct_##A == 0) {my_buffer_message_fct_##A = (uintptr_t)fct; return my_buffer_message_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz buffer message callback\n"); + return NULL; +} + +// draw close path +#define GO(A) \ +static uintptr_t my_draw_close_path_fct_##A = 0; \ +static void my_draw_close_path_##A(void* a, void* b, void* c, void* d) \ +{ \ + RunFunctionFmt(my_context, my_draw_close_path_fct_##A, "pppp", a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_draw_close_path_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_draw_close_path_fct_##A == (uintptr_t)fct) return my_draw_close_path_##A; + SUPER() + #undef GO + #define GO(A) if (my_draw_close_path_fct_##A == 0) {my_draw_close_path_fct_##A = (uintptr_t)fct; return my_draw_close_path_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw close path callback\n"); + return NULL; +} + +// draw cubic to +#define GO(A) \ +static uintptr_t my_draw_cubic_to_fct_##A = 0; \ +static void my_draw_cubic_to_##A(void* a, void* b, void* c, float d1, float d2, float d3, float d4, float d5, float d6, void* e) \ +{ \ + RunFunctionFmt(my_context, my_draw_cubic_to_fct_##A, "pppffffffp", a, b, c, d1, d2, d3, d4, d5, d6, e); \ +} +SUPER() +#undef GO +static void* find_draw_cubic_to_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_draw_cubic_to_fct_##A == (uintptr_t)fct) return my_draw_cubic_to_##A; + SUPER() + #undef GO + #define GO(A) if (my_draw_cubic_to_fct_##A == 0) {my_draw_cubic_to_fct_##A = (uintptr_t)fct; return my_draw_cubic_to_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw cubic to callback\n"); + return NULL; +} + +// draw line/move to +#define GO(A) \ +static uintptr_t my_draw_line_or_move_to_fct_##A = 0; \ +static void my_draw_line_or_move_to_##A(void* a, void* b, void* c, float d1, float d2, void* e) \ +{ \ + RunFunctionFmt(my_context, my_draw_line_or_move_to_fct_##A, "pppffp", a, b, c, d1, d2, e); \ +} +SUPER() +#undef GO +static void* find_draw_line_or_move_to_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_draw_line_or_move_to_fct_##A == (uintptr_t)fct) return my_draw_line_or_move_to_##A; + SUPER() + #undef GO + #define GO(A) if (my_draw_line_or_move_to_fct_##A == 0) {my_draw_line_or_move_to_fct_##A = (uintptr_t)fct; return my_draw_line_or_move_to_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw line/move to callback\n"); + return NULL; +} + +// draw quadratic to +#define GO(A) \ +static uintptr_t my_draw_quadratic_to_fct_##A = 0; \ +static void my_draw_quadratic_to_##A(void* a, void* b, void* c, float d1, float d2, float d3, float d4, void* e) \ +{ \ + RunFunctionFmt(my_context, my_draw_quadratic_to_fct_##A, "pppffffp", a, b, c, d1, d2, d3, d4, e); \ +} +SUPER() +#undef GO +static void* find_draw_quadratic_to_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_draw_quadratic_to_fct_##A == (uintptr_t)fct) return my_draw_quadratic_to_##A; + SUPER() + #undef GO + #define GO(A) if (my_draw_quadratic_to_fct_##A == 0) {my_draw_quadratic_to_fct_##A = (uintptr_t)fct; return my_draw_quadratic_to_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz draw quadratic to callback\n"); + return NULL; +} + +// reference table +#define GO(A) \ +static uintptr_t my_reference_table_fct_##A = 0; \ +static void* my_reference_table_##A(void* a, uint32_t b, void* c) \ +{ \ + return (void*)RunFunctionFmt(my_context, my_reference_table_fct_##A, "pup", a, b, c); \ +} +SUPER() +#undef GO +static void* find_reference_table_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_reference_table_fct_##A == (uintptr_t)fct) return my_reference_table_##A; + SUPER() + #undef GO + #define GO(A) if (my_reference_table_fct_##A == 0) {my_reference_table_fct_##A = (uintptr_t)fct; return my_reference_table_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz reference table callback\n"); + return NULL; +} + +// unicode combining class +#define GO(A) \ +static uintptr_t my_unicode_combining_class_fct_##A = 0; \ +static uint32_t my_unicode_combining_class_##A(void* a, uint32_t b, void* c)\ +{ \ + return (uint32_t)RunFunctionFmt(my_context, my_unicode_combining_class_fct_##A, "pup", a, b, c); \ +} +SUPER() +#undef GO +static void* find_unicode_combining_class_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_combining_class_fct_##A == (uintptr_t)fct) return my_unicode_combining_class_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_combining_class_fct_##A == 0) {my_unicode_combining_class_fct_##A = (uintptr_t)fct; return my_unicode_combining_class_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode combining class callback\n"); + return NULL; +} + +// unicode compose +#define GO(A) \ +static uintptr_t my_unicode_compose_fct_##A = 0; \ +static int my_unicode_compose_##A(void* a, uint32_t b, uint32_t c, void* d, void* e)\ +{ \ + return (int)RunFunctionFmt(my_context, my_unicode_compose_fct_##A, "puupp", a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_unicode_compose_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_compose_fct_##A == (uintptr_t)fct) return my_unicode_compose_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_compose_fct_##A == 0) {my_unicode_compose_fct_##A = (uintptr_t)fct; return my_unicode_compose_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode compose callback\n"); + return NULL; +} + +// unicode decompose compatibility +#define GO(A) \ +static uintptr_t my_unicode_decompose_compatibility_fct_##A = 0; \ +static uint32_t my_unicode_decompose_compatibility_##A(void* a, uint32_t b, void* c, void* d) \ +{ \ + return (uint32_t)RunFunctionFmt(my_context, my_unicode_decompose_compatibility_fct_##A, "pupp", a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_unicode_decompose_compatibility_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_decompose_compatibility_fct_##A == (uintptr_t)fct) return my_unicode_decompose_compatibility_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_decompose_compatibility_fct_##A == 0) {my_unicode_decompose_compatibility_fct_##A = (uintptr_t)fct; return my_unicode_decompose_compatibility_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode decompose compatibility callback\n"); + return NULL; +} + +// unicode decompose +#define GO(A) \ +static uintptr_t my_unicode_decompose_fct_##A = 0; \ +static int my_unicode_decompose_##A(void* a, uint32_t b, void* c, void* d, void* e) \ +{ \ + return (int)RunFunctionFmt(my_context, my_unicode_decompose_fct_##A, "puppp", a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_unicode_decompose_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_decompose_fct_##A == (uintptr_t)fct) return my_unicode_decompose_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_decompose_fct_##A == 0) {my_unicode_decompose_fct_##A = (uintptr_t)fct; return my_unicode_decompose_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode decompose class callback\n"); + return NULL; +} + +// unicode eastasian width +#define GO(A) \ +static uintptr_t my_unicode_eastasian_width_fct_##A = 0; \ +static uint32_t my_unicode_eastasian_width_##A(void* a, uint32_t b, void* c) \ +{ \ + return (uint32_t)RunFunctionFmt(my_context, my_unicode_eastasian_width_fct_##A, "pup", a, b, c); \ +} +SUPER() +#undef GO +static void* find_unicode_eastasian_width_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_eastasian_width_fct_##A == (uintptr_t)fct) return my_unicode_eastasian_width_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_eastasian_width_fct_##A == 0) {my_unicode_eastasian_width_fct_##A = (uintptr_t)fct; return my_unicode_eastasian_width_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode eastasian width callback\n"); + return NULL; +} + +// unicode general category +#define GO(A) \ +static uintptr_t my_unicode_general_category_fct_##A = 0; \ +static uint32_t my_unicode_general_category_##A(void* a, uint32_t b, void* c) \ +{ \ + return (uint32_t)RunFunctionFmt(my_context, my_unicode_general_category_fct_##A, "pup", a, b, c); \ +} +SUPER() +#undef GO +static void* find_unicode_general_category_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_general_category_fct_##A == (uintptr_t)fct) return my_unicode_general_category_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_general_category_fct_##A == 0) {my_unicode_general_category_fct_##A = (uintptr_t)fct; return my_unicode_general_category_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode general category callback\n"); + return NULL; +} + +// unicode mirroring +#define GO(A) \ +static uintptr_t my_unicode_mirroring_fct_##A = 0; \ +static uint32_t my_unicode_mirroring_##A(void* a, uint32_t b, void* c) \ +{ \ + return (uint32_t)RunFunctionFmt(my_context, my_unicode_mirroring_fct_##A, "pup", a, b, c); \ +} +SUPER() +#undef GO +static void* find_unicode_mirroring_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_mirroring_fct_##A == (uintptr_t)fct) return my_unicode_mirroring_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_mirroring_fct_##A == 0) {my_unicode_mirroring_fct_##A = (uintptr_t)fct; return my_unicode_mirroring_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode mirroring callback\n"); + return NULL; +} + +// unicode script +#define GO(A) \ +static uintptr_t my_unicode_script_fct_##A = 0; \ +static uint32_t my_unicode_script_##A(void* a, uint32_t b, void* c) \ +{ \ + return (uint32_t)RunFunctionFmt(my_context, my_unicode_script_fct_##A, "pup", a, b, c); \ +} +SUPER() +#undef GO +static void* find_unicode_script_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_unicode_script_fct_##A == (uintptr_t)fct) return my_unicode_script_##A; + SUPER() + #undef GO + #define GO(A) if (my_unicode_script_fct_##A == 0) {my_unicode_script_fct_##A = (uintptr_t)fct; return my_unicode_script_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz unicode script callback\n"); + return NULL; +} + +// font extents +#define GO(A) \ +static uintptr_t my_font_extents_fct_##A = 0; \ +static int my_font_extents_##A(void* a, void* b, void* c, void* d) \ +{ \ + return (int)RunFunctionFmt(my_context, my_font_extents_fct_##A, "pppp", a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_font_extents_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_font_extents_fct_##A == (uintptr_t)fct) return my_font_extents_##A; + SUPER() + #undef GO + #define GO(A) if (my_font_extents_fct_##A == 0) {my_font_extents_fct_##A = (uintptr_t)fct; return my_font_extents_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz font extents callback\n"); + return NULL; +} + +// glyph advance +#define GO(A) \ +static uintptr_t my_glyph_advance_fct_##A = 0; \ +static int my_glyph_advance_##A(void* a, void* b, uint32_t c, void* d) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_advance_fct_##A, "ppup", a, b, c, d); \ +} +SUPER() +#undef GO +static void* find_glyph_advance_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_advance_fct_##A == (uintptr_t)fct) return my_glyph_advance_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_advance_fct_##A == 0) {my_glyph_advance_fct_##A = (uintptr_t)fct; return my_glyph_advance_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph advance callback\n"); + return NULL; +} + +// glyph advances +#define GO(A) \ +static uintptr_t my_glyph_advances_fct_##A = 0; \ +static void my_glyph_advances_##A(void* a, void* b, uint32_t c, void* d, uint32_t e, void* f, uint32_t g, void* h) \ +{ \ + RunFunctionFmt(my_context, my_glyph_advances_fct_##A, "ppupupup", a, b, c, d, e, f, g, h); \ +} +SUPER() +#undef GO +static void* find_glyph_advances_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_advances_fct_##A == (uintptr_t)fct) return my_glyph_advances_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_advances_fct_##A == 0) {my_glyph_advances_fct_##A = (uintptr_t)fct; return my_glyph_advances_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph advances callback\n"); + return NULL; +} + +// glyph kerning +#define GO(A) \ +static uintptr_t my_glyph_kerning_fct_##A = 0; \ +static int my_glyph_kerning_##A(void* a, void* b, uint32_t c, uint32_t d, void* e) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_kerning_fct_##A, "ppuup", a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_glyph_kerning_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_kerning_fct_##A == (uintptr_t)fct) return my_glyph_kerning_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_kerning_fct_##A == 0) {my_glyph_kerning_fct_##A = (uintptr_t)fct; return my_glyph_kerning_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph kerning callback\n"); + return NULL; +} + +// glyph origin +#define GO(A) \ +static uintptr_t my_glyph_origin_fct_##A = 0; \ +static int my_glyph_origin_##A(void* a, void* b, uint32_t c, void* d, void* e, void* f) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_origin_fct_##A, "ppuppp", a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_glyph_origin_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_origin_fct_##A == (uintptr_t)fct) return my_glyph_origin_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_origin_fct_##A == 0) {my_glyph_origin_fct_##A = (uintptr_t)fct; return my_glyph_origin_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph origin callback\n"); + return NULL; +} + +// glyph contour point +#define GO(A) \ +static uintptr_t my_glyph_contour_pointfct_##A = 0; \ +static int my_glyph_contour_point##A(void* a, void* b, uint32_t c, uint32_t d, void* e, void* f, void* g) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_contour_pointfct_##A, "ppuuppp", a, b, c, d, e, f, g); \ +} +SUPER() +#undef GO +static void* find_glyph_contour_point_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_contour_pointfct_##A == (uintptr_t)fct) return my_glyph_contour_point##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_contour_pointfct_##A == 0) {my_glyph_contour_pointfct_##A = (uintptr_t)fct; return my_glyph_contour_point##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph contour point callback\n"); + return NULL; +} + +// glyph extents +#define GO(A) \ +static uintptr_t my_glyph_extents_fct_##A = 0; \ +static int my_glyph_extents_##A(void* a, void* b, uint32_t c, void* d, void* e) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_extents_fct_##A, "ppupp", a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_glyph_extents_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_extents_fct_##A == (uintptr_t)fct) return my_glyph_extents_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_extents_fct_##A == 0) {my_glyph_extents_fct_##A = (uintptr_t)fct; return my_glyph_extents_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph extents callback\n"); + return NULL; +} + +// glyph from name +#define GO(A) \ +static uintptr_t my_glyph_from_name_fct_##A = 0; \ +static int my_glyph_from_name_##A(void* a, void* b, void* c, int d, void* e, void* f) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_from_name_fct_##A, "pppipp", a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_glyph_from_name_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_from_name_fct_##A == (uintptr_t)fct) return my_glyph_from_name_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_from_name_fct_##A == 0) {my_glyph_from_name_fct_##A = (uintptr_t)fct; return my_glyph_from_name_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph from name callback\n"); + return NULL; +} + + + + + + +// glyph +#define GO(A) \ +static uintptr_t my_glyph_fct_##A = 0; \ +static int my_glyph_##A(void* a, void* b, uint32_t c, uint32_t d, void* e, void* f) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_fct_##A, "ppuupp", a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_glyph_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_fct_##A == (uintptr_t)fct) return my_glyph_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_fct_##A == 0) {my_glyph_fct_##A = (uintptr_t)fct; return my_glyph_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph callback\n"); + return NULL; +} + +// glyph name +#define GO(A) \ +static uintptr_t my_glyph_name_fct_##A = 0; \ +static int my_glyph_name_##A(void* a, void* b, uint32_t c, void* d, uint32_t e, void* f) \ +{ \ + return (int)RunFunctionFmt(my_context, my_glyph_name_fct_##A, "ppupup", a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_glyph_name_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_name_fct_##A == (uintptr_t)fct) return my_glyph_name_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_name_fct_##A == 0) {my_glyph_name_fct_##A = (uintptr_t)fct; return my_glyph_name_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph origin callback\n"); + return NULL; +} + +// glyph shape +#define GO(A) \ +static uintptr_t my_glyph_shape_fct_##A = 0; \ +static void my_glyph_shape_##A(void* a, void* b, uint32_t c, void* d, void* e, void* f) \ +{ \ + RunFunctionFmt(my_context, my_glyph_shape_fct_##A, "ppuppp", a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_glyph_shape_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_glyph_shape_fct_##A == (uintptr_t)fct) return my_glyph_shape_##A; + SUPER() + #undef GO + #define GO(A) if (my_glyph_shape_fct_##A == 0) {my_glyph_shape_fct_##A = (uintptr_t)fct; return my_glyph_shape_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz glyph shape callback\n"); + return NULL; +} + +// nominal glyph +#define GO(A) \ +static uintptr_t my_nominal_glyph_fct_##A = 0; \ +static int my_nominal_glyph_##A(void* a, void* b, uint32_t c, void* d, void* e) \ +{ \ + return (int)RunFunctionFmt(my_context, my_nominal_glyph_fct_##A, "ppupp", a, b, c, d, e); \ +} +SUPER() +#undef GO +static void* find_nominal_glyph_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_nominal_glyph_fct_##A == (uintptr_t)fct) return my_nominal_glyph_##A; + SUPER() + #undef GO + #define GO(A) if (my_nominal_glyph_fct_##A == 0) {my_nominal_glyph_fct_##A = (uintptr_t)fct; return my_nominal_glyph_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz nominal glyph callback\n"); + return NULL; +} + + + + + + +// nominal glyphs +#define GO(A) \ +static uintptr_t my_nominal_glyphs_fct_##A = 0; \ +static uint32_t my_nominal_glyphs_##A(void* a, void* b, uint32_t c, void* d, uint32_t e, void* f, uint32_t g, void* h) \ +{ \ + return (uint32_t)RunFunctionFmt(my_context, my_nominal_glyphs_fct_##A, "ppupupup", a, b, c, d, e, f, g, h); \ +} +SUPER() +#undef GO +static void* find_nominal_glyphs_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_nominal_glyphs_fct_##A == (uintptr_t)fct) return my_nominal_glyphs_##A; + SUPER() + #undef GO + #define GO(A) if (my_nominal_glyphs_fct_##A == 0) {my_nominal_glyphs_fct_##A = (uintptr_t)fct; return my_nominal_glyphs_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz nominal glyphs callback\n"); + return NULL; +} + +// variation glyph +#define GO(A) \ +static uintptr_t my_variation_glyph_fct_##A = 0;\ +static int my_variation_glyph_##A(void* a, void* b, uint32_t c, uint32_t d, void* e, void* f) \ +{ \ + return (int)RunFunctionFmt(my_context, my_variation_glyph_fct_##A, "ppuupp", a, b, c, d, e, f); \ +} +SUPER() +#undef GO +static void* find_variation_glyph_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_variation_glyph_fct_##A == (uintptr_t)fct) return my_variation_glyph_##A; + SUPER() + #undef GO + #define GO(A) if (my_variation_glyph_fct_##A == 0) {my_variation_glyph_fct_##A = (uintptr_t)fct; return my_variation_glyph_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz variation glyph callback\n"); + return NULL; +} + +// destroy +#define GO(A) \ +static uintptr_t my_destroy_fct_##A = 0; \ +static void my_destroy_##A(void* a) \ +{ \ + RunFunctionFmt(my_context, my_destroy_fct_##A, "p", a); \ +} +SUPER() +#undef GO +static void* find_destroy_Fct(void* fct) +{ + if (!fct) return NULL; + if (GetNativeFnc((uintptr_t)fct)) return GetNativeFnc((uintptr_t)fct); + #define GO(A) if (my_destroy_fct_##A == (uintptr_t)fct) return my_destroy_##A; + SUPER() + #undef GO + #define GO(A) if (my_destroy_fct_##A == 0) {my_destroy_fct_##A = (uintptr_t)fct; return my_destroy_##A;} + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for libharfbuzz destroy callback\n"); + return NULL; +} + +#undef SUPER + +#define FUNC(A) \ +EXPORT void* my_##A(x64emu_t* emu, void* data, uint32_t length, uint32_t mode, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + return my->A(data, length, mode, user_data, find_destroy_Fct(destroy)); \ +} + +FUNC(hb_blob_create) +FUNC(hb_blob_create_or_fail) + +#undef FUNC + +#define FUNC(A) \ +EXPORT int my_##A(x64emu_t* emu, void* blob, void* key, void* data, void* destroy, int replace) \ +{ \ + (void)emu; \ + return (int)my->A(blob, key, data, find_destroy_Fct(destroy), replace); \ +} + +FUNC(hb_blob_set_user_data) +FUNC(hb_buffer_set_user_data) + +#undef FUNC + +#define FUNC(A) \ +EXPORT void my_##A(x64emu_t* emu, void* buffer, void* func, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + my->A(buffer, find_buffer_message_Fct(func), user_data, find_destroy_Fct(destroy)); \ +} + +FUNC(hb_buffer_set_message_func) + +#undef FUNC + +EXPORT void my_hb_draw_funcs_destroy(x64emu_t* emu, void* funcs) +{ + (void)emu; + struct hb_draw_funcs_t__destroy destroy = {0}; + struct hb_draw_funcs_t* funcs_ = funcs; + +#define HB_DRAW_FUNC_IMPLEMENT(name) \ + if (funcs_->destroy->name) destroy.name = find_destroy_Fct(funcs_->destroy->name); + HB_DRAW_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_DRAW_FUNC_IMPLEMENT + + struct hb_draw_funcs_t__destroy* original = funcs_->destroy; + funcs_->destroy = &destroy; + my->hb_draw_funcs_destroy(funcs); + funcs_->destroy = original; +} + +EXPORT void my_hb_draw_funcs_set_close_path_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_draw_funcs_set_close_path_func(funcs, find_draw_close_path_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_draw_funcs_set_cubic_to_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_draw_funcs_set_cubic_to_func(funcs, find_draw_cubic_to_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +#define FUNC(A) \ +EXPORT void my_##A(x64emu_t* emu, void* buffer, void* func, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + my->A(buffer, find_draw_line_or_move_to_Fct(func), user_data, find_destroy_Fct(destroy)); \ +} + +FUNC(hb_draw_funcs_set_line_to_func) +FUNC(hb_draw_funcs_set_move_to_func) + +#undef FUNC + +EXPORT void my_hb_draw_funcs_set_quadratic_to_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_draw_funcs_set_quadratic_to_func(funcs, find_draw_quadratic_to_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void* my_hb_face_create_for_tables(x64emu_t* emu, void* func, void* user_data, void* destroy) +{ + (void)emu; + return my->hb_face_create_for_tables(find_reference_table_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT int my_hb_face_set_user_data(x64emu_t* emu, void* face, void* key, void* data, void* destroy, int replace) +{ + (void)emu; + return (int)my->hb_face_set_user_data(face, key, data, find_destroy_Fct(destroy), replace); +} + +EXPORT void my_hb_font_funcs_destroy(x64emu_t* emu, void* funcs) +{ + (void)emu; + struct hb_font_funcs_t__destroy destroy = {0}; + struct hb_font_funcs_t* funcs_ = funcs; + +#define HB_FONT_FUNC_IMPLEMENT(get_,name) \ + if (funcs_->destroy->name) destroy.name = find_destroy_Fct(funcs_->destroy->name); + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + + struct hb_font_funcs_t__destroy* original = funcs_->destroy; + funcs_->destroy = &destroy; + my->hb_font_funcs_destroy(funcs); + funcs_->destroy = original; +} + +EXPORT void my_hb_unicode_funcs_destroy(x64emu_t* emu, void* funcs) +{ + (void)emu; + struct hb_unicode_funcs_t__destroy destroy = {0}; + struct hb_unicode_funcs_t* funcs_ = funcs; + +#define HB_UNICODE_FUNC_IMPLEMENT(name) \ + if (funcs_->destroy.name) destroy.name = find_destroy_Fct(funcs_->destroy.name); + HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_UNICODE_FUNC_IMPLEMENT + + struct hb_unicode_funcs_t__destroy original = funcs_->destroy; + funcs_->destroy = destroy; + my->hb_font_funcs_destroy(funcs); + funcs_->destroy = original; +} + +EXPORT void my_hb_unicode_funcs_set_combining_class_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_combining_class_func(funcs, find_unicode_combining_class_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_unicode_funcs_set_compose_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_compose_func(funcs, find_unicode_compose_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_unicode_funcs_set_decompose_compatibility_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_decompose_compatibility_func(funcs, find_unicode_decompose_compatibility_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_unicode_funcs_set_decompose_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_decompose_func(funcs, find_unicode_decompose_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_unicode_funcs_set_eastasian_width_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_eastasian_width_func(funcs, find_unicode_eastasian_width_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_unicode_funcs_set_general_category_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_general_category_func(funcs, find_unicode_general_category_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_unicode_funcs_set_mirroring_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_mirroring_func(funcs, find_unicode_mirroring_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_unicode_funcs_set_script_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_unicode_funcs_set_script_func(funcs, find_unicode_script_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT int my_hb_unicode_funcs_set_user_data(x64emu_t* emu, void* funcs, void* key, void* data, void* destroy, int replace) +{ + (void)emu; + return (int)my->hb_unicode_funcs_set_user_data(funcs, key, data, find_destroy_Fct(destroy), replace); +} + +#define FUNC(A) \ +EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + my->A(funcs, find_font_extents_Fct(func), user_data, find_destroy_Fct(destroy));\ +} + +FUNC(hb_font_funcs_set_font_h_extents_func) +FUNC(hb_font_funcs_set_font_v_extents_func) + +#undef FUNC + + +#define FUNC(A) \ +EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + my->A(funcs, find_glyph_advance_Fct(func), user_data, find_destroy_Fct(destroy)); \ +} + +FUNC(hb_font_funcs_set_glyph_h_advance_func) +FUNC(hb_font_funcs_set_glyph_v_advance_func) + +#undef FUNC + + +#define FUNC(A) \ +EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + my->A(funcs, find_glyph_advances_Fct(func), user_data, find_destroy_Fct(destroy)); \ +} + +FUNC(hb_font_funcs_set_glyph_h_advances_func) +FUNC(hb_font_funcs_set_glyph_v_advances_func) + +#undef FUNC + + +#define FUNC(A) \ +EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + my->A(funcs, find_glyph_kerning_Fct(func), user_data, find_destroy_Fct(destroy)); \ +} + +FUNC(hb_font_funcs_set_glyph_h_kerning_func) +FUNC(hb_font_funcs_set_glyph_v_kerning_func) + +#undef FUNC + + +#define FUNC(A) \ +EXPORT void my_##A(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) \ +{ \ + (void)emu; \ + my->A(funcs, find_glyph_origin_Fct(func), user_data, find_destroy_Fct(destroy));\ +} + +FUNC(hb_font_funcs_set_glyph_h_origin_func) +FUNC(hb_font_funcs_set_glyph_v_origin_func) + +#undef FUNC + +EXPORT void my_hb_font_funcs_set_glyph_contour_point_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_glyph_contour_point_func(funcs, find_glyph_contour_point_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_glyph_extents_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_glyph_extents_func(funcs, find_glyph_extents_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_glyph_from_name_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_glyph_from_name_func(funcs, find_glyph_from_name_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_glyph_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_glyph_func(funcs, find_glyph_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_glyph_name_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_glyph_name_func(funcs, find_glyph_name_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_glyph_shape_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_glyph_shape_func(funcs, find_glyph_shape_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_nominal_glyph_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_nominal_glyph_func(funcs, find_nominal_glyph_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_nominal_glyphs_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_nominal_glyphs_func(funcs, find_nominal_glyphs_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT void my_hb_font_funcs_set_variation_glyph_func(x64emu_t* emu, void* funcs, void* func, void* user_data, void* destroy) +{ + (void)emu; + my->hb_font_funcs_set_variation_glyph_func(funcs, find_variation_glyph_Fct(func), user_data, find_destroy_Fct(destroy)); +} + +EXPORT int my_hb_font_funcs_set_user_data(x64emu_t* emu, void* funcs, void* key, void* data, void* destroy, int replace) +{ + (void)emu; + return (int)my->hb_font_funcs_set_user_data(funcs, key, data, find_destroy_Fct(destroy), replace); +} + +EXPORT int my_hb_font_set_funcs(x64emu_t* emu, void* font, void* klass, void* data, void* destroy) +{ + (void)emu; + my->hb_font_set_funcs(font, klass, data, find_destroy_Fct(destroy)); +} + +EXPORT int my_hb_font_set_funcs_data(x64emu_t* emu, void* font, void* data, void* destroy) +{ + (void)emu; + my->hb_font_set_funcs_data(font, data, find_destroy_Fct(destroy)); +} + +EXPORT int my_hb_font_set_user_data(x64emu_t* emu, void* font, void* key, void* data, void* destroy, int replace) +{ + (void)emu; + return (int)my->hb_font_set_user_data(font, key, data, find_destroy_Fct(destroy), replace); +} + +#define CUSTOM_INIT \ + getMy(lib); + +#define CUSTOM_FINI \ + freeMy(); + #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibharfbuzz_private.h b/src/wrapped/wrappedlibharfbuzz_private.h index fd1bb14b..2637f842 100644 --- a/src/wrapped/wrappedlibharfbuzz_private.h +++ b/src/wrapped/wrappedlibharfbuzz_private.h @@ -5,39 +5,39 @@ GO(hb_aat_layout_feature_type_get_name_id, uFpu) GO(hb_aat_layout_feature_type_get_selector_infos, uFpuuppp) GO(hb_aat_layout_get_feature_types, uFpupp) -//GO(hb_aat_layout_has_positioning, -//GO(hb_aat_layout_has_substitution, +GO(hb_aat_layout_has_positioning, iFp) +GO(hb_aat_layout_has_substitution, iFp) GO(hb_aat_layout_has_tracking, iFp) -//GO(hb_blob_copy_writable_or_fail, -//GO(hb_blob_create, -//GO(hb_blob_create_from_file, +GO(hb_blob_copy_writable_or_fail, pFp) +GOM(hb_blob_create, pFEpuupp) +GOM(hb_blob_create_or_fail, pFEpuupp) +GO(hb_blob_create_from_file, pFp) GO(hb_blob_create_from_file_or_fail, pFp) -//GO(hb_blob_create_or_fail, GO(hb_blob_create_sub_blob, pFpuu) -//GO(hb_blob_destroy, +GO(hb_blob_destroy, vFp) GO(hb_blob_get_data, pFpp) GO(hb_blob_get_data_writable, pFpp) GO(hb_blob_get_empty, pFv) -//GO(hb_blob_get_length, +GO(hb_blob_get_length, uFp) GO(hb_blob_get_user_data, pFpp) GO(hb_blob_is_immutable, iFp) GO(hb_blob_make_immutable, vFp) GO(hb_blob_reference, pFp) -//GO(hb_blob_set_user_data, +GOM(hb_blob_set_user_data, iFEppppi) GO(hb_buffer_add, vFpuu) GO(hb_buffer_add_codepoints, vFppiui) GO(hb_buffer_add_latin1, vFppiui) GO(hb_buffer_add_utf16, vFppiui) GO(hb_buffer_add_utf32, vFppiui) GO(hb_buffer_add_utf8, vFppiui) -//GO(hb_buffer_allocation_successful, +GO(hb_buffer_allocation_successful, iFp) GO(hb_buffer_append, vFppuu) -//GO(hb_buffer_clear_contents, -//GO(hb_buffer_create, +GO(hb_buffer_clear_contents, vFp) +GO(hb_buffer_create, pFv) GO(hb_buffer_create_similar, pFp) GO(hb_buffer_deserialize_glyphs, iFppippu) GO(hb_buffer_deserialize_unicode, iFppipu) -//GO(hb_buffer_destroy, +GO(hb_buffer_destroy, vFp) GO(hb_buffer_diff, uFppuu) GO(hb_buffer_get_cluster_level, uFp) GO(hb_buffer_get_content_type, uFp) @@ -46,80 +46,80 @@ GO(hb_buffer_get_empty, pFv) GO(hb_buffer_get_flags, uFp) GO(hb_buffer_get_glyph_infos, pFpp) GO(hb_buffer_get_glyph_positions, pFpp) -//GO(hb_buffer_get_invisible_glyph, +GO(hb_buffer_get_invisible_glyph, uFp) GO(hb_buffer_get_language, pFp) GO(hb_buffer_get_length, uFp) GO(hb_buffer_get_not_found_glyph, uFp) -//GO(hb_buffer_get_replacement_codepoint, +GO(hb_buffer_get_replacement_codepoint, uFp) GO(hb_buffer_get_script, uFp) GO(hb_buffer_get_segment_properties, vFpp) GO(hb_buffer_get_unicode_funcs, pFp) GO(hb_buffer_get_user_data, pFpp) -//GO(hb_buffer_guess_segment_properties, +GO(hb_buffer_guess_segment_properties, vFp) GO(hb_buffer_has_positions, iFp) GO(hb_buffer_normalize_glyphs, vFp) -//GO(hb_buffer_pre_allocate, +GO(hb_buffer_pre_allocate, iFpu) GO(hb_buffer_reference, pFp) -//GO(hb_buffer_reset, -//GO(hb_buffer_reverse, -//GO(hb_buffer_reverse_clusters, +GO(hb_buffer_reset, vFp) +GO(hb_buffer_reverse, vFp) +GO(hb_buffer_reverse_clusters, vFp) GO(hb_buffer_reverse_range, vFpuu) GO(hb_buffer_serialize, uFpuupuppuu) GO(hb_buffer_serialize_format_from_string, uFpi) GO(hb_buffer_serialize_format_to_string, pFu) -//GO(hb_buffer_serialize_glyphs, -//GO(hb_buffer_serialize_list_formats, +GO(hb_buffer_serialize_glyphs, uFpuupuppuu) +GO(hb_buffer_serialize_list_formats, pFv) GO(hb_buffer_serialize_unicode, uFpuupupuu) GO(hb_buffer_set_cluster_level, vFpu) GO(hb_buffer_set_content_type, vFpu) GO(hb_buffer_set_direction, vFpu) GO(hb_buffer_set_flags, vFpu) -//GO(hb_buffer_set_invisible_glyph, +GO(hb_buffer_set_invisible_glyph, vFpu) GO(hb_buffer_set_language, vFpp) GO(hb_buffer_set_length, iFpu) -//GO(hb_buffer_set_message_func, +GOM(hb_buffer_set_message_func, vFEpppp) GO(hb_buffer_set_not_found_glyph, vFpu) -//GO(hb_buffer_set_replacement_codepoint, +GO(hb_buffer_set_replacement_codepoint, vFpu) GO(hb_buffer_set_script, vFpu) GO(hb_buffer_set_segment_properties, vFpp) GO(hb_buffer_set_unicode_funcs, vFpp) -//GO(hb_buffer_set_user_data, -//GO(hb_color_get_alpha, +GOM(hb_buffer_set_user_data, iFEppppi) +GO(hb_color_get_alpha, CFu) GO(hb_color_get_blue, CFu) -//GO(hb_color_get_green, -//GO(hb_color_get_red, +GO(hb_color_get_green, CFu) +GO(hb_color_get_red, CFu) GO(hb_direction_from_string, uFpi) GO(hb_direction_to_string, pFu) GO(hb_draw_close_path, vFppp) GO(hb_draw_cubic_to, vFpppffffff) -GO(hb_draw_funcs_create, pFv) -//GO(hb_draw_funcs_destroy, +GO(hb_draw_funcs_create, pFv) // No need to reverse. +GOM(hb_draw_funcs_destroy, vFEp) GO(hb_draw_funcs_is_immutable, iFp) GO(hb_draw_funcs_make_immutable, vFp) GO(hb_draw_funcs_reference, pFp) -//GO(hb_draw_funcs_set_close_path_func, -//GO(hb_draw_funcs_set_cubic_to_func, -//GO(hb_draw_funcs_set_line_to_func, -//GO(hb_draw_funcs_set_move_to_func, -//GO(hb_draw_funcs_set_quadratic_to_func, +GOM(hb_draw_funcs_set_close_path_func, vFEpppp) +GOM(hb_draw_funcs_set_cubic_to_func, vFEpppp) +GOM(hb_draw_funcs_set_line_to_func, vFEpppp) +GOM(hb_draw_funcs_set_move_to_func, vFEpppp) +GOM(hb_draw_funcs_set_quadratic_to_func, vFEpppp) GO(hb_draw_line_to, vFpppff) -//GO(hb_draw_move_to, +GO(hb_draw_move_to, vFpppff) GO(hb_draw_quadratic_to, vFpppffff) GO(hb_face_builder_add_table, iFpup) GO(hb_face_builder_create, pFv) GO(hb_face_builder_sort_tables, vFpp) -//GO(hb_face_collect_unicodes, +GO(hb_face_collect_unicodes, vFpp) GO(hb_face_collect_variation_selectors, vFpp) GO(hb_face_collect_variation_unicodes, vFpup) GO(hb_face_count, uFp) GO(hb_face_create, pFpu) -//GO(hb_face_create_for_tables, -//GO(hb_face_destroy, -//GO(hb_face_get_empty, +GOM(hb_face_create_for_tables, pFEppp) +GO(hb_face_destroy, vFp) +GO(hb_face_get_empty, pFv) GO(hb_face_get_glyph_count, uFp) -//GO(hb_face_get_index, +GO(hb_face_get_index, uFp) GO(hb_face_get_table_tags, uFpupp) -//GO(hb_face_get_upem, +GO(hb_face_get_upem, uFp) GO(hb_face_get_user_data, pFpp) GO(hb_face_is_immutable, iFp) GO(hb_face_make_immutable, vFp) @@ -127,132 +127,132 @@ GO(hb_face_reference, pFp) GO(hb_face_reference_blob, pFp) GO(hb_face_reference_table, pFpu) GO(hb_face_set_glyph_count, vFpu) -//GO(hb_face_set_index, -//GO(hb_face_set_upem, -//GO(hb_face_set_user_data, +GO(hb_face_set_index, vFpu) +GO(hb_face_set_upem, vFpu) +GOM(hb_face_set_user_data, iFEppppi) GO(hb_feature_from_string, iFpip) GO(hb_feature_to_string, vFppu) -//GO(hb_font_add_glyph_origin_for_direction, +GO(hb_font_add_glyph_origin_for_direction, vFpuupp) GO(hb_font_changed, vFp) GO(hb_font_create, pFp) -//GO(hb_font_create_sub_font, -//GO(hb_font_destroy, -//GO(hb_font_funcs_create, -//GO(hb_font_funcs_destroy, +GO(hb_font_create_sub_font, pFp) +GO(hb_font_destroy, vFp) +GO(hb_font_funcs_create, pFv) // No need to reverse. +GOM(hb_font_funcs_destroy, vFEp) GO(hb_font_funcs_get_empty, pFv) GO(hb_font_funcs_get_user_data, pFpp) GO(hb_font_funcs_is_immutable, iFp) GO(hb_font_funcs_make_immutable, vFp) GO(hb_font_funcs_reference, pFp) -//GO(hb_font_funcs_set_font_h_extents_func, -//GO(hb_font_funcs_set_font_v_extents_func, -//GO(hb_font_funcs_set_glyph_contour_point_func, -//GO(hb_font_funcs_set_glyph_extents_func, -//GO(hb_font_funcs_set_glyph_from_name_func, -//GO(hb_font_funcs_set_glyph_func, -//GO(hb_font_funcs_set_glyph_h_advance_func, -//GO(hb_font_funcs_set_glyph_h_advances_func, -//GO(hb_font_funcs_set_glyph_h_kerning_func, -//GO(hb_font_funcs_set_glyph_h_origin_func, -//GO(hb_font_funcs_set_glyph_name_func, -//GO(hb_font_funcs_set_glyph_shape_func, -//GO(hb_font_funcs_set_glyph_v_advance_func, -//GO(hb_font_funcs_set_glyph_v_advances_func, -//GO(hb_font_funcs_set_glyph_v_kerning_func, -//GO(hb_font_funcs_set_glyph_v_origin_func, -//GO(hb_font_funcs_set_nominal_glyph_func, -//GO(hb_font_funcs_set_nominal_glyphs_func, -//GO(hb_font_funcs_set_user_data, -//GO(hb_font_funcs_set_variation_glyph_func, +GOM(hb_font_funcs_set_font_h_extents_func, vFEpppp) +GOM(hb_font_funcs_set_font_v_extents_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_h_advance_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_v_advance_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_h_advances_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_v_advances_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_h_kerning_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_v_kerning_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_h_origin_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_v_origin_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_contour_point_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_extents_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_from_name_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_name_func, vFEpppp) +GOM(hb_font_funcs_set_glyph_shape_func, vFEpppp) +GOM(hb_font_funcs_set_nominal_glyph_func, vFEpppp) +GOM(hb_font_funcs_set_nominal_glyphs_func, vFEpppp) +GOM(hb_font_funcs_set_variation_glyph_func, vFEpppp) +GOM(hb_font_funcs_set_user_data, iFEppppi) GO(hb_font_get_empty, pFv) GO(hb_font_get_extents_for_direction, vFpup) GO(hb_font_get_face, pFp) GO(hb_font_get_glyph, iFpuup) -//GO(hb_font_get_glyph_advance_for_direction, +GO(hb_font_get_glyph_advance_for_direction, vFpuupp) GO(hb_font_get_glyph_advances_for_direction, vFpuupupu) GO(hb_font_get_glyph_contour_point, iFpuupp) GO(hb_font_get_glyph_contour_point_for_origin, iFpuuupp) GO(hb_font_get_glyph_extents, iFpup) GO(hb_font_get_glyph_extents_for_origin, iFpuup) -//GO(hb_font_get_glyph_from_name, -//GO(hb_font_get_glyph_h_advance, -//GO(hb_font_get_glyph_h_advances, -//GO(hb_font_get_glyph_h_kerning, -//GO(hb_font_get_glyph_h_origin, +GO(hb_font_get_glyph_from_name, iFppip) +GO(hb_font_get_glyph_h_advance, iFpu) +GO(hb_font_get_glyph_h_advances, vFpupupu) +GO(hb_font_get_glyph_h_kerning, iFpuu) +GO(hb_font_get_glyph_h_origin, iFpupp) GO(hb_font_get_glyph_kerning_for_direction, vFpuuupp) GO(hb_font_get_glyph_name, iFpupu) -//GO(hb_font_get_glyph_origin_for_direction, +GO(hb_font_get_glyph_origin_for_direction, vFpuupp) GO(hb_font_get_glyph_shape, vFpupp) GO(hb_font_get_glyph_v_advance, iFpu) GO(hb_font_get_glyph_v_advances, vFpupupu) GO(hb_font_get_glyph_v_kerning, iFpuu) GO(hb_font_get_glyph_v_origin, iFpupp) -//GO(hb_font_get_h_extents, +GO(hb_font_get_h_extents, iFpp) GO(hb_font_get_nominal_glyph, iFpup) GO(hb_font_get_nominal_glyphs, uFpupupu) GO(hb_font_get_parent, pFp) GO(hb_font_get_ppem, vFppp) -//GO(hb_font_get_ptem, +GO(hb_font_get_ptem, fFp) GO(hb_font_get_scale, vFppp) GO(hb_font_get_serial, uFp) GO(hb_font_get_synthetic_slant, fFp) GO(hb_font_get_user_data, pFpp) GO(hb_font_get_var_coords_design, pFpp) GO(hb_font_get_var_coords_normalized, pFpp) -//GO(hb_font_get_variation_glyph, +GO(hb_font_get_variation_glyph, iFpuup) GO(hb_font_get_v_extents, iFpp) GO(hb_font_glyph_from_string, iFppip) GO(hb_font_glyph_to_string, vFpupu) GO(hb_font_is_immutable, iFp) -//GO(hb_font_make_immutable, -//GO(hb_font_reference, +GO(hb_font_make_immutable, vFp) +GO(hb_font_reference, pFp) GO(hb_font_set_face, vFpp) -//GO(hb_font_set_funcs, -//GO(hb_font_set_funcs_data, +GOM(hb_font_set_funcs, vFEpppp) +GOM(hb_font_set_funcs_data, vFEppp) GO(hb_font_set_parent, vFpp) GO(hb_font_set_ppem, vFpuu) -//GO(hb_font_set_ptem, +GO(hb_font_set_ptem, vFpf) GO(hb_font_set_scale, vFpii) GO(hb_font_set_synthetic_slant, vFpf) -//GO(hb_font_set_user_data, +GOM(hb_font_set_user_data, iFEppppi) GO(hb_font_set_var_coords_design, vFppu) GO(hb_font_set_var_coords_normalized, vFppu) GO(hb_font_set_variations, vFppu) GO(hb_font_set_var_named_instance, vFpu) GO(hb_font_subtract_glyph_origin_for_direction, vFpuupp) //GO(hb_ft_face_create, -//GO(hb_ft_face_create_cached, -//GO(hb_ft_face_create_referenced, -//GO(hb_ft_font_changed, +GO(hb_ft_face_create_cached, pFp) +GO(hb_ft_face_create_referenced, pFp) +GO(hb_ft_font_changed, vFp) //GO(hb_ft_font_create, -//GO(hb_ft_font_create_referenced, -//GO(hb_ft_font_get_face, +GO(hb_ft_font_create_referenced, pFp) +GO(hb_ft_font_get_face, pFp) GO(hb_ft_font_get_load_flags, iFp) -//GO(hb_ft_font_lock_face, +GO(hb_ft_font_lock_face, pFp) GO(hb_ft_font_set_funcs, vFp) GO(hb_ft_font_set_load_flags, vFpi) -//GO(hb_ft_font_unlock_face, +GO(hb_ft_font_unlock_face, vFp) GO(hb_ft_hb_font_changed, iFp) -//GO(hb_glib_blob_create, -//GO(hb_glib_get_unicode_funcs, -//GO(hb_glib_script_from_script, -//GO(hb_glib_script_to_script, +GO(hb_glib_blob_create, pFp) +GO(hb_glib_get_unicode_funcs, pFv) +GO(hb_glib_script_from_script, uFu) +GO(hb_glib_script_to_script, uFu) GO(hb_glyph_info_get_glyph_flags, uFp) -//GO(hb_graphite2_face_get_gr_face, -//GO(hb_graphite2_font_get_gr_font, +GO(hb_graphite2_face_get_gr_face, pFp) +GO(hb_graphite2_font_get_gr_font, pFp) GO(hb_language_from_string, pFpi) GO(hb_language_get_default, pFv) GO(hb_language_matches, iFpp) GO(hb_language_to_string, pFp) -//GO(hb_map_allocation_successful, +GO(hb_map_allocation_successful, iFp) GO(hb_map_clear, vFp) GO(hb_map_copy, pFp) -//GO(hb_map_create, +GO(hb_map_create, pFv) GO(hb_map_del, vFpu) -//GO(hb_map_destroy, +GO(hb_map_destroy, vFp) GO(hb_map_get, uFpu) GO(hb_map_get_empty, pFv) -//GO(hb_map_get_population, +GO(hb_map_get_population, uFp) GO(hb_map_get_user_data, pFpp) GO(hb_map_has, iFpu) GO(hb_map_hash, uFp) @@ -264,17 +264,17 @@ GO(hb_map_set, vFpuu) GO(hb_ot_color_glyph_get_layers, uFpuupp) GO(hb_ot_color_glyph_reference_png, pFpu) GO(hb_ot_color_glyph_reference_svg, pFpu) -//GO(hb_ot_color_has_layers, -//GO(hb_ot_color_has_palettes, -//GO(hb_ot_color_has_png, -//GO(hb_ot_color_has_svg, -//GO(hb_ot_color_palette_color_get_name_id, +GO(hb_ot_color_has_layers, iFp) +GO(hb_ot_color_has_palettes, iFp) +GO(hb_ot_color_has_png, iFp) +GO(hb_ot_color_has_svg, iFp) +GO(hb_ot_color_palette_color_get_name_id, uFpu) GO(hb_ot_color_palette_get_colors, uFpuupp) -//GO(hb_ot_color_palette_get_count, +GO(hb_ot_color_palette_get_count, uFp) GO(hb_ot_color_palette_get_flags, uFpu) -//GO(hb_ot_color_palette_get_name_id, +GO(hb_ot_color_palette_get_name_id, uFpu) GO(hb_ot_font_set_funcs, vFp) -//GO(hb_ot_layout_collect_features, +GO(hb_ot_layout_collect_features, vFpupppp) GO(hb_ot_layout_collect_lookups, vFpupppp) GO(hb_ot_layout_feature_get_characters, uFpuuupp) GO(hb_ot_layout_feature_get_lookups, uFpuuupp) @@ -288,11 +288,11 @@ GO(hb_ot_layout_get_glyphs_in_class, vFpup) GO(hb_ot_layout_get_horizontal_baseline_tag_for_script, uFu) GO(hb_ot_layout_get_ligature_carets, uFpuuupp) GO(hb_ot_layout_get_size_params, iFpppppp) -//GO(hb_ot_layout_has_glyph_classes, -//GO(hb_ot_layout_has_positioning, -//GO(hb_ot_layout_has_substitution, +GO(hb_ot_layout_has_glyph_classes, iFp) +GO(hb_ot_layout_has_positioning, iFp) +GO(hb_ot_layout_has_substitution, iFp) GO(hb_ot_layout_language_find_feature, iFpuuuup) -//GO(hb_ot_layout_language_get_feature_indexes, +GO(hb_ot_layout_language_get_feature_indexes, uFpuuuupp) GO(hb_ot_layout_language_get_feature_tags, uFpuuuupp) GO(hb_ot_layout_language_get_required_feature, iFpuuupp) GO(hb_ot_layout_language_get_required_feature_index, iFpuuup) @@ -310,24 +310,24 @@ GO(hb_ot_layout_table_find_feature_variations, iFpupup) GO(hb_ot_layout_table_find_script, iFpuup) GO(hb_ot_layout_table_get_feature_tags, uFpuupp) GO(hb_ot_layout_table_get_lookup_count, uFpu) -//GO(hb_ot_layout_table_get_script_tags, +GO(hb_ot_layout_table_get_script_tags, uFpuupp) GO(hb_ot_layout_table_select_script, iFpuuppp) GO(hb_ot_math_get_constant, iFpu) GO(hb_ot_math_get_glyph_assembly, uFpuuuppp) -//GO(hb_ot_math_get_glyph_italics_correction, +GO(hb_ot_math_get_glyph_italics_correction, iFpu) GO(hb_ot_math_get_glyph_kerning, iFpuui) GO(hb_ot_math_get_glyph_kernings, uFpuuupp) GO(hb_ot_math_get_glyph_top_accent_attachment, iFpu) GO(hb_ot_math_get_glyph_variants, uFpuuupp) GO(hb_ot_math_get_min_connector_overlap, iFpu) -//GO(hb_ot_math_has_data, +GO(hb_ot_math_has_data, iFp) GO(hb_ot_math_is_glyph_extended_shape, iFpu) GO(hb_ot_meta_get_entry_tags, uFpupp) GO(hb_ot_meta_reference_entry, pFpu) GO(hb_ot_metrics_get_position, iFpup) GO(hb_ot_metrics_get_position_with_fallback, vFpup) GO(hb_ot_metrics_get_variation, fFpu) -//GO(hb_ot_metrics_get_x_variation, +GO(hb_ot_metrics_get_x_variation, iFpu) GO(hb_ot_metrics_get_y_variation, iFpu) GO(hb_ot_name_get_utf16, uFpuppp) GO(hb_ot_name_get_utf32, uFpuppp) @@ -344,13 +344,13 @@ GO(hb_ot_tag_to_script, uFu) GO(hb_ot_var_find_axis, iFpupp) GO(hb_ot_var_find_axis_info, iFpup) GO(hb_ot_var_get_axes, uFpupp) -//GO(hb_ot_var_get_axis_count, +GO(hb_ot_var_get_axis_count, uFp) GO(hb_ot_var_get_axis_infos, uFpupp) GO(hb_ot_var_get_named_instance_count, uFp) -//GO(hb_ot_var_has_data, +GO(hb_ot_var_has_data, iFp) GO(hb_ot_var_named_instance_get_design_coords, uFpupp) GO(hb_ot_var_named_instance_get_postscript_name_id, uFpu) -//GO(hb_ot_var_named_instance_get_subfamily_name_id, +GO(hb_ot_var_named_instance_get_subfamily_name_id, uFpu) GO(hb_ot_var_normalize_coords, vFpupp) GO(hb_ot_var_normalize_variations, vFppupu) GO(hb_script_from_iso15924_tag, uFu) @@ -360,44 +360,44 @@ GO(hb_script_to_iso15924_tag, uFu) GO(hb_segment_properties_equal, iFpp) GO(hb_segment_properties_hash, uFp) GO(hb_segment_properties_overlay, vFpp) -//GO(hb_set_add, -//GO(hb_set_add_range, +GO(hb_set_add, vFpu) +GO(hb_set_add_range, vFpuu) GO(hb_set_add_sorted_array, vFppu) -//GO(hb_set_allocation_successful, -//GO(hb_set_clear, +GO(hb_set_allocation_successful, iFp) +GO(hb_set_clear, vFp) GO(hb_set_copy, pFp) -//GO(hb_set_create, +GO(hb_set_create, pFv) GO(hb_set_del, vFpu) GO(hb_set_del_range, vFpuu) -//GO(hb_set_destroy, +GO(hb_set_destroy, vFp) GO(hb_set_get_empty, pFv) GO(hb_set_get_max, uFp) -//GO(hb_set_get_min, +GO(hb_set_get_min, uFp) GO(hb_set_get_population, uFp) GO(hb_set_get_user_data, pFpp) GO(hb_set_has, iFpu) -//GO(hb_set_hash, -//GO(hb_set_intersect, +GO(hb_set_hash, uFp) +GO(hb_set_intersect, vFpp) GO(hb_set_invert, vFp) GO(hb_set_is_empty, iFp) -//GO(hb_set_is_equal, +GO(hb_set_is_equal, iFpp) GO(hb_set_is_subset, iFpp) -//GO(hb_set_next, +GO(hb_set_next, iFpp) GO(hb_set_next_many, uFpupu) -//GO(hb_set_next_range, +GO(hb_set_next_range, iFppp) GO(hb_set_previous, iFpp) GO(hb_set_previous_range, iFppp) GO(hb_set_reference, pFp) -//GO(hb_set_set, +GO(hb_set_set, vFpp) //GO(hb_set_set_user_data, -//GO(hb_set_subtract, +GO(hb_set_subtract, vFpp) GO(hb_set_symmetric_difference, vFpp) -//GO(hb_set_union, +GO(hb_set_union, vFpp) GO(hb_shape, vFpppu) GO(hb_shape_full, iFpppup) GO(hb_shape_list_shapers, pFv) -//GO(hb_shape_plan_create, -//GO(hb_shape_plan_create2, +GO(hb_shape_plan_create, pFpppup) +GO(hb_shape_plan_create2, pFpppupup) GO(hb_shape_plan_create_cached, pFpppup) GO(hb_shape_plan_create_cached2, pFpppupup) GO(hb_shape_plan_destroy, vFp) @@ -415,24 +415,24 @@ GO(hb_unicode_compose, iFpuup) GO(hb_unicode_decompose, iFpupp) GO(hb_unicode_decompose_compatibility, uFpup) GO(hb_unicode_eastasian_width, uFpu) -//GO(hb_unicode_funcs_create, -//GO(hb_unicode_funcs_destroy, -//GO(hb_unicode_funcs_get_default, +GO(hb_unicode_funcs_create, pFp) +GO(hb_unicode_funcs_destroy, vFp) +GO(hb_unicode_funcs_get_default, pFv) GO(hb_unicode_funcs_get_empty, pFv) GO(hb_unicode_funcs_get_parent, pFp) GO(hb_unicode_funcs_get_user_data, pFpp) GO(hb_unicode_funcs_is_immutable, iFp) GO(hb_unicode_funcs_make_immutable, vFp) -//GO(hb_unicode_funcs_reference, -//GO(hb_unicode_funcs_set_combining_class_func, -//GO(hb_unicode_funcs_set_compose_func, -//GO(hb_unicode_funcs_set_decompose_compatibility_func, -//GO(hb_unicode_funcs_set_decompose_func, -//GO(hb_unicode_funcs_set_eastasian_width_func, -//GO(hb_unicode_funcs_set_general_category_func, -//GO(hb_unicode_funcs_set_mirroring_func, -//GO(hb_unicode_funcs_set_script_func, -//GO(hb_unicode_funcs_set_user_data, +GOM(hb_unicode_funcs_reference, pFEp) +GOM(hb_unicode_funcs_set_combining_class_func, vFEpppp) +GOM(hb_unicode_funcs_set_compose_func, vFEpppp) +GOM(hb_unicode_funcs_set_decompose_compatibility_func, vFEpppp) +GOM(hb_unicode_funcs_set_decompose_func, vFEpppp) +GOM(hb_unicode_funcs_set_eastasian_width_func, vFEpppp) +GOM(hb_unicode_funcs_set_general_category_func, vFEpppp) +GOM(hb_unicode_funcs_set_mirroring_func, vFEpppp) +GOM(hb_unicode_funcs_set_script_func, vFEpppp) +GOM(hb_unicode_funcs_set_user_data, iFEppppi) GO(hb_unicode_general_category, uFpu) GO(hb_unicode_mirroring, uFpu) GO(hb_unicode_script, uFpu) diff --git a/src/wrapped/wrappedpng16_private.h b/src/wrapped/wrappedpng16_private.h index 3a7e4d54..0891d459 100755 --- a/src/wrapped/wrappedpng16_private.h +++ b/src/wrapped/wrappedpng16_private.h @@ -87,6 +87,7 @@ GO(png_set_cHRM, vFppdddddddd) GO(png_permit_mng_features, uFpu) GO(png_set_keep_unknown_chunks, vFpipi) GO(png_set_oFFs, vFppiii) +GO(png_set_option, iFpii) GO(png_get_libpng_ver, pFp) GO(png_get_text, uFpppp) GO(png_set_sBIT, vFppp) |