How to connect and write callback functions?



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?




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