diff --git a/include/Desktop/compat.h b/include/Desktop/compat.h index f76b762..f62c304 100644 --- a/include/Desktop/compat.h +++ b/include/Desktop/compat.h @@ -117,6 +117,12 @@ GtkWidget * gtk_button_box_new(GtkOrientation orientation); GtkWidget * gtk_paned_new(GtkOrientation orientation); +GtkWidget * gtk_scale_new(GtkOrientation orientation, + GtkAdjustment * adjustment); + +GtkWidget * gtk_scale_new_with_range(GtkOrientation orientation, + gdouble min, gdouble max, gdouble step); + GtkWidget * gtk_separator_new(GtkOrientation orientation); void gtk_widget_override_font(GtkWidget * widget, diff --git a/src/compat.c b/src/compat.c index 72b76ba..1029ce8 100644 --- a/src/compat.c +++ b/src/compat.c @@ -93,6 +93,36 @@ GtkWidget * gtk_paned_new(GtkOrientation orientation) } +/* gtk_scale_new */ +GtkWidget * gtk_scale_new(GtkOrientation orientation, + GtkAdjustment * adjustment) +{ + switch(orientation) + { + case GTK_ORIENTATION_HORIZONTAL: + return gtk_hscale_new(adjustment); + case GTK_ORIENTATION_VERTICAL: + default: + return gtk_vscale_new(adjustment); + } +} + + +/* gtk_scale_new_with_range */ +GtkWidget * gtk_scale_new_with_range(GtkOrientation orientation, + gdouble min, gdouble max, gdouble step) +{ + switch(orientation) + { + case GTK_ORIENTATION_HORIZONTAL: + return gtk_hscale_new_with_range(min, max, step); + case GTK_ORIENTATION_VERTICAL: + default: + return gtk_vscale_new_with_range(min, max, step); + } +} + + /* gtk_separator_new */ GtkWidget * gtk_separator_new(GtkOrientation orientation) {