| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_BASE_GTK_GTK_COMPAT_H_ | 5 #ifndef UI_BASE_GTK_GTK_COMPAT_H_ |
| 6 #define UI_BASE_GTK_GTK_COMPAT_H_ | 6 #define UI_BASE_GTK_GTK_COMPAT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 inline GdkWindow* gtk_button_get_event_window(GtkButton* button) { | 63 inline GdkWindow* gtk_button_get_event_window(GtkButton* button) { |
| 64 return button->event_window; | 64 return button->event_window; |
| 65 } | 65 } |
| 66 #endif // !GTK_CHECK_VERSION(2, 22, 0) | 66 #endif // !GTK_CHECK_VERSION(2, 22, 0) |
| 67 | 67 |
| 68 #if !GTK_CHECK_VERSION(2, 24, 0) | 68 #if !GTK_CHECK_VERSION(2, 24, 0) |
| 69 inline void gdk_pixmap_get_size(GdkPixmap* pixmap, gint* width, gint* height) { | 69 inline void gdk_pixmap_get_size(GdkPixmap* pixmap, gint* width, gint* height) { |
| 70 gdk_drawable_get_size(GDK_DRAWABLE(pixmap), width, height); | 70 gdk_drawable_get_size(GDK_DRAWABLE(pixmap), width, height); |
| 71 } | 71 } |
| 72 | 72 |
| 73 inline GdkDisplay* gdk_window_get_display(GdkWindow* window) { |
| 74 return gdk_drawable_get_display(GDK_DRAWABLE(window)); |
| 75 } |
| 76 |
| 73 inline int gdk_window_get_height(GdkWindow* window) { | 77 inline int gdk_window_get_height(GdkWindow* window) { |
| 74 int height; | 78 int height; |
| 75 gdk_drawable_get_size(GDK_DRAWABLE(window), NULL, &height); | 79 gdk_drawable_get_size(GDK_DRAWABLE(window), NULL, &height); |
| 76 return height; | 80 return height; |
| 77 } | 81 } |
| 78 | 82 |
| 79 inline GdkScreen* gdk_window_get_screen(GdkWindow* window) { | 83 inline GdkScreen* gdk_window_get_screen(GdkWindow* window) { |
| 80 return gdk_drawable_get_screen(GDK_DRAWABLE(window)); | 84 return gdk_drawable_get_screen(GDK_DRAWABLE(window)); |
| 81 } | 85 } |
| 82 | 86 |
| 83 inline int gdk_window_get_width(GdkWindow* window) { | 87 inline int gdk_window_get_width(GdkWindow* window) { |
| 84 int width; | 88 int width; |
| 85 gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL); | 89 gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL); |
| 86 return width; | 90 return width; |
| 87 } | 91 } |
| 88 #endif // !GTK_CHECK_VERSION(2, 24, 0) | 92 #endif // !GTK_CHECK_VERSION(2, 24, 0) |
| 89 | 93 |
| 90 #endif // UI_BASE_GTK_GTK_COMPAT_H_ | 94 #endif // UI_BASE_GTK_GTK_COMPAT_H_ |
| OLD | NEW |