| 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 VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ |
| 6 #define VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ | 6 #define 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 virtual void RunShellDrag(View* view, | 217 virtual void RunShellDrag(View* view, |
| 218 const ui::OSExchangeData& data, | 218 const ui::OSExchangeData& data, |
| 219 int operation) OVERRIDE; | 219 int operation) OVERRIDE; |
| 220 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | 220 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; |
| 221 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 221 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
| 222 virtual void ClearNativeFocus() OVERRIDE; | 222 virtual void ClearNativeFocus() OVERRIDE; |
| 223 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; | 223 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; |
| 224 virtual bool ConvertPointFromAncestor( | 224 virtual bool ConvertPointFromAncestor( |
| 225 const Widget* ancestor, gfx::Point* point) const OVERRIDE; | 225 const Widget* ancestor, gfx::Point* point) const OVERRIDE; |
| 226 virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE; | 226 virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE; |
| 227 virtual void SetInactiveRenderingDisabled(bool value) OVERRIDE; |
| 227 | 228 |
| 228 protected: | 229 protected: |
| 229 // Modifies event coordinates to the targeted widget contained by this widget. | 230 // Modifies event coordinates to the targeted widget contained by this widget. |
| 230 template<class Event> GdkEvent* TransformEvent(Event* event) { | 231 template<class Event> GdkEvent* TransformEvent(Event* event) { |
| 231 GdkWindow* dest = GTK_WIDGET(window_contents_)->window; | 232 GdkWindow* dest = GTK_WIDGET(window_contents_)->window; |
| 232 if (event && event->window != dest) { | 233 if (event && event->window != dest) { |
| 233 gint dest_x, dest_y; | 234 gint dest_x, dest_y; |
| 234 gdk_window_get_root_origin(dest, &dest_x, &dest_y); | 235 gdk_window_get_root_origin(dest, &dest_x, &dest_y); |
| 235 event->x = event->x_root - dest_x; | 236 event->x = event->x_root - dest_x; |
| 236 event->y = event->y_root - dest_y; | 237 event->y = event->y_root - dest_y; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 bool is_menu_; | 459 bool is_menu_; |
| 459 | 460 |
| 460 scoped_ptr<ui::GtkSignalRegistrar> signal_registrar_; | 461 scoped_ptr<ui::GtkSignalRegistrar> signal_registrar_; |
| 461 | 462 |
| 462 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); | 463 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); |
| 463 }; | 464 }; |
| 464 | 465 |
| 465 } // namespace views | 466 } // namespace views |
| 466 | 467 |
| 467 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ | 468 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ |
| OLD | NEW |