qulogic/libgnt
Clone
Summary
Browse
Changes
Graph
Add GntBox accessor for its children.
release-2.x.y
2019-04-19, Elliott Sales de Andrade
2ef05b12e0c1
Parents
e59cae5434a0
Children
e7ff596b728d
Add GntBox accessor for its children.
2 files changed, 22 insertions(+), 1 deletions(-)
+8
-0
gntbox.c
+14
-1
gntbox.h
--- a/gntbox.c Fri Apr 19 01:19:02 2019 -0400
+++ b/gntbox.c Fri Apr 19 01:52:27 2019 -0400
@@ -710,6 +710,14 @@
gnt_widget_set_take_focus(widget, set);
}
+GList *
+gnt_box_get_children(GntBox *box)
+{
+ g_return_val_if_fail(GNT_IS_BOX(box), NULL);
+
+ return g_list_copy(box->list);
+}
+
void gnt_box_sync_children(GntBox *box)
{
GList *iter;
--- a/gntbox.h Fri Apr 19 01:19:02 2019 -0400
+++ b/gntbox.h Fri Apr 19 01:52:27 2019 -0400
@@ -62,7 +62,7 @@
gboolean GNTSEAL(vertical);
gboolean GNTSEAL(homogeneous);
gboolean GNTSEAL(fill);
- GList *GNTSEAL(list); /* List of widgets */
+ GList *GNTSEAL(list); /* Deprecated. Use gnt_box_get_children. */
GntWidget *GNTSEAL(active);
int GNTSEAL(pad); /* Number of spaces to use between widgets */
@@ -116,6 +116,19 @@
GntWidget * gnt_box_new(gboolean homo, gboolean vert);
/**
+ * gnt_box_get_children:
+ * @box: The box
+ *
+ * Returns a list of the children of the widget.
+ *
+ * Returns: (element-type GntWidget) (transfer container): A new list
+ * containing the children of the box.
+ *
+ * Since: 2.14.0
+ */
+GList *gnt_box_get_children(GntBox *box);
+
+/**
* gnt_box_add_widget:
* @box: The box
* @widget: The widget to add