On Wednesday 11 March 2009, frederico schardong wrote:
> Hi,
> 
> Sorry, but I know it is a newbie question..
> 
> I have a button, and a gtk_drawing_area, and a function to save what
> is happen in the gtk_drawing_area.. When this button is pressed, the
> function must be run.. I'm using now this gtk_drawing_area how a
> global variable, how I can connect the button press action to this
> function?
> 
> Thank's
> 

void my_callback_function (GtkButton *widget, gpointer user_ptr);

...

g_signal_connect( G_OBJECT( widget), "clicked", 
        G_CALLBACK( my_callback_function), user_ptr );


void my_callback_function (GtkButton *widget, gpointer user_ptr) {

        ...
}


http://library.gnome.org/devel/gtk/unstable/GtkButton.html

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to