From efe13a191df504df4a38f633c35a73477cf93b01 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 14 Dec 2022 09:50:52 -0500 Subject: [PATCH] fix introspection --- src/hb-font.h | 8 ++++- src/hb-gobject-structs.cc | 1 + src/hb-gobject-structs.h | 4 +++ src/hb-paint.cc | 5 +++ src/hb-paint.h | 70 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 1 deletion(-) diff --git a/src/hb-font.h b/src/hb-font.h index 99c73a217..69f011d68 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -531,7 +531,6 @@ typedef void (*hb_font_get_glyph_shape_func_t) (hb_font_t *font, void *font_data hb_draw_funcs_t *draw_funcs, void *draw_data, void *user_data); - typedef void (*hb_font_get_glyph_paint_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_paint_funcs_t *paint_funcs, void *paint_data, @@ -811,6 +810,13 @@ hb_font_funcs_set_glyph_shape_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_shape_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_font_funcs_set_glyph_paint_func: + * @ffuncs: + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: (nullable): + */ HB_EXTERN void hb_font_funcs_set_glyph_paint_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_paint_func_t func, diff --git a/src/hb-gobject-structs.cc b/src/hb-gobject-structs.cc index ef13f1e96..7383169fd 100644 --- a/src/hb-gobject-structs.cc +++ b/src/hb-gobject-structs.cc @@ -91,6 +91,7 @@ hb_gobject_##name##_get_type () \ HB_DEFINE_OBJECT_TYPE (buffer) HB_DEFINE_OBJECT_TYPE (blob) HB_DEFINE_OBJECT_TYPE (draw_funcs) +HB_DEFINE_OBJECT_TYPE (paint_funcs) HB_DEFINE_OBJECT_TYPE (face) HB_DEFINE_OBJECT_TYPE (font) HB_DEFINE_OBJECT_TYPE (font_funcs) diff --git a/src/hb-gobject-structs.h b/src/hb-gobject-structs.h index 3914a2431..e76ac1e54 100644 --- a/src/hb-gobject-structs.h +++ b/src/hb-gobject-structs.h @@ -52,6 +52,10 @@ HB_EXTERN GType hb_gobject_draw_funcs_get_type (void); #define HB_GOBJECT_TYPE_DRAW_FUNCS (hb_gobject_draw_funcs_get_type ()) +HB_EXTERN GType +hb_gobject_paint_funcs_get_type (void); +#define HB_GOBJECT_TYPE_PAINT_FUNCS (hb_gobject_paint_funcs_get_type ()) + HB_EXTERN GType hb_gobject_face_get_type (void); #define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ()) diff --git a/src/hb-paint.cc b/src/hb-paint.cc index 1d8004f0f..d1eefbb80 100644 --- a/src/hb-paint.cc +++ b/src/hb-paint.cc @@ -168,6 +168,11 @@ hb_paint_funcs_set_##name##_func (hb_paint_funcs_t *funcs, HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_PAINT_FUNC_IMPLEMENT +/** + * hb_paint_funcs_create: + * + * Returns value: (transfer full): + */ hb_paint_funcs_t * hb_paint_funcs_create () { diff --git a/src/hb-paint.h b/src/hb-paint.h index b00f8df02..32decd090 100644 --- a/src/hb-paint.h +++ b/src/hb-paint.h @@ -163,60 +163,130 @@ typedef void (*hb_paint_pop_group_and_composite_func_t) (hb_paint_funcs_t *funcs hb_paint_composite_mode_t mode, void *user_data); +/** + * hb_paint_funcs_set_push_transform_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_push_transform_func (hb_paint_funcs_t *funcs, hb_paint_push_transform_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_pop_transform_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_pop_transform_func (hb_paint_funcs_t *funcs, hb_paint_pop_transform_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_push_clip_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_push_clip_func (hb_paint_funcs_t *funcs, hb_paint_push_clip_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_pop_clip_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_pop_clip_func (hb_paint_funcs_t *funcs, hb_paint_pop_clip_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_solid_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_solid_func (hb_paint_funcs_t *funcs, hb_paint_solid_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_linear_gradient_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_linear_gradient_func (hb_paint_funcs_t *funcs, hb_paint_linear_gradient_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_radial_gradient_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_radial_gradient_func (hb_paint_funcs_t *funcs, hb_paint_radial_gradient_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_sweep_gradient_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_sweep_gradient_func (hb_paint_funcs_t *funcs, hb_paint_sweep_gradient_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_push_group_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_push_group_func (hb_paint_funcs_t *funcs, hb_paint_push_group_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_paint_funcs_set_pop_group_and_composite_func: + * @funcs: + * @func: (closure user_data) (destroy destroy) (scop notified): + * @user_data: + * @destroy: (nullable) + */ HB_EXTERN void hb_paint_funcs_set_pop_group_and_composite_func (hb_paint_funcs_t *funcs, hb_paint_pop_group_and_composite_func_t func,