Re: [gtk-list] gtk_signal_connect_interp



On Sun, 3 May 1998, fractture wrote:

> Could someone explain what this function does?
> The docs only have the arguments it wants, nothing about what it might
> do.

it is a limited front-end to gtk_signal_connect_full() mainly for
historical reasons:
guint
gtk_signal_connect_interp (GtkObject         *object,
                           const gchar       *name,
                           GtkCallbackMarshal func,
                           gpointer           func_data,
                           GtkDestroyNotify   destroy_func,
                           gint               after)
{
  return gtk_signal_connect_full (object, name, NULL, func,
                                  func_data, destroy_func, FALSE, after);
}

so i think if i try to explain gtk_signal_connect_full() that'll be enough ;)

typedef void (*GtkDestroyNotify)   (gpointer   data);
typedef void (*GtkCallbackMarshal) (GtkObject *object,
                                    gpointer   func_data,
                                    guint      n_args,
                                    GtkArg    *args);
guint  gtk_signal_connect_full            (GtkObject           *object,
                                           const gchar         *signal_name,
                                           GtkSignalFunc        func,
                                           GtkCallbackMarshal   marshal,
                                           gpointer             func_data,
                                           GtkDestroyNotify     destroy_func,
                                           gint                 object_signal,
                                           gint                 after);
this function will create a new handler->object-signal connection and
return its id or 0 if the creation of the connection failed.
`object'	is the gtk object for which the connection will be
		established.
`signal_name'	is the name of the signal introduced by the object class
		that `object' is an instance of.
		e.g. "clicked" for GTK_IS_BUTTON (object).
`func'		is the adress of the function the user wants to be executed
		upon emission of `signal_name' for `object'. its prototype
		varies depending on the signature of `signal_name'.
		pseudo prototype:
		<signal-return-type> (*func) (GtkObject *object,
		                              [<signal-specific-arg>, ...,]
		                              gpointer func_data);
`marshal'	is the adress of a function used for marshalling the emission of
		`signal_name', used for interpreter bindings. providing this
		argument will take precedence over `func'.
`func_data'	contains an untyped pointer (generic data) that is to be passed
		to either `marshal' or `func' upon execution, according to
		their prototypes.
`destroy_func'	if specified points to a function that is to be executed once
		the newly created handler connection will become invalidated
		again, so to happen on either the objects destruction or
		explicit disconnection of a signal, e.g. through
		gtk_signal_disconnect().
		`func_data' will be passed as sole argument to `destroy_func'.
`object_signal'	is a boolean flag indicating that `func_data' should
		substitute the value of `object' in above pseudo-prototype
		upon execution of `func'.
`after'		is a boolean flag indicating that either `func' or `marshal'
		are to be executed *after* any object method implemented by
		the object class that `object' is an instance of. the only
		exception for this is the "destroy" signal (implemented by
		all object types), it doesn't feature after-connections at
		all.

> 
> -- 
> 

---
ciaoTJ



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]