Add compatibility code for Gtk+ < 2.14
This commit is contained in:
parent
4ca8180033
commit
f879140893
|
@ -148,6 +148,10 @@ GtkWidget * gtk_separator_new(GtkOrientation orientation);
|
|||
GtkAllocation gtk_widget_get_allocation(GtkWidget * widget);
|
||||
# endif
|
||||
|
||||
# if !GTK_CHECK_VERSION(2, 14, 0)
|
||||
GdkWindow * gtk_widget_get_window(GtkWidget * widget);
|
||||
# endif
|
||||
|
||||
# if !GTK_CHECK_VERSION(2, 12, 0)
|
||||
void gtk_widget_set_tooltip_text(GtkWidget * widget, const gchar * text);
|
||||
# endif
|
||||
|
|
11
src/compat.c
11
src/compat.c
|
@ -146,6 +146,17 @@ GtkAllocation gtk_widget_get_allocation(GtkWidget * widget)
|
|||
# endif
|
||||
|
||||
|
||||
# if !GTK_CHECK_VERSION(2, 14, 0)
|
||||
/* gtk_widget_get_window */
|
||||
GdkWindow * gtk_widget_get_window(GtkWidget * widget)
|
||||
{
|
||||
if(!gtk_widget_is_realized(widget))
|
||||
return NULL;
|
||||
return widget->window;
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
# if !GTK_CHECK_VERSION(2, 12, 0)
|
||||
/* gtk_widget_set_tooltip_text */
|
||||
void gtk_widget_set_tooltip_text(GtkWidget * widget, const gchar * text)
|
||||
|
|
Loading…
Reference in New Issue
Block a user