Re: [newbie] dont understand signal_connect



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]