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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 else | 49 else |
50 GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); | 50 GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); |
51 } | 51 } |
52 | 52 |
53 inline void gtk_widget_style_attach(GtkWidget* widget) { | 53 inline void gtk_widget_style_attach(GtkWidget* widget) { |
54 widget->style = gtk_style_attach(widget->style, widget->window); | 54 widget->style = gtk_style_attach(widget->style, widget->window); |
55 } | 55 } |
56 #endif // !GTK_CHECK_VERSION(2, 20, 0) || defined(GOOGLE_CHROME_BUILD) | 56 #endif // !GTK_CHECK_VERSION(2, 20, 0) || defined(GOOGLE_CHROME_BUILD) |
57 | 57 |
58 #if !GTK_CHECK_VERSION(2, 22, 0) | 58 #if !GTK_CHECK_VERSION(2, 22, 0) |
| 59 inline GdkWindow* gdk_drag_context_get_source_window(GdkDragContext *context) { |
| 60 return context->source_window; |
| 61 } |
| 62 |
59 inline gint gdk_visual_get_depth(GdkVisual* visual) { | 63 inline gint gdk_visual_get_depth(GdkVisual* visual) { |
60 return visual->depth; | 64 return visual->depth; |
61 } | 65 } |
62 | 66 |
63 inline GdkWindow* gtk_button_get_event_window(GtkButton* button) { | 67 inline GdkWindow* gtk_button_get_event_window(GtkButton* button) { |
64 return button->event_window; | 68 return button->event_window; |
65 } | 69 } |
66 #endif // !GTK_CHECK_VERSION(2, 22, 0) | 70 #endif // !GTK_CHECK_VERSION(2, 22, 0) |
67 | 71 |
68 #if !GTK_CHECK_VERSION(2, 24, 0) | 72 #if !GTK_CHECK_VERSION(2, 24, 0) |
(...skipping 16 matching lines...) Expand all Loading... |
85 } | 89 } |
86 | 90 |
87 inline int gdk_window_get_width(GdkWindow* window) { | 91 inline int gdk_window_get_width(GdkWindow* window) { |
88 int width; | 92 int width; |
89 gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL); | 93 gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL); |
90 return width; | 94 return width; |
91 } | 95 } |
92 #endif // !GTK_CHECK_VERSION(2, 24, 0) | 96 #endif // !GTK_CHECK_VERSION(2, 24, 0) |
93 | 97 |
94 #endif // UI_BASE_GTK_GTK_COMPAT_H_ | 98 #endif // UI_BASE_GTK_GTK_COMPAT_H_ |
OLD | NEW |