OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 VIEWS_WIDGET_WIDGET_GTK_H_ | 5 #ifndef VIEWS_WIDGET_WIDGET_GTK_H_ |
6 #define VIEWS_WIDGET_WIDGET_GTK_H_ | 6 #define VIEWS_WIDGET_WIDGET_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 guint time); | 148 guint time); |
149 virtual gboolean OnEnterNotify(GtkWidget* widget, GdkEventCrossing* event); | 149 virtual gboolean OnEnterNotify(GtkWidget* widget, GdkEventCrossing* event); |
150 virtual gboolean OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event); | 150 virtual gboolean OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event); |
151 virtual gboolean OnMotionNotify(GtkWidget* widget, GdkEventMotion* event); | 151 virtual gboolean OnMotionNotify(GtkWidget* widget, GdkEventMotion* event); |
152 virtual gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event); | 152 virtual gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event); |
153 virtual gboolean OnButtonRelease(GtkWidget* widget, GdkEventButton* event); | 153 virtual gboolean OnButtonRelease(GtkWidget* widget, GdkEventButton* event); |
154 virtual gboolean OnFocusIn(GtkWidget* widget, GdkEventFocus* event); | 154 virtual gboolean OnFocusIn(GtkWidget* widget, GdkEventFocus* event); |
155 virtual gboolean OnFocusOut(GtkWidget* widget, GdkEventFocus* event); | 155 virtual gboolean OnFocusOut(GtkWidget* widget, GdkEventFocus* event); |
156 virtual gboolean OnKeyPress(GtkWidget* widget, GdkEventKey* event); | 156 virtual gboolean OnKeyPress(GtkWidget* widget, GdkEventKey* event); |
157 virtual gboolean OnKeyRelease(GtkWidget* widget, GdkEventKey* event); | 157 virtual gboolean OnKeyRelease(GtkWidget* widget, GdkEventKey* event); |
| 158 virtual gboolean OnQueryTooltip(gint x, |
| 159 gint y, |
| 160 gboolean keyboard_mode, |
| 161 GtkTooltip* tooltip); |
158 virtual gboolean OnScroll(GtkWidget* widget, GdkEventScroll* event) { | 162 virtual gboolean OnScroll(GtkWidget* widget, GdkEventScroll* event) { |
159 return false; | 163 return false; |
160 } | 164 } |
161 virtual gboolean OnVisibilityNotify(GtkWidget* widget, | 165 virtual gboolean OnVisibilityNotify(GtkWidget* widget, |
162 GdkEventVisibility* event) { | 166 GdkEventVisibility* event) { |
163 return false; | 167 return false; |
164 } | 168 } |
165 virtual gboolean OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event); | 169 virtual gboolean OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event); |
166 virtual void OnGrabNotify(GtkWidget* widget, gboolean was_grabbed); | 170 virtual void OnGrabNotify(GtkWidget* widget, gboolean was_grabbed); |
167 virtual void OnDestroy(); | 171 virtual void OnDestroy(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 WidgetGtk* host); | 255 WidgetGtk* host); |
252 static gboolean CallEnterNotify(GtkWidget* widget, GdkEventCrossing* event); | 256 static gboolean CallEnterNotify(GtkWidget* widget, GdkEventCrossing* event); |
253 static gboolean CallLeaveNotify(GtkWidget* widget, GdkEventCrossing* event); | 257 static gboolean CallLeaveNotify(GtkWidget* widget, GdkEventCrossing* event); |
254 static gboolean CallMotionNotify(GtkWidget* widget, GdkEventMotion* event); | 258 static gboolean CallMotionNotify(GtkWidget* widget, GdkEventMotion* event); |
255 static gboolean CallButtonPress(GtkWidget* widget, GdkEventButton* event); | 259 static gboolean CallButtonPress(GtkWidget* widget, GdkEventButton* event); |
256 static gboolean CallButtonRelease(GtkWidget* widget, GdkEventButton* event); | 260 static gboolean CallButtonRelease(GtkWidget* widget, GdkEventButton* event); |
257 static gboolean CallFocusIn(GtkWidget* widget, GdkEventFocus* event); | 261 static gboolean CallFocusIn(GtkWidget* widget, GdkEventFocus* event); |
258 static gboolean CallFocusOut(GtkWidget* widget, GdkEventFocus* event); | 262 static gboolean CallFocusOut(GtkWidget* widget, GdkEventFocus* event); |
259 static gboolean CallKeyPress(GtkWidget* widget, GdkEventKey* event); | 263 static gboolean CallKeyPress(GtkWidget* widget, GdkEventKey* event); |
260 static gboolean CallKeyRelease(GtkWidget* widget, GdkEventKey* event); | 264 static gboolean CallKeyRelease(GtkWidget* widget, GdkEventKey* event); |
| 265 static gboolean CallQueryTooltip(GtkWidget* widget, |
| 266 gint x, |
| 267 gint y, |
| 268 gboolean keyboard_mode, |
| 269 GtkTooltip* tooltip, |
| 270 WidgetGtk* host); |
261 static gboolean CallScroll(GtkWidget* widget, GdkEventScroll* event); | 271 static gboolean CallScroll(GtkWidget* widget, GdkEventScroll* event); |
262 static gboolean CallVisibilityNotify(GtkWidget* widget, | 272 static gboolean CallVisibilityNotify(GtkWidget* widget, |
263 GdkEventVisibility* event); | 273 GdkEventVisibility* event); |
264 static gboolean CallGrabBrokeEvent(GtkWidget* widget, GdkEvent* event); | 274 static gboolean CallGrabBrokeEvent(GtkWidget* widget, GdkEvent* event); |
265 static void CallGrabNotify(GtkWidget* widget, gboolean was_grabbed); | 275 static void CallGrabNotify(GtkWidget* widget, gboolean was_grabbed); |
266 static void CallDestroy(GtkObject* object); | 276 static void CallDestroy(GtkObject* object); |
267 | 277 |
268 // Returns the first ancestor of |widget| that is a window. | 278 // Returns the first ancestor of |widget| that is a window. |
269 static Window* GetWindowImpl(GtkWidget* widget); | 279 static Window* GetWindowImpl(GtkWidget* widget); |
270 | 280 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 // This is non-null during the life of DoDrag and contains the actual data | 356 // This is non-null during the life of DoDrag and contains the actual data |
347 // for the drag. | 357 // for the drag. |
348 const OSExchangeDataProviderGtk* drag_data_; | 358 const OSExchangeDataProviderGtk* drag_data_; |
349 | 359 |
350 DISALLOW_COPY_AND_ASSIGN(WidgetGtk); | 360 DISALLOW_COPY_AND_ASSIGN(WidgetGtk); |
351 }; | 361 }; |
352 | 362 |
353 } // namespace views | 363 } // namespace views |
354 | 364 |
355 #endif // VIEWS_WIDGET_WIDGET_GTK_H_ | 365 #endif // VIEWS_WIDGET_WIDGET_GTK_H_ |
OLD | NEW |