| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ |
| 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 virtual void SetOpacity(unsigned char opacity) OVERRIDE; | 210 virtual void SetOpacity(unsigned char opacity) OVERRIDE; |
| 211 virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE; | 211 virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE; |
| 212 virtual bool IsAccessibleWidget() const OVERRIDE; | 212 virtual bool IsAccessibleWidget() const OVERRIDE; |
| 213 virtual void RunShellDrag(View* view, | 213 virtual void RunShellDrag(View* view, |
| 214 const ui::OSExchangeData& data, | 214 const ui::OSExchangeData& data, |
| 215 int operation) OVERRIDE; | 215 int operation) OVERRIDE; |
| 216 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | 216 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; |
| 217 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 217 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
| 218 virtual void ClearNativeFocus() OVERRIDE; | 218 virtual void ClearNativeFocus() OVERRIDE; |
| 219 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; | 219 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; |
| 220 virtual bool ConvertPointFromAncestor( | |
| 221 const Widget* ancestor, gfx::Point* point) const OVERRIDE; | |
| 222 virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE; | 220 virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE; |
| 223 virtual void SetInactiveRenderingDisabled(bool value) OVERRIDE; | 221 virtual void SetInactiveRenderingDisabled(bool value) OVERRIDE; |
| 224 | 222 |
| 225 protected: | 223 protected: |
| 226 // Modifies event coordinates to the targeted widget contained by this widget. | 224 // Modifies event coordinates to the targeted widget contained by this widget. |
| 227 template<class Event> GdkEvent* TransformEvent(Event* event) { | 225 template<class Event> GdkEvent* TransformEvent(Event* event) { |
| 228 GdkWindow* dest = GTK_WIDGET(window_contents_)->window; | 226 GdkWindow* dest = GTK_WIDGET(window_contents_)->window; |
| 229 if (event && event->window != dest) { | 227 if (event && event->window != dest) { |
| 230 gint dest_x, dest_y; | 228 gint dest_x, dest_y; |
| 231 gdk_window_get_root_origin(dest, &dest_x, &dest_y); | 229 gdk_window_get_root_origin(dest, &dest_x, &dest_y); |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 bool is_menu_; | 463 bool is_menu_; |
| 466 | 464 |
| 467 scoped_ptr<ui::GtkSignalRegistrar> signal_registrar_; | 465 scoped_ptr<ui::GtkSignalRegistrar> signal_registrar_; |
| 468 | 466 |
| 469 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); | 467 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); |
| 470 }; | 468 }; |
| 471 | 469 |
| 472 } // namespace views | 470 } // namespace views |
| 473 | 471 |
| 474 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ | 472 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ |
| OLD | NEW |