Re: [gtk-list] Gtk Question



On Wed, 27 May 1998, Achint Sandhu wrote:

> trying to pass data to the "callback" for the "delete_event" handler for
> a window and can't seem to get it to work. I have tried this with Gtk
> 1.0.3 on Solaris. I realise I am probably missing something obvious. Any
> help you could provide would be greatly appreciated...
> 
>         Anyway here is the code...
> 
> ---
> 
> #include <stdio.h>
> #include <string.h>
> #include <gtk/gtk.h>
> 
> gint windowSignalHandlerStub(GtkWidget *w, gpointer data) {

the delete_event handler takes an additional argument (like all
_event signals):
gint delete_event_handler (GtkWidget          *widget,
                           GdkEventAny        *event,
                           gpointer            data);
                                      
>   gtk_signal_connect(GTK_OBJECT(window), "delete_event",
>                      GTK_SIGNAL_FUNC(windowSignalHandlerStub), 
>                      (gpointer) aCommand);
> 

trog: isn't that in the FAQ already?

> Cheers,
> Achint
> 

---
ciaoTJ



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