2009-04-03 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Fri, 3 Apr 2009 12:12:23 +0000 (12:12 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Fri, 3 Apr 2009 12:12:23 +0000 (12:12 +0000)
* doc/hildon-sections.txt
* src/hildon-window-stack.h
* src/hildon-window-stack.c
(+hildon_window_stack_get_windows):
New API to obtain the list of windows on a stack.

ChangeLog
doc/hildon-sections.txt
src/hildon-window-stack.c
src/hildon-window-stack.h

index 405b1a9..a380de3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-03  Alberto Garcia  <agarcia@igalia.com>
+
+       * doc/hildon-sections.txt
+       * src/hildon-window-stack.h
+       * src/hildon-window-stack.c
+       (+hildon_window_stack_get_windows):
+       New API to obtain the list of windows on a stack.
+
 2009-04-02  Alberto Garcia  <agarcia@igalia.com>
 
        * src/hildon-app-menu.c (hildon_app_menu_popup)
index 09806b7..c6e800d 100644 (file)
@@ -836,6 +836,7 @@ HildonWindowStack
 hildon_window_stack_get_default
 hildon_window_stack_new
 hildon_window_stack_size
+hildon_window_stack_get_windows
 hildon_window_stack_peek
 hildon_window_stack_push
 hildon_window_stack_push_list
index a0b399e..1d63ffc 100644 (file)
@@ -225,6 +225,24 @@ hildon_window_stack_remove                      (HildonStackableWindow *win)
 }
 
 /**
+ * hildon_window_stack_get_windows:
+ * @stack: a #HildonWindowStack
+ *
+ * Returns the list of windows on this stack (topmost first). The
+ * widgets in the list are not individually referenced. Once you are
+ * done with the list you must call g_list_free().
+ *
+ * Returns: a newly-allocated list of #HildonStackableWindow<!-- -->s
+ **/
+GList *
+hildon_window_stack_get_windows                 (HildonWindowStack *stack)
+{
+    g_return_val_if_fail (HILDON_IS_WINDOW_STACK (stack), NULL);
+
+    return g_list_copy (stack->priv->list);
+}
+
+/**
  * hildon_window_stack_peek:
  * @stack: A %HildonWindowStack
  *
index 650ed3a..98219a6 100644 (file)
@@ -92,6 +92,9 @@ hildon_window_stack_new                         (void);
 gint
 hildon_window_stack_size                        (HildonWindowStack *stack);
 
+GList *
+hildon_window_stack_get_windows                 (HildonWindowStack *stack);
+
 GtkWidget *
 hildon_window_stack_peek                        (HildonWindowStack *stack);