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

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

Issue 8897006: GTK: Remove deprecated methods and replace them with the new standard calls. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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 b9f7fd2a0ba8c89c2c0caece901323fa555382be..75b76c257f05eb7d2207401290125fbe1304d492 100644
--- a/ui/base/gtk/gtk_compat.h
+++ b/ui/base/gtk/gtk_compat.h
@@ -17,6 +17,10 @@
// alphabetically by method.
#if !GTK_CHECK_VERSION(2, 20, 0)
+inline gboolean gtk_widget_get_mapped(GtkWidget* widget) {
+ return GTK_WIDGET_MAPPED(widget);
+}
+
inline gboolean gtk_widget_get_realized(GtkWidget* widget) {
return GTK_WIDGET_REALIZED(widget);
}
@@ -24,6 +28,14 @@ inline gboolean gtk_widget_get_realized(GtkWidget* widget) {
inline gboolean gtk_widget_is_toplevel(GtkWidget* widget) {
return GTK_WIDGET_TOPLEVEL(widget);
}
+
+inline void gtk_widget_set_mapped(GtkWidget* widget) {
Lei Zhang 2011/12/09 20:57:33 Doesn't gtk_widget_set_mapped() also take a gboole
+ GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED);
+}
+
+inline void gtk_widget_set_realized(GtkWidget* widget) {
+ GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);
+}
#endif
#if !GTK_CHECK_VERSION(2, 22, 0)

Powered by Google App Engine
This is Rietveld 408576698