| 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/browser/gtk/gtk_floating_container.h" | 5 #include "chrome/browser/gtk/gtk_floating_container.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <gtk/gtkprivate.h> | 8 #include <gtk/gtkprivate.h> |
| 9 #include <gtk/gtkmarshal.h> | 9 #include <gtk/gtkmarshal.h> |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 GtkFloatingContainerChild* child = | 185 GtkFloatingContainerChild* child = |
| 186 reinterpret_cast<GtkFloatingContainerChild*>(children->data); | 186 reinterpret_cast<GtkFloatingContainerChild*>(children->data); |
| 187 children = children->next; | 187 children = children->next; |
| 188 | 188 |
| 189 (*callback)(child->widget, callback_data); | 189 (*callback)(child->widget, callback_data); |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 | 192 |
| 193 static void gtk_floating_container_size_request(GtkWidget* widget, | 193 static void gtk_floating_container_size_request(GtkWidget* widget, |
| 194 GtkRequisition* requisition) { | 194 GtkRequisition* requisition) { |
| 195 GtkBin *bin = GTK_BIN(widget); | 195 GtkBin* bin = GTK_BIN(widget); |
| 196 if (bin && bin->child) { | 196 if (bin && bin->child) { |
| 197 gtk_widget_size_request(bin->child, requisition); | 197 gtk_widget_size_request(bin->child, requisition); |
| 198 } else { | 198 } else { |
| 199 requisition->width = 0; | 199 requisition->width = 0; |
| 200 requisition->height = 0; | 200 requisition->height = 0; |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 | 203 |
| 204 static void gtk_floating_container_size_allocate(GtkWidget* widget, | 204 static void gtk_floating_container_size_allocate(GtkWidget* widget, |
| 205 GtkAllocation* allocation) { | 205 GtkAllocation* allocation) { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 child_info->x = 0; | 311 child_info->x = 0; |
| 312 child_info->y = 0; | 312 child_info->y = 0; |
| 313 | 313 |
| 314 gtk_widget_set_parent(widget, GTK_WIDGET(container)); | 314 gtk_widget_set_parent(widget, GTK_WIDGET(container)); |
| 315 | 315 |
| 316 container->floating_children = | 316 container->floating_children = |
| 317 g_list_append(container->floating_children, child_info); | 317 g_list_append(container->floating_children, child_info); |
| 318 } | 318 } |
| 319 | 319 |
| 320 G_END_DECLS | 320 G_END_DECLS |
| OLD | NEW |