diff --git a/src/hb-blob.cc b/src/hb-blob.cc index 16a2f99b7..7a659b26b 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -78,11 +78,11 @@ _hb_blob_destroy_user_data (hb_blob_t *blob) /** * hb_blob_create: (Xconstructor) - * @data: (array length=length) (scope notified) (destroy destroy) (transfer none): Pointer to blob data. + * @data: (array length=length) (closure user_data) (destroy destroy) (scope notified) (transfer none): Pointer to blob data. * @length: Length of @data in bytes. * @mode: Memory mode for @data. * @user_data: Data parameter to pass to @destroy. - * @destroy: (closure user_data): Callback to call when @data is not needed anymore. + * @destroy: Callback to call when @data is not needed anymore. * * Creates a new "blob" object wrapping @data. The @mode parameter is used * to negotiate ownership and lifecycle of @data. diff --git a/src/hb-face.cc b/src/hb-face.cc index 2713226b3..b21d6e7d1 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -70,7 +70,7 @@ const hb_face_t _hb_face_nil = { /** * hb_face_create_for_tables: - * @reference_table_func: + * @reference_table_func: (closure user_data) (destroy destroy) (scope notified): * @user_data: * @destroy: * diff --git a/src/hb-font.cc b/src/hb-font.cc index 42e0ceee8..855864377 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -1093,7 +1093,7 @@ hb_font_get_face (hb_font_t *font) /** * hb_font_set_funcs: * @font: a font. - * @klass: + * @klass: (closure font_data) (destroy destroy) (scope notified): * @font_data: * @destroy: * @@ -1129,7 +1129,7 @@ hb_font_set_funcs (hb_font_t *font, /** * hb_font_set_funcs_data: * @font: a font. - * @font_data: + * @font_data: (destroy destroy) (scope notified): * @destroy: * * diff --git a/src/hb-font.h b/src/hb-font.h index 3a0c001b9..7273db43e 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -139,54 +139,180 @@ typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void * /* func setters */ +/** + * hb_font_funcs_set_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, - hb_font_get_glyph_func_t glyph_func, + hb_font_get_glyph_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_font_funcs_set_glyph_h_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_advance_func_t func, void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_advance_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_font_funcs_set_glyph_h_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_origin_func_t func, void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_origin_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_font_funcs_set_glyph_h_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_kerning_func_t func, void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_kerning_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_font_funcs_set_glyph_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_extents_func_t func, void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_contour_point_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_contour_point_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_font_funcs_set_glyph_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs, - hb_font_get_glyph_name_func_t glyph_func, + hb_font_get_glyph_name_func_t func, void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_from_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, - hb_font_get_glyph_from_name_func_t glyph_func, + hb_font_get_glyph_from_name_func_t func, void *user_data, hb_destroy_func_t destroy); diff --git a/src/hb-unicode.h b/src/hb-unicode.h index 2e10d98a3..1c4e097b9 100644 --- a/src/hb-unicode.h +++ b/src/hb-unicode.h @@ -248,7 +248,7 @@ typedef hb_bool_t (*hb_unicode_decompose_func_t) (hb_unicode_funcs_t *ufuncs, /** * hb_unicode_decompose_compatibility_func_t: - * @ufuncs: Unicode function structure + * @ufuncs: a Unicode function structure * @u: codepoint to decompose * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() @@ -274,44 +274,132 @@ typedef unsigned int (*hb_unicode_decompose_compatibility_func_t) (hb_unicode_ /* setters */ +/** + * hb_unicode_funcs_set_combining_class_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_combining_class_func_t combining_class_func, + hb_unicode_combining_class_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_unicode_funcs_set_eastasian_width_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_eastasian_width_func_t eastasian_width_func, + hb_unicode_eastasian_width_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_unicode_funcs_set_general_category_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_general_category_func_t general_category_func, + hb_unicode_general_category_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_unicode_funcs_set_mirroring_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_mirroring_func_t mirroring_func, + hb_unicode_mirroring_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_unicode_funcs_set_script_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_script_func_t script_func, + hb_unicode_script_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_unicode_funcs_set_compose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_compose_func_t compose_func, + hb_unicode_compose_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_unicode_funcs_set_decompose_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_decompose_func_t decompose_func, + hb_unicode_decompose_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_unicode_funcs_set_decompose_compatibility_func: + * @ufuncs: a Unicode function structure + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 1.0 + **/ void hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, - hb_unicode_decompose_compatibility_func_t decompose_compatibility_func, + hb_unicode_decompose_compatibility_func_t func, void *user_data, hb_destroy_func_t destroy); /* accessors */