2009-03-19 Alejandro G. Castro <alex@igalia.com>
[hildon] / src / hildon-window-stack.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2008 Nokia Corporation, all rights reserved.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation; version 2.1 of
9  * the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  *
21  */
22
23 #ifndef                                         __HILDON_WINDOW_STACK_H__
24 #define                                         __HILDON_WINDOW_STACK_H__
25
26 #include                                        "hildon-stackable-window.h"
27
28 G_BEGIN_DECLS
29
30 #define                                         HILDON_TYPE_WINDOW_STACK \
31                                                 (hildon_window_stack_get_type())
32
33 #define                                         HILDON_WINDOW_STACK(obj) \
34                                                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
35                                                 HILDON_TYPE_WINDOW_STACK, \
36                                                 HildonWindowStack))
37
38 #define                                         HILDON_WINDOW_STACK_CLASS(klass) \
39                                                 (G_TYPE_CHECK_CLASS_CAST ((klass), \
40                                                 HILDON_TYPE_WINDOW_STACK, \
41                                                 HildonWindowStackClass))
42
43 #define                                         HILDON_IS_WINDOW_STACK(obj) \
44                                                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
45                                                 HILDON_TYPE_WINDOW_STACK))
46
47 #define                                         HILDON_IS_WINDOW_STACK_CLASS(klass) \
48                                                 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
49                                                 HILDON_TYPE_WINDOW_STACK))
50
51 #define                                         HILDON_WINDOW_STACK_GET_CLASS(obj) \
52                                                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
53                                                 HILDON_TYPE_WINDOW_STACK, \
54                                                 HildonWindowStackClass))
55
56 typedef struct                                  _HildonWindowStackPrivate HildonWindowStackPrivate;
57
58 #ifndef _TYPEDEF_HILDON_WINDOW_STACK_
59 #define _TYPEDEF_HILDON_WINDOW_STACK_
60 typedef struct                                  _HildonWindowStack HildonWindowStack;
61 #endif
62 typedef struct                                  _HildonWindowStackClass HildonWindowStackClass;
63
64 struct                                          _HildonWindowStack
65 {
66     GObject parent;
67
68     /* private */
69     HildonWindowStackPrivate *priv;
70 };
71
72 struct                                          _HildonWindowStackClass
73 {
74     GObjectClass parent_class;
75
76     /* Padding for future extension */
77     void (*_hildon_reserved1)(void);
78     void (*_hildon_reserved2)(void);
79     void (*_hildon_reserved3)(void);
80     void (*_hildon_reserved4)(void);
81 };
82
83 GType
84 hildon_window_stack_get_type                    (void) G_GNUC_CONST;
85
86 HildonWindowStack *
87 hildon_window_stack_get_default                 (void);
88
89 HildonWindowStack *
90 hildon_window_stack_new                         (void);
91
92 gint
93 hildon_window_stack_size                        (HildonWindowStack *stack);
94
95 GtkWidget *
96 hildon_window_stack_peek                        (HildonWindowStack *stack);
97
98 void
99 hildon_window_stack_push                        (HildonWindowStack     *stack,
100                                                  HildonStackableWindow *win1,
101                                                  ...);
102
103 void
104 hildon_window_stack_push_list                   (HildonWindowStack *stack,
105                                                  GList             *list);
106
107 void
108 hildon_window_stack_push_1                      (HildonWindowStack     *stack,
109                                                  HildonStackableWindow *win);
110
111 void
112 hildon_window_stack_pop                         (HildonWindowStack  *stack,
113                                                  gint                nwindows,
114                                                  GList             **popped_windows);
115
116 GtkWidget *
117 hildon_window_stack_pop_1                       (HildonWindowStack *stack);
118
119 void
120 hildon_window_stack_pop_and_push                (HildonWindowStack      *stack,
121                                                  gint                    nwindows,
122                                                  GList                 **popped_windows,
123                                                  HildonStackableWindow  *win1,
124                                                  ...);
125
126 void
127 hildon_window_stack_pop_and_push_list           (HildonWindowStack  *stack,
128                                                  gint                nwindows,
129                                                  GList             **popped_windows,
130                                                  GList              *list);
131
132 G_END_DECLS
133
134 #endif                                          /* __HILDON_WINDOW_STACK_H__ */