结构
GObjectCClosure
说明 [src]
struct GCClosure {
GClosure closure;
gpointer callback;
}
GCClosure 是 GClosure 的一个专门用于 C 函数回调的专业化结构。
结构成员
closureGClosure。callback回调函数。
函数
g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv
GVaClosureMarshal 等效于 g_cclosure_marshal_BOOLEAN__BOXED_BOXED()。
g_cclosure_marshal_BOOLEAN__FLAGS
GClosureMarshal 函数用于具有以标志类型作为参数且返回布尔值的处理程序的信号。如果你有这样的信号,你可能还需要使用累加器,例如 g_signal_accumulator_true_handled()。
g_cclosure_marshal_STRING__OBJECT_POINTER
GClosureMarshal 函数用于具有处理程序的信号,该处理程序采用 GObject 和指针并生成一个字符串。信号处理程序不太可能符合此 描述。
g_cclosure_marshal_STRING__OBJECT_POINTERv
GVaClosureMarshal 等效于 g_cclosure_marshal_STRING__OBJECT_POINTER()。
g_cclosure_marshal_VOID__UINT_POINTERv
将 GVaClosureMarshal 等效于 g_cclosure_marshal_VOID__UINT_POINTER()。
g_cclosure_new_object
g_cclosure_new() 的一个变体,它使用 object 作为 user_data,并在 object 和创建的闭包上调用 g_object_watch_closure()。当您在 GObject 密切关联的情况下使用回调时,可以使用此函数,并且需要在对象释放后不再运行回调。
g_cclosure_new_object_swap
g_cclosure_new_swap() 的一个变体,它使用 object 作为 user_data,并在 object 和创建的闭包上调用 g_object_watch_closure()。当您在 GObject 密切关联的情况下使用回调时,可以使用此函数,并且需要在对象释放后不再运行回调。