summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 21:28:04 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 21:28:04 +0000
commit284f766950396abce8f0672c2ccde6b45de25578 (patch)
treea711fe12c1c3ac2aa83e1392f667cdff8b07221f /views
parentb3f2f32e4cdf73df0073930cef7b4d3531df8e5d (diff)
downloadchromium_src-284f766950396abce8f0672c2ccde6b45de25578.zip
chromium_src-284f766950396abce8f0672c2ccde6b45de25578.tar.gz
chromium_src-284f766950396abce8f0672c2ccde6b45de25578.tar.bz2
GTK: Minimize usage of gtk headers.
BUG=none TEST=none Review URL: http://codereview.chromium.org/2891006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51898 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/widget/tooltip_window_gtk.cc6
-rw-r--r--views/widget/tooltip_window_gtk.h12
2 files changed, 14 insertions, 4 deletions
diff --git a/views/widget/tooltip_window_gtk.cc b/views/widget/tooltip_window_gtk.cc
index 3b8bed7..444e67e 100644
--- a/views/widget/tooltip_window_gtk.cc
+++ b/views/widget/tooltip_window_gtk.cc
@@ -4,6 +4,8 @@
#include "views/widget/tooltip_window_gtk.h"
+#include <gtk/gtk.h>
+
#include "base/utf_string_conversions.h"
namespace views {
@@ -27,6 +29,10 @@ void TooltipWindowGtk::SetTooltipText(const std::wstring& text) {
gtk_label_set_text(label(), utf8.c_str());
}
+GtkLabel* TooltipWindowGtk::label() {
+ return GTK_LABEL(label_);
+}
+
void TooltipWindowGtk::Init() {
// Creates and setup tooltip window.
window_ = gtk_window_new(GTK_WINDOW_POPUP);
diff --git a/views/widget/tooltip_window_gtk.h b/views/widget/tooltip_window_gtk.h
index 556fa67..3ba0c20 100644
--- a/views/widget/tooltip_window_gtk.h
+++ b/views/widget/tooltip_window_gtk.h
@@ -5,10 +5,16 @@
#ifndef VIEWS_WIDGET_TOOLTIP_WINDOW_GTK_H_
#define VIEWS_WIDGET_TOOLTIP_WINDOW_GTK_H_
-#include <gtk/gtk.h>
#include <string>
+#include "app/gtk_integers.h"
#include "app/gtk_signal.h"
+#include "base/basictypes.h"
+
+typedef struct _GdkEventExpose GdkEventExpose;
+typedef struct _GtkLabel GtkLabel;
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkStyle GtkStyle;
namespace views {
@@ -23,9 +29,7 @@ class TooltipWindowGtk {
// Sets tooltip text to display.
void SetTooltipText(const std::wstring& text);
- GtkLabel* label() {
- return GTK_LABEL(label_);
- }
+ GtkLabel* label();
protected:
CHROMEGTK_CALLBACK_1(TooltipWindowGtk, gboolean, OnPaint, GdkEventExpose*);