Commit b7fdaadce30119d44b7d2375f474dc58bc83db5f
1 parent
1f6c3b1d
Exists in
master
and in
1 other branch
Incluindo pequenas macros para compatibilizar com versões um pouco mais antigas do gtk
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
private.h
... | ... | @@ -194,6 +194,16 @@ gboolean v3270_draw(GtkWidget * widget, cairo_t * cr); |
194 | 194 | void v3270_draw_oia(cairo_t *cr, H3270 *host, int row, int cols, struct v3270_metrics *metrics, GdkColor *color, GdkRectangle *rect); |
195 | 195 | void v3270_update_mouse_pointer(GtkWidget *widget); |
196 | 196 | |
197 | +#if ! GTK_CHECK_VERSION(2,20,0) | |
198 | + #define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED(w) | |
199 | + #define gtk_widget_set_realized(w,r) if(r) { GTK_WIDGET_SET_FLAGS(w,GTK_REALIZED); } else { GTK_WIDGET_UNSET_FLAGS(w,GTK_REALIZED); } | |
200 | +#endif // !GTK(2,20) | |
201 | + | |
202 | +#if ! GTK_CHECK_VERSION(2,22,0) | |
203 | + #define gtk_accessible_set_widget(a,w) g_object_set_data(G_OBJECT(a),"widget",w) | |
204 | + #define gtk_accessible_get_widget(a) GTK_WIDGET(g_object_get_data(G_OBJECT(a),"widget")) | |
205 | +#endif // !GTK(2,22) | |
206 | + | |
197 | 207 | #if ! GTK_CHECK_VERSION(3,0,0) |
198 | 208 | gboolean v3270_expose(GtkWidget * widget, GdkEventExpose *event); |
199 | 209 | #endif // GTK 3 | ... | ... |