diff options
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/gsignal.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/gobject/gsignal.c b/gobject/gsignal.c index c8cd4beac..59b9c9e32 100644 --- a/gobject/gsignal.c +++ b/gobject/gsignal.c @@ -1288,8 +1288,8 @@ g_signal_query (guint signal_id, * not associate a class method slot with this signal. * @accumulator: the accumulator for this signal; may be %NULL. * @accu_data: user data for the @accumulator. - * @c_marshaller: the function to translate arrays of parameter values to - * signal emissions into C language callback invocations. + * @c_marshaller: (allow-none): the function to translate arrays of parameter + * values to signal emissions into C language callback invocations or %NULL. * @return_type: the type of return value, or #G_TYPE_NONE for a signal * without a return value. * @n_params: the number of parameter types to follow. @@ -1310,6 +1310,9 @@ g_signal_query (guint signal_id, * <code>super_class->signal_handler = my_signal_handler</code>. Instead they * will have to use g_signal_override_class_handler(). * + * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as + * the marshaller for this signal. + * * Returns: the signal id */ guint @@ -1367,8 +1370,8 @@ g_signal_new (const gchar *signal_name, * not associate a class method with this signal. * @accumulator: the accumulator for this signal; may be %NULL. * @accu_data: user data for the @accumulator. - * @c_marshaller: the function to translate arrays of parameter values to - * signal emissions into C language callback invocations. + * @c_marshaller: (allow-none): the function to translate arrays of parameter + * values to signal emissions into C language callback invocations or %NULL. * @return_type: the type of return value, or #G_TYPE_NONE for a signal * without a return value. * @n_params: the number of parameter types to follow. @@ -1388,6 +1391,9 @@ g_signal_new (const gchar *signal_name, * * See g_signal_new() for information about signal names. * + * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as + * the marshaller for this signal. + * * Returns: the signal id * * Since: 2.18 @@ -1496,8 +1502,9 @@ signal_add_class_closure (SignalNode *node, * @class_closure: The closure to invoke on signal emission; may be %NULL * @accumulator: the accumulator for this signal; may be %NULL * @accu_data: user data for the @accumulator - * @c_marshaller: the function to translate arrays of parameter values to - * signal emissions into C language callback invocations + * @c_marshaller: (allow-none): the function to translate arrays of + * parameter values to signal emissions into C language callback + * invocations or %NULL * @return_type: the type of return value, or #G_TYPE_NONE for a signal * without a return value * @n_params: the length of @param_types @@ -1507,6 +1514,9 @@ signal_add_class_closure (SignalNode *node, * * See g_signal_new() for details on allowed signal names. * + * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as + * the marshaller for this signal. + * * Returns: the signal id */ guint @@ -1629,6 +1639,8 @@ g_signal_newv (const gchar *signal_name, } else node->accumulator = NULL; + if (c_marshaller == NULL) + c_marshaller = g_cclosure_marshal_generic; node->c_marshaller = c_marshaller; node->emission_hooks = NULL; if (class_closure) @@ -1658,8 +1670,8 @@ g_signal_newv (const gchar *signal_name, * @class_closure: The closure to invoke on signal emission; may be %NULL. * @accumulator: the accumulator for this signal; may be %NULL. * @accu_data: user data for the @accumulator. - * @c_marshaller: the function to translate arrays of parameter values to - * signal emissions into C language callback invocations. + * @c_marshaller: (allow-none): the function to translate arrays of parameter + * values to signal emissions into C language callback invocations or %NULL. * @return_type: the type of return value, or #G_TYPE_NONE for a signal * without a return value. * @n_params: the number of parameter types in @args. @@ -1669,6 +1681,9 @@ g_signal_newv (const gchar *signal_name, * * See g_signal_new() for details on allowed signal names. * + * If c_marshaller is %NULL @g_cclosure_marshal_generic will be used as + * the marshaller for this signal. + * * Returns: the signal id */ guint |