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

Re: g_signal_connect, structs and my sanity



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);


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