RE: [gtk-list] How to connect and write callback functions?




All the signal prototypes are listed here:

http://www.gtk.org/tutorial/gtk_tut-28.html

The tutorial also has other information on events and callbacks.

-tony


On 10-Mar-2000 hj wrote:
> I want to attach realize_callback, unrealize_callback,
> size_allocate_callback, focus_in_callback and focus_out_callback to
> the
> toplevel window GtkWindow named window.
> 
> static void realize_callback(GtkWidget *w,GtkEvent *e,gpointer gp);
> static void unrealize_callback(GtkWidget *w,GtkEvent *e,gpointer
> gp);
> static void size_allocate_callback(GtkWidget *w,GtkEvent
> *e,gpointer gp);
> static gint focus_in_callback(GtkWidget *w,GtkEvent *e,gpointer
> gp);
> static gint focus_out_callback(GtkWidget *w,GtkEvent *e,gpointer
> gp);
> 
> gtk_signal_connect( GTK_OBJECT(window), "realize",
>                     GTK_SIGNAL_FUNC(realize_callback),
>                     NULL);
> gtk_signal_connect( GTK_OBJECT(window), "unrealize",
>                     GTK_SIGNAL_FUNC(unrealize_callback),
>                     NULL);
> gtk_signal_connect( GTK_OBJECT(window), "size_allocate",
>                     GTK_SIGNAL_FUNC(size_allocate_callback),
>                     NULL);
> gtk_signal_connect( GTK_OBJECT(window), "focus_in_event",
>                     GTK_SIGNAL_FUNC(focus_in_callback),
>                     NULL);
> gtk_signal_connect( GTK_OBJECT(window), "focus_out_event",
>                     GTK_SIGNAL_FUNC(focus_out_callback),
>                     NULL);
> 
> Are prototypes of realize_callback and others correct? Should
> realize_callback return FALSE? What prototype and return value
> should I use
> if I use gtk_signal_connect_after. What should I return when I use
> gtk_signal_connect_after?
> 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> /dev/null

---
E-Mail: trog@gtk.org
"I'd love to go out with you, but there are important world issues that
need worrying about."

Go Bezerk! http://www.gtk.org/~trog



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