Chromium Code Reviews| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 // Sets the drop target to NULL. This is invoked by DropTargetGTK when the | 101 // Sets the drop target to NULL. This is invoked by DropTargetGTK when the |
| 102 // drop is done. | 102 // drop is done. |
| 103 void ResetDropTarget(); | 103 void ResetDropTarget(); |
| 104 | 104 |
| 105 // Gets the requested size of the widget. This can be the size | 105 // Gets the requested size of the widget. This can be the size |
| 106 // stored in properties for a GtkViewsFixed, or in the requisitioned | 106 // stored in properties for a GtkViewsFixed, or in the requisitioned |
| 107 // size of other kinds of widgets. | 107 // size of other kinds of widgets. |
| 108 void GetRequestedSize(gfx::Size* out) const; | 108 void GetRequestedSize(gfx::Size* out) const; |
| 109 | 109 |
| 110 // Overridden from ui::ActiveWindowWatcherX::Observer. | 110 // Overridden from ui::ActiveWindowWatcherX::Observer. |
| 111 virtual void ActiveWindowChanged(GdkWindow* active_window); | 111 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; |
| 112 | 112 |
| 113 // Clears the focus on the native widget having the focus. | 113 // Clears the focus on the native widget having the focus. |
| 114 virtual void ClearNativeFocus(); | 114 void ClearNativeFocus(); |
| 115 | 115 |
| 116 // Handles a keyboard event by sending it to our focus manager. | 116 // Handles a keyboard event by sending it to our focus manager. |
| 117 // Returns true if it's handled by the focus manager. | 117 // Returns true if it's handled by the focus manager. |
| 118 bool HandleKeyboardEvent(const KeyEvent& key); | 118 bool HandleKeyboardEvent(const KeyEvent& key); |
| 119 | 119 |
| 120 // Tells widget not to remove FREEZE_UPDATES property when the | |
| 121 // widget is painted. This is used if the painting the gtk widget | |
|
sky
2011/06/07 15:41:17
'if the painting' -> 'if painting'
oshima
2011/06/07 19:08:58
Done.
| |
| 122 // is not enough to show the window and has to wait further like | |
| 123 // keyboard overlay. Returns true if this is called before | |
| 124 // FREEZE_UPDATES property is removed, or false otherwise. | |
| 125 bool SuppressFreezeUpdates(); | |
| 126 | |
| 120 // Enables debug painting. See |debug_paint_enabled_| for details. | 127 // Enables debug painting. See |debug_paint_enabled_| for details. |
| 121 static void EnableDebugPaint(); | 128 static void EnableDebugPaint(); |
| 122 | 129 |
| 123 // Sets and deletes FREEZE_UPDATES property on given |window|. | 130 // Sets and deletes FREEZE_UPDATES property on given |window|. |
| 124 // It adds the property when |enable| is true and remove if false. | 131 // It adds the property when |enable| is true and remove if false. |
| 125 // Calling this method will realize the window if it's not realized yet. | 132 // Calling this method will realize the window if it's not realized yet. |
| 126 // This property is used to help WindowManager know when the window | 133 // This property is used to help WindowManager know when the window |
| 127 // is fully painted so that WM can map the fully painted window. | 134 // is fully painted so that WM can map the fully painted window. |
| 128 // The property is based on Owen Taylor's proposal at | 135 // The property is based on Owen Taylor's proposal at |
| 129 // http://mail.gnome.org/archives/wm-spec-list/2009-June/msg00002.html. | 136 // http://mail.gnome.org/archives/wm-spec-list/2009-June/msg00002.html. |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 435 bool painted_; | 442 bool painted_; |
| 436 | 443 |
| 437 scoped_ptr<InputMethod> input_method_; | 444 scoped_ptr<InputMethod> input_method_; |
| 438 | 445 |
| 439 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); | 446 DISALLOW_COPY_AND_ASSIGN(NativeWidgetGtk); |
| 440 }; | 447 }; |
| 441 | 448 |
| 442 } // namespace views | 449 } // namespace views |
| 443 | 450 |
| 444 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ | 451 #endif // VIEWS_WIDGET_NATIVE_WIDGET_GTK_H_ |
| OLD | NEW |