Re: g_signal
- From: steff <f84sbh worldonline fr>
- To: gtk-app-devel-list gnome org
- Subject: Re: g_signal
- Date: Sun, 03 Nov 2002 19:01:59 +0100
g_signal_connect is not so differant than gtk_signal*
the declaration of a funtion callback for a button is
ex:
....
my_callback (gtk_widget *widget,
gpointer data);
some widget need more declarations see the gtk-doc for more explanation
here a example of code
static void
on_button_clicked (GtkWidget *widget,
gpointer data)
{
printf("%s\n", (char*) data);
}
int
main(void)
{
....
g_signal_connect( G_OBJECT(button) , "clicked",
G_CALLBACK(on_button_clicked),
(gpointer) "hello");
....
}
hope this help you
best regards
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]