Hi, How can I get the value of a gtk hscale widget

I thought it would be somethings like this:

Code:
GtkWidget * scaler_new(gdouble low, gdouble high, gdouble prec)
{
    GtkWidget * w;
    w = gtk_hscale_new_with_range(low,high,prec);
    gtk_scale_set_value_pos(GTK_SCALE(w),GTK_POS_RIGHT);
    gtk_range_set_update_policy(GTK_RANGE(w),GTK_UPDATE_DISCONTINUOUS);
    gtk_widget_set_size_request(w,200,-1);
    return w;
}
static void
scalar_changed (GtkWidget *button, gpointer data)
{
        float value;
	value = gtk_scale_get_value_pos(button);
	printf("Value: %f\n", value);
}

 slider1 = scaler_new(0, 1, 0.05);
  g_signal_connect (slider1, "value_changed", (GCallback) scalar_changed, NULL);

  gtk_box_pack_start(GTK_BOX (hbox1),slider1,TRUE,TRUE,0);
  gtk_widget_show (slider1);
But it always prints 1.00. Any help would be appreciated. thanks