Add gtk_scale_new{,_with_range}() for compatibility
This commit is contained in:
parent
4001fc6de3
commit
e65358ed3d
|
@ -117,6 +117,12 @@ GtkWidget * gtk_button_box_new(GtkOrientation orientation);
|
||||||
|
|
||||||
GtkWidget * gtk_paned_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);
|
GtkWidget * gtk_separator_new(GtkOrientation orientation);
|
||||||
|
|
||||||
void gtk_widget_override_font(GtkWidget * widget,
|
void gtk_widget_override_font(GtkWidget * widget,
|
||||||
|
|
30
src/compat.c
30
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 */
|
/* gtk_separator_new */
|
||||||
GtkWidget * gtk_separator_new(GtkOrientation orientation)
|
GtkWidget * gtk_separator_new(GtkOrientation orientation)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user