Re: [newbie] dont understand signal_connect
- From: Carlos Pereira <carlos pehoe civil ist utl pt>
- To: gtk-app-devel-list gnome org
- Subject: Re: [newbie] dont understand signal_connect
- Date: Mon, 1 Oct 2001 17:02:09 +0100
i have a window (his name is window1)
how to do if i want that when a guy push the cross to close window1, the
program executes the function call_pl_term(goal);
im in this function:
Bool set_signal_connect(int internal_number,char *signal,PlTerm *goal)
In the example below, the callback_function will be
executed everytime the user clicks on the "close"
WM decoration (the cross you mention). The callback
has 3 arguments, not 2! If you return FALSE your
window will get closed!
Carlos
gint callback_function (GtkWidget *widget,
GdkEventButton *event, gpointer data)
{
return TRUE;
}
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (callback_function), data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]