Re: g_signal_connect, structs and my sanity
- From: "beginner.c" <beginner c gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: g_signal_connect, structs and my sanity
- Date: Mon, 3 Nov 2008 20:15:47 -0800 (PST)
Ah....great thanks for pointing that out. Simple difference between
"change-value" and "value-changed".
Any feedback on prototyping my struct?
Thanks
David Munger wrote:
I guess you just have the wrong callback function signature for the
"change-value" signal.
See http://library.gnome.org/devel/gtk/2.14/GtkRange.html
So:
void funcScale (GtkWidget *widget, struct allStructs *base)
should probably be:
void funcScale (GtkRange *range, GtkScrollType scroll, gdouble value,
struct
allStructs *base)
instead.
I hope that helps,
David
void funcScale (GtkWidget *widget, struct allStructs *base)
{
gdouble value;
value = gtk_range_get_value (GTK_RANGE (widget));
printf("Qs: %i\n", value);
printf("Qs: %i\n", base->sTestOne.a);
}
[...]
g_signal_connect (base.sWidgets.hscale, "change-value", G_CALLBACK
(funcScale), &base);
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
View this message in context:
http://www.nabble.com/g_signal_connect%2C-structs-and-my-sanity-tp20310462p20315985.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]