Passing Struct to g_signal_connect
- From: "beginner.c" <beginner c gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Passing Struct to g_signal_connect
- Date: Sun, 19 Oct 2008 04:51:29 -0700 (PDT)
I need to pass a struct using g_signal_connect, but the issue I'm having is
that I can't alter the elements of the struct within the called function
e.g.
void on_button2_clicked (struct allStructs *by_ptr)
{
gtk_label_set_text ((GtkLabel*)by_ptr->widgets.label, "whatever");
}
main
{
blah blah
struct allStructs baseStruct;
g_signal_connect (G_OBJECT(baseStruct.widgets.nextButton), "clicked",
G_CALLBACK (on_button2_clicked), &baseStruct);
}
Any idea's? If I pass this struct to any other function I have no problem
performing functions like in the callback. For some reason, I can't in the
callback.
--
View this message in context:
http://www.nabble.com/Passing-Struct-to-g_signal_connect-tp20055372p20055372.html
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]