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

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: 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
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..1dad00a1091b6e117fc687f58e03283dc6f1a03a 100644
--- a/ui/base/gtk/gtk_compat.h
+++ b/ui/base/gtk/gtk_compat.h
@@ -26,6 +26,12 @@ inline gboolean gtk_widget_is_toplevel(GtkWidget* widget) {
}
#endif
+#if !GTK_CHECK_VERSION(2, 18, 0)
+inline gint gdk_visual_get_depth(GdkVisual* visual) {
Elliot Glaysher 2011/11/28 18:35:42 Please keep the GTK_CHECK_VERSION sections in orde
robert.bradford 2011/11/29 12:02:49 Done.
+ 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);
@@ -34,6 +40,25 @@ inline void gdk_pixmap_get_size(GdkPixmap* pixmap, gint* width, gint* 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)
Elliot Glaysher 2011/11/28 18:35:42 Remove whitespace and match bracing style. add def
robert.bradford 2011/11/29 12:02:49 Done.
+{
+ int width;
+
+ gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL);
+
+ return width;
+}
+
+inline int gdk_window_get_height(GdkWindow* window)
+{
+ int height;
+
+ gdk_drawable_get_size(GDK_DRAWABLE(window), NULL, &height);
+
+ return height;
+}
+
#endif
#endif // UI_BASE_GTK_GTK_COMPAT_H_

Powered by Google App Engine
This is Rietveld 408576698