Re: [Q] How many arguments can I use in GTK_SIGNAL_FUNC
- From: Changwoo Ryu <cwryu idis co kr>
- To: Woo-Sick Choi <wschoi sr hei co kr>
- Cc: gtk-list gnome org
- Subject: Re: [Q] How many arguments can I use in GTK_SIGNAL_FUNC
- Date: 27 Jul 2000 11:41:54 +0900
Woo-Sick Choi <wschoi@sr.hei.co.kr> writes:
> Hi all~
>
> Examaple 1)
>
> gtk_signal_connect(GTK_OBJECT(clist), "select_row",
> GTK_SIGNAL_FUNC(selection_made),
> NULL);
>
> void selection_made( GtkWidget *clist,
> gint row,
> gint column,
> GdkEventButton *event,
> gpointer data )
> {
> .
> .
> }
>
> selection_made function have 5 arguments.
> but gtk_signal_connect function's last arguments is NULL.
The number of arguments depends on what signal it is ("clicked" or
"select_row").
In gtk/gtkclist.h:
struct _GtkCListClass
{
...
void (*select_row) (GtkCList *clist,
gint row,
gint column,
GdkEvent *event);
...
}
The 4 arguments are filled by the widget, the last 1 arguments are
provided by user (the last argument of gtk_signal_connect()).
The same rule applies to your second example.
--
Changwoo Ryu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]