Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: ui/base/gtk/gtk_compat.h

Issue 8635018: GTK: Port RenderWidgetHostViewGtk to latest GTK (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: gdk_visual_get_depth was added in 2.22 not 2.18 Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gtk/gtk_compat.h
diff --git a/ui/base/gtk/gtk_compat.h b/ui/base/gtk/gtk_compat.h
index e6c119a286e804f2ca6d8cf93a5e78d9559ce252..b9f7fd2a0ba8c89c2c0caece901323fa555382be 100644
--- a/ui/base/gtk/gtk_compat.h
+++ b/ui/base/gtk/gtk_compat.h
@@ -26,14 +26,32 @@ inline gboolean gtk_widget_is_toplevel(GtkWidget* widget) {
}
#endif
+#if !GTK_CHECK_VERSION(2, 22, 0)
+inline gint gdk_visual_get_depth(GdkVisual* visual) {
+ return visual->depth;
+}
+#endif
+
#if !GTK_CHECK_VERSION(2, 24, 0)
inline void gdk_pixmap_get_size(GdkPixmap* pixmap, gint* width, gint* height) {
gdk_drawable_get_size(GDK_DRAWABLE(pixmap), width, height);
}
+inline int gdk_window_get_height(GdkWindow* window) {
+ int height;
+ gdk_drawable_get_size(GDK_DRAWABLE(window), NULL, &height);
+ return height;
+}
+
inline GdkScreen* gdk_window_get_screen(GdkWindow* window) {
return gdk_drawable_get_screen(GDK_DRAWABLE(window));
}
+
+inline int gdk_window_get_width(GdkWindow* window) {
+ int width;
+ gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL);
+ return width;
+}
#endif
#endif // UI_BASE_GTK_GTK_COMPAT_H_
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698