功能
GObjectflags_register_static
声明 [源码]
GType
g_flags_register_static (
const gchar* name,
const GFlagsValue* const_static_values
)
描述 [源码]
注册一个新的静态标志类型,类型名为 name
。
通常,使用 [glib-mkenums][glib-mkenums] 从常规 C 枚举定义生成 my_flags_get_type()
函数,比使用 g_flags_register_static()
手动编写更为便捷。