Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
70303cf2
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
70303cf2
编写于
9月 06, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[docs/introspection] Some more annotations
上级
288f2899
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
155 addition
and
31 deletion
+155
-31
src/hb-common.cc
src/hb-common.cc
+147
-4
src/hb-font.cc
src/hb-font.cc
+8
-8
src/hb-version.h.in
src/hb-version.h.in
+0
-19
未找到文件。
src/hb-common.cc
浏览文件 @
70303cf2
...
...
@@ -57,25 +57,45 @@ _hb_options_init (void)
/* hb_tag_t */
/**
* hb_tag_from_string:
* @str: (array length=len):
* @len:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_tag_t
hb_tag_from_string
(
const
char
*
s
,
int
len
)
hb_tag_from_string
(
const
char
*
s
tr
,
int
len
)
{
char
tag
[
4
];
unsigned
int
i
;
if
(
!
s
||
!
len
||
!*
s
)
if
(
!
s
tr
||
!
len
||
!*
str
)
return
HB_TAG_NONE
;
if
(
len
<
0
||
len
>
4
)
len
=
4
;
for
(
i
=
0
;
i
<
(
unsigned
)
len
&&
s
[
i
];
i
++
)
tag
[
i
]
=
s
[
i
];
for
(
i
=
0
;
i
<
(
unsigned
)
len
&&
s
tr
[
i
];
i
++
)
tag
[
i
]
=
s
tr
[
i
];
for
(;
i
<
4
;
i
++
)
tag
[
i
]
=
' '
;
return
HB_TAG_CHAR4
(
tag
);
}
/**
* hb_tag_to_string:
* @tag:
* @buf: (array fixed-size=4):
*
*
*
* Since: 1.0
**/
void
hb_tag_to_string
(
hb_tag_t
tag
,
char
*
buf
)
{
...
...
@@ -95,6 +115,17 @@ const char direction_strings[][4] = {
"btt"
};
/**
* hb_direction_from_string:
* @str: (array length=len):
* @len:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_direction_t
hb_direction_from_string
(
const
char
*
str
,
int
len
)
{
...
...
@@ -112,6 +143,16 @@ hb_direction_from_string (const char *str, int len)
return
HB_DIRECTION_INVALID
;
}
/**
* hb_direction_to_string:
* @direction:
*
*
*
* Return value: (transfer none):
*
* Since: 1.0
**/
const
char
*
hb_direction_to_string
(
hb_direction_t
direction
)
{
...
...
@@ -237,6 +278,17 @@ retry:
}
/**
* hb_language_from_string:
* @str: (array length=len):
* @len:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_language_t
hb_language_from_string
(
const
char
*
str
,
int
len
)
{
...
...
@@ -255,6 +307,16 @@ hb_language_from_string (const char *str, int len)
return
likely
(
item
)
?
item
->
lang
:
HB_LANGUAGE_INVALID
;
}
/**
* hb_language_to_string:
* @language:
*
*
*
* Return value: (transfer none):
*
* Since: 1.0
**/
const
char
*
hb_language_to_string
(
hb_language_t
language
)
{
...
...
@@ -262,6 +324,15 @@ hb_language_to_string (hb_language_t language)
return
language
->
s
;
}
/**
* hb_language_get_default:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_language_t
hb_language_get_default
(
void
)
{
...
...
@@ -279,6 +350,16 @@ hb_language_get_default (void)
/* hb_script_t */
/**
* hb_script_from_iso15924_tag:
* @tag:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_script_t
hb_script_from_iso15924_tag
(
hb_tag_t
tag
)
{
...
...
@@ -313,18 +394,49 @@ hb_script_from_iso15924_tag (hb_tag_t tag)
return
HB_SCRIPT_UNKNOWN
;
}
/**
* hb_script_from_string:
* @s: (array length=len):
* @len:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_script_t
hb_script_from_string
(
const
char
*
s
,
int
len
)
{
return
hb_script_from_iso15924_tag
(
hb_tag_from_string
(
s
,
len
));
}
/**
* hb_script_to_iso15924_tag:
* @script:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_tag_t
hb_script_to_iso15924_tag
(
hb_script_t
script
)
{
return
(
hb_tag_t
)
script
;
}
/**
* hb_script_get_horizontal_direction:
* @script:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_direction_t
hb_script_get_horizontal_direction
(
hb_script_t
script
)
{
...
...
@@ -409,6 +521,16 @@ hb_user_data_array_t::get (hb_user_data_key_t *key)
/* hb_version */
/**
* hb_version:
* @major: (out): Library major version component.
* @minor: (out): Library minor version component.
* @micro: (out): Library micro version component.
*
* Returns library version as three integer components.
*
* Since: 1.0
**/
void
hb_version
(
unsigned
int
*
major
,
unsigned
int
*
minor
,
...
...
@@ -419,12 +541,33 @@ hb_version (unsigned int *major,
*
micro
=
HB_VERSION_MICRO
;
}
/**
* hb_version_string:
*
* Returns library version as a string with three components.
*
* Return value: library version string.
*
* Since: 1.0
**/
const
char
*
hb_version_string
(
void
)
{
return
HB_VERSION_STRING
;
}
/**
* hb_version_check:
* @major:
* @minor:
* @micro:
*
*
*
* Return value:
*
* Since: 1.0
**/
hb_bool_t
hb_version_check
(
unsigned
int
major
,
unsigned
int
minor
,
...
...
src/hb-font.cc
浏览文件 @
70303cf2
...
...
@@ -1094,7 +1094,7 @@ hb_font_get_face (hb_font_t *font)
* hb_font_set_funcs:
* @font: a font.
* @klass:
* @
user
_data:
* @
font
_data:
* @destroy:
*
*
...
...
@@ -1104,12 +1104,12 @@ hb_font_get_face (hb_font_t *font)
void
hb_font_set_funcs
(
hb_font_t
*
font
,
hb_font_funcs_t
*
klass
,
void
*
user
_data
,
void
*
font
_data
,
hb_destroy_func_t
destroy
)
{
if
(
font
->
immutable
)
{
if
(
destroy
)
destroy
(
user
_data
);
destroy
(
font
_data
);
return
;
}
...
...
@@ -1122,14 +1122,14 @@ hb_font_set_funcs (hb_font_t *font,
hb_font_funcs_reference
(
klass
);
hb_font_funcs_destroy
(
font
->
klass
);
font
->
klass
=
klass
;
font
->
user_data
=
user
_data
;
font
->
user_data
=
font
_data
;
font
->
destroy
=
destroy
;
}
/**
* hb_font_set_funcs_data:
* @font: a font.
* @
user
_data:
* @
font
_data:
* @destroy:
*
*
...
...
@@ -1138,20 +1138,20 @@ hb_font_set_funcs (hb_font_t *font,
**/
void
hb_font_set_funcs_data
(
hb_font_t
*
font
,
void
*
user
_data
,
void
*
font
_data
,
hb_destroy_func_t
destroy
)
{
/* Destroy user_data? */
if
(
font
->
immutable
)
{
if
(
destroy
)
destroy
(
user
_data
);
destroy
(
font
_data
);
return
;
}
if
(
font
->
destroy
)
font
->
destroy
(
font
->
user_data
);
font
->
user_data
=
user
_data
;
font
->
user_data
=
font
_data
;
font
->
destroy
=
destroy
;
}
...
...
src/hb-version.h.in
浏览文件 @
70303cf2
...
...
@@ -47,30 +47,11 @@ HB_BEGIN_DECLS
HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
/**
* hb_version:
* @major: (out): Library major version component.
* @minor: (out): Library minor version component.
* @micro: (out): Library micro version component.
*
* Returns library version as three integer components.
*
* Since: 1.0
**/
void
hb_version (unsigned int *major,
unsigned int *minor,
unsigned int *micro);
/**
* hb_version_string:
*
* Returns library version as a string with three components.
*
* Return value: library version string.
*
* Since: 1.0
**/
const char *
hb_version_string (void);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录