Skip to content

Commit

Permalink
[WRAPPER] Rework on libharfbuzz wrapper (#836)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ksco authored Jun 13, 2023
1 parent 4110956 commit e0dc494
Show file tree
Hide file tree
Showing 7 changed files with 1,465 additions and 154 deletions.
55 changes: 55 additions & 0 deletions src/wrapped/generated/functions_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,7 @@
#() iFEpIppp
#() iFEpuppp
#() iFEpUppp
#() iFEppppi
#() iFEppppp
#() iFiiiiip
#() iFiiiipp
Expand Down Expand Up @@ -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
Expand Down
56 changes: 55 additions & 1 deletion src/wrapped/generated/wrappedlibharfbuzztypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
2 changes: 2 additions & 0 deletions src/wrapped/generated/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*);
Expand Down Expand Up @@ -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); }
Expand Down
1 change: 1 addition & 0 deletions src/wrapped/generated/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading

0 comments on commit e0dc494

Please sign in to comment.