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 #include "chrome/views/widget/widget_gtk.h" | 5 #include "chrome/views/widget/widget_gtk.h" |
6 | 6 |
7 #include "chrome/views/fill_layout.h" | 7 #include "chrome/views/fill_layout.h" |
8 #include "chrome/views/widget/root_view.h" | 8 #include "chrome/views/widget/root_view.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 return; | 115 return; |
116 } | 116 } |
117 | 117 |
118 // TODO(erg): Not sure how to implement this. gtk_widget_size_request() | 118 // TODO(erg): Not sure how to implement this. gtk_widget_size_request() |
119 // returns a widget's requested size--not it's actual size. The system of | 119 // returns a widget's requested size--not it's actual size. The system of |
120 // containers and such do auto sizing tricks to make everything work within | 120 // containers and such do auto sizing tricks to make everything work within |
121 // the constraints and requested sizes... | 121 // the constraints and requested sizes... |
122 NOTIMPLEMENTED(); | 122 NOTIMPLEMENTED(); |
123 } | 123 } |
124 | 124 |
125 void WidgetGtk::MoveToFront(bool should_activate) { | |
126 // TODO(erg): I'm not sure about how to do z-ordering on GTK widgets... | |
127 NOTIMPLEMENTED(); | |
128 } | |
129 | |
130 gfx::NativeView WidgetGtk::GetNativeView() const { | 125 gfx::NativeView WidgetGtk::GetNativeView() const { |
131 return widget_; | 126 return widget_; |
132 } | 127 } |
133 | 128 |
134 void WidgetGtk::PaintNow(const gfx::Rect& update_rect) { | 129 void WidgetGtk::PaintNow(const gfx::Rect& update_rect) { |
135 // TODO(erg): This is woefully incomplete and is a straw man implementation. | 130 // TODO(erg): This is woefully incomplete and is a straw man implementation. |
136 gtk_widget_queue_draw_area(widget_, update_rect.x(), update_rect.y(), | 131 gtk_widget_queue_draw_area(widget_, update_rect.x(), update_rect.y(), |
137 update_rect.width(), update_rect.height()); | 132 update_rect.width(), update_rect.height()); |
138 } | 133 } |
139 | 134 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 gboolean WidgetGtk::CallVisibilityNotify(GtkWidget* widget, | 377 gboolean WidgetGtk::CallVisibilityNotify(GtkWidget* widget, |
383 GdkEventVisibility* event) { | 378 GdkEventVisibility* event) { |
384 WidgetGtk* widget_gtk = GetViewForNative(widget); | 379 WidgetGtk* widget_gtk = GetViewForNative(widget); |
385 if (!widget_gtk) | 380 if (!widget_gtk) |
386 return false; | 381 return false; |
387 | 382 |
388 return widget_gtk->OnVisibilityNotify(widget, event); | 383 return widget_gtk->OnVisibilityNotify(widget, event); |
389 } | 384 } |
390 | 385 |
391 } | 386 } |
OLD | NEW |