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

Side by Side Diff: ui/base/gtk/gtk_compat.h

Issue 9151007: GTK: Seal up GSEALs, focusing on GtkSelectionData. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add gtk_widget_style_attach to make minimal version 2.18 Created 8 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « ui/base/gtk/focus_store_gtk.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED); 42 GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED);
43 } 43 }
44 44
45 inline void gtk_widget_set_realized(GtkWidget* widget, 45 inline void gtk_widget_set_realized(GtkWidget* widget,
46 gboolean realized) { 46 gboolean realized) {
47 if (realized) 47 if (realized)
48 GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); 48 GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
49 else 49 else
50 GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED); 50 GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);
51 } 51 }
52
53 inline void gtk_widget_style_attach(GtkWidget* widget) {
54 widget->style = gtk_style_attach(widget->style, widget->window);
55 }
52 #endif // !GTK_CHECK_VERSION(2, 20, 0) || defined(GOOGLE_CHROME_BUILD) 56 #endif // !GTK_CHECK_VERSION(2, 20, 0) || defined(GOOGLE_CHROME_BUILD)
53 57
54 #if !GTK_CHECK_VERSION(2, 22, 0) 58 #if !GTK_CHECK_VERSION(2, 22, 0)
55 inline gint gdk_visual_get_depth(GdkVisual* visual) { 59 inline gint gdk_visual_get_depth(GdkVisual* visual) {
56 return visual->depth; 60 return visual->depth;
57 } 61 }
58 62
59 inline GdkWindow* gtk_button_get_event_window(GtkButton* button) { 63 inline GdkWindow* gtk_button_get_event_window(GtkButton* button) {
60 return button->event_window; 64 return button->event_window;
61 } 65 }
(...skipping 15 matching lines...) Expand all
77 } 81 }
78 82
79 inline int gdk_window_get_width(GdkWindow* window) { 83 inline int gdk_window_get_width(GdkWindow* window) {
80 int width; 84 int width;
81 gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL); 85 gdk_drawable_get_size(GDK_DRAWABLE(window), &width, NULL);
82 return width; 86 return width;
83 } 87 }
84 #endif // !GTK_CHECK_VERSION(2, 24, 0) 88 #endif // !GTK_CHECK_VERSION(2, 24, 0)
85 89
86 #endif // UI_BASE_GTK_GTK_COMPAT_H_ 90 #endif // UI_BASE_GTK_GTK_COMPAT_H_
OLDNEW
« no previous file with comments | « ui/base/gtk/focus_store_gtk.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698