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 UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ | 5 #ifndef UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ |
6 #define UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ | 6 #define UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ |
7 | 7 |
8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
11 #include "ui/base/ui_export.h" | 11 #include "ui/base/ui_base_export.h" |
12 | 12 |
13 // A specialized container, which is a cross between a GtkBin and a | 13 // A specialized container, which is a cross between a GtkBin and a |
14 // GtkFixed. This container dervies from GtkBin and the implementation of | 14 // GtkFixed. This container dervies from GtkBin and the implementation of |
15 // gtk_container_add() is the same: only one GtkWidget can be added through | 15 // gtk_container_add() is the same: only one GtkWidget can be added through |
16 // that interface. The GtkBin portion contains normal content and is given the | 16 // that interface. The GtkBin portion contains normal content and is given the |
17 // same allocation that this container has. | 17 // same allocation that this container has. |
18 // | 18 // |
19 // In addition, any number of widgets can be added through the | 19 // In addition, any number of widgets can be added through the |
20 // gtk_floating_container_add_floating() method, which provides functionality | 20 // gtk_floating_container_add_floating() method, which provides functionality |
21 // similar to a GtkFixed. Unlike a GtkFixed, coordinates are not set when you | 21 // similar to a GtkFixed. Unlike a GtkFixed, coordinates are not set when you |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 GtkBinClass parent_class; | 69 GtkBinClass parent_class; |
70 }; | 70 }; |
71 | 71 |
72 // Internal structure used to associate a widget and its x/y child properties. | 72 // Internal structure used to associate a widget and its x/y child properties. |
73 struct _GtkFloatingContainerChild { | 73 struct _GtkFloatingContainerChild { |
74 GtkWidget* widget; | 74 GtkWidget* widget; |
75 gint x; | 75 gint x; |
76 gint y; | 76 gint y; |
77 }; | 77 }; |
78 | 78 |
79 UI_EXPORT GType gtk_floating_container_get_type() G_GNUC_CONST; | 79 UI_BASE_EXPORT GType gtk_floating_container_get_type() G_GNUC_CONST; |
80 UI_EXPORT GtkWidget* gtk_floating_container_new(); | 80 UI_BASE_EXPORT GtkWidget* gtk_floating_container_new(); |
81 UI_EXPORT void gtk_floating_container_add_floating( | 81 UI_BASE_EXPORT void gtk_floating_container_add_floating( |
82 GtkFloatingContainer* container, | 82 GtkFloatingContainer* container, |
83 GtkWidget* widget); | 83 GtkWidget* widget); |
84 // Use gtk_container_remove to remove all widgets; both widgets added with | 84 // Use gtk_container_remove to remove all widgets; both widgets added with |
85 // gtk_container_add() and gtk_floating_container_add_floating(). | 85 // gtk_container_add() and gtk_floating_container_add_floating(). |
86 | 86 |
87 G_END_DECLS | 87 G_END_DECLS |
88 | 88 |
89 #endif // UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ | 89 #endif // UI_BASE_GTK_GTK_FLOATING_CONTAINER_H_ |
OLD | NEW |