From 4ccb6db0909da1c76c760a22429ae171cdeed431 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 31 Oct 2011 05:42:10 +0000 Subject: [PATCH] add gdk_window_get_height/width git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/private/gtk2-compat.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/wx/gtk/private/gtk2-compat.h b/include/wx/gtk/private/gtk2-compat.h index 0f8007e4dd..d7be4f14ad 100644 --- a/include/wx/gtk/private/gtk2-compat.h +++ b/include/wx/gtk/private/gtk2-compat.h @@ -339,6 +339,25 @@ static inline GdkWindow* wx_gtk_entry_get_text_window(GtkEntry* entry) } #define gtk_entry_get_text_window wx_gtk_entry_get_text_window +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.24 + +static inline gint wx_gdk_window_get_height(GdkWindow* window) +{ + int h; + gdk_drawable_get_size(window, NULL, &h); + return h; +} +#define gdk_window_get_height wx_gdk_window_get_height + +static inline gint wx_gdk_window_get_width(GdkWindow* window) +{ + int w; + gdk_drawable_get_size(window, &w, NULL); + return w; +} +#define gdk_window_get_width wx_gdk_window_get_width + #endif // !GTK_CHECK_VERSION(3,0,0) && !defined(GTK_DISABLE_DEPRECATED) -- 2.45.2