OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Gets the WidgetGtk in the userdata section of the widget. | 142 // Gets the WidgetGtk in the userdata section of the widget. |
143 static WidgetGtk* GetViewForNative(GtkWidget* widget); | 143 static WidgetGtk* GetViewForNative(GtkWidget* widget); |
144 | 144 |
145 // Sets the drop target to NULL. This is invoked by DropTargetGTK when the | 145 // Sets the drop target to NULL. This is invoked by DropTargetGTK when the |
146 // drop is done. | 146 // drop is done. |
147 void ResetDropTarget(); | 147 void ResetDropTarget(); |
148 | 148 |
149 // Returns the RootView for |widget|. | 149 // Returns the RootView for |widget|. |
150 static RootView* GetRootViewForWidget(GtkWidget* widget); | 150 static RootView* GetRootViewForWidget(GtkWidget* widget); |
151 | 151 |
| 152 // Gets the requested size of the widget. This can be the size |
| 153 // stored in properties for a GtkViewsFixed, or in the requisitioned |
| 154 // size of other kinds of widgets. |
| 155 void GetRequestedSize(gfx::Size* out) const; |
| 156 |
152 // Overriden from ActiveWindowWatcherX::Observer. | 157 // Overriden from ActiveWindowWatcherX::Observer. |
153 virtual void ActiveWindowChanged(GdkWindow* active_window); | 158 virtual void ActiveWindowChanged(GdkWindow* active_window); |
154 | 159 |
155 // Overridden from Widget: | 160 // Overridden from Widget: |
156 virtual void Init(gfx::NativeView parent, const gfx::Rect& bounds); | 161 virtual void Init(gfx::NativeView parent, const gfx::Rect& bounds); |
157 virtual void InitWithWidget(Widget* parent, const gfx::Rect& bounds); | 162 virtual void InitWithWidget(Widget* parent, const gfx::Rect& bounds); |
158 virtual WidgetDelegate* GetWidgetDelegate(); | 163 virtual WidgetDelegate* GetWidgetDelegate(); |
159 virtual void SetWidgetDelegate(WidgetDelegate* delegate); | 164 virtual void SetWidgetDelegate(WidgetDelegate* delegate); |
160 virtual void SetContentsView(View* view); | 165 virtual void SetContentsView(View* view); |
161 virtual void GetBounds(gfx::Rect* out, bool including_frame) const; | 166 virtual void GetBounds(gfx::Rect* out, bool including_frame) const; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 446 |
442 // Indicates if we should handle the upcoming Alt key release event. | 447 // Indicates if we should handle the upcoming Alt key release event. |
443 bool should_handle_menu_key_release_; | 448 bool should_handle_menu_key_release_; |
444 | 449 |
445 DISALLOW_COPY_AND_ASSIGN(WidgetGtk); | 450 DISALLOW_COPY_AND_ASSIGN(WidgetGtk); |
446 }; | 451 }; |
447 | 452 |
448 } // namespace views | 453 } // namespace views |
449 | 454 |
450 #endif // VIEWS_WIDGET_WIDGET_GTK_H_ | 455 #endif // VIEWS_WIDGET_WIDGET_GTK_H_ |
OLD | NEW |