Offer more compatibility code

This commit is contained in:
Pierre Pronchery 2018-01-28 08:48:18 +01:00
parent 750bcea5f8
commit 29dc10f363
2 changed files with 27 additions and 0 deletions

View File

@ -125,6 +125,14 @@ GtkWidget * gtk_scale_new_with_range(GtkOrientation orientation,
GtkWidget * gtk_separator_new(GtkOrientation orientation);
# if !GTK_CHECK_VERSION(2, 18, 0)
GtkAllocation gtk_widget_get_allocation(GtkWidget * widget);
# endif
# if !GTK_CHECK_VERSION(2, 12, 0)
void gtk_widget_set_tooltip_text(GtkWidget * widget, const gchar * text);
# endif
void gtk_widget_override_font(GtkWidget * widget,
const PangoFontDescription * desc);
# endif

View File

@ -137,6 +137,25 @@ GtkWidget * gtk_separator_new(GtkOrientation orientation)
}
# if !GTK_CHECK_VERSION(2, 18, 0)
/* gtk_widget_get_allocation */
GtkAllocation gtk_widget_get_allocation(GtkWidget * widget)
{
return widget->allocation;
}
# endif
# if !GTK_CHECK_VERSION(2, 12, 0)
/* gtk_widget_set_tooltip_text */
void gtk_widget_set_tooltip_text(GtkWidget * widget, const gchar * text)
{
(void) widget;
(void) text;
}
# endif
/* gtk_widget_override_font */
void gtk_widget_override_font(GtkWidget * widget,
const PangoFontDescription * desc)