函数
GLibio_add_watch_full
声明 [src]
guint
g_io_add_watch_full (
GIOChannel* channel,
gint priority,
GIOCondition condition,
GIOFunc func,
gpointer user_data,
GDestroyNotify notify
)
描述 [src]
将 GIOChannel 添加到默认主循环上下文,并具有给定的优先级。
这在内部使用 g_io_create_watch() 创建了一个主循环源,并通过 g_source_attach() 将其附加到主循环上下文中。如果您需要更大的控制权,可以手动执行这些步骤。
此函数在语言绑定中重命名为 g_io_add_watch()。
参数
channel-
类型:
GIOChannel一个
GIOChannel。数据归函数调用者所有。 priority-
类型:
gintGIOChannel源的优先级。 condition-
类型:
GIOCondition要监视的条件。
func-
类型:
GIOFunc当满足条件时要调用的函数。
user_data-
类型:
gpointer传递到
func的用户数据。该参数可以为 NULL。数据归函数调用者所有。 notify-
类型:
GDestroyNotify源被移除时要调用的函数。