1/*
2 * Copyright (c) 2013 Red Hat, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 * License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 *
18 * Author: Alexander Larsson <alexl@redhat.com>
19 *
20 */
21
22#ifndef __GTK_STACK_H__
23#define __GTK_STACK_H__
24
25#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
26#error "Only <gtk/gtk.h> can be included directly."
27#endif
28
29#include <gtk/gtkwidget.h>
30#include <gtk/gtkselectionmodel.h>
31
32G_BEGIN_DECLS
33
34
35#define GTK_TYPE_STACK (gtk_stack_get_type ())
36#define GTK_STACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_STACK, GtkStack))
37#define GTK_IS_STACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_STACK))
38
39typedef struct _GtkStack GtkStack;
40
41#define GTK_TYPE_STACK_PAGE (gtk_stack_page_get_type ())
42#define GTK_STACK_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_STACK_PAGE, GtkStackPage))
43#define GTK_IS_STACK_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_STACK_PAGE))
44
45typedef struct _GtkStackPage GtkStackPage;
46
47typedef enum {
48 GTK_STACK_TRANSITION_TYPE_NONE,
49 GTK_STACK_TRANSITION_TYPE_CROSSFADE,
50 GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT,
51 GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT,
52 GTK_STACK_TRANSITION_TYPE_SLIDE_UP,
53 GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN,
54 GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT,
55 GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN,
56 GTK_STACK_TRANSITION_TYPE_OVER_UP,
57 GTK_STACK_TRANSITION_TYPE_OVER_DOWN,
58 GTK_STACK_TRANSITION_TYPE_OVER_LEFT,
59 GTK_STACK_TRANSITION_TYPE_OVER_RIGHT,
60 GTK_STACK_TRANSITION_TYPE_UNDER_UP,
61 GTK_STACK_TRANSITION_TYPE_UNDER_DOWN,
62 GTK_STACK_TRANSITION_TYPE_UNDER_LEFT,
63 GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT,
64 GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN,
65 GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP,
66 GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT,
67 GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT,
68 GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT,
69 GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT,
70 GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT_RIGHT
71} GtkStackTransitionType;
72
73GDK_AVAILABLE_IN_ALL
74GType gtk_stack_page_get_type (void) G_GNUC_CONST;
75GDK_AVAILABLE_IN_ALL
76GtkWidget * gtk_stack_page_get_child (GtkStackPage *self);
77GDK_AVAILABLE_IN_ALL
78gboolean gtk_stack_page_get_visible (GtkStackPage *self);
79GDK_AVAILABLE_IN_ALL
80void gtk_stack_page_set_visible (GtkStackPage *self,
81 gboolean visible);
82GDK_AVAILABLE_IN_ALL
83gboolean gtk_stack_page_get_needs_attention (GtkStackPage *self);
84GDK_AVAILABLE_IN_ALL
85void gtk_stack_page_set_needs_attention (GtkStackPage *self,
86 gboolean setting);
87GDK_AVAILABLE_IN_ALL
88gboolean gtk_stack_page_get_use_underline (GtkStackPage *self);
89GDK_AVAILABLE_IN_ALL
90void gtk_stack_page_set_use_underline (GtkStackPage *self,
91 gboolean setting);
92GDK_AVAILABLE_IN_ALL
93const char * gtk_stack_page_get_name (GtkStackPage *self);
94GDK_AVAILABLE_IN_ALL
95void gtk_stack_page_set_name (GtkStackPage *self,
96 const char *setting);
97GDK_AVAILABLE_IN_ALL
98const char * gtk_stack_page_get_title (GtkStackPage *self);
99GDK_AVAILABLE_IN_ALL
100void gtk_stack_page_set_title (GtkStackPage *self,
101 const char *setting);
102GDK_AVAILABLE_IN_ALL
103const char * gtk_stack_page_get_icon_name (GtkStackPage *self);
104GDK_AVAILABLE_IN_ALL
105void gtk_stack_page_set_icon_name (GtkStackPage *self,
106 const char *setting);
107
108
109
110GDK_AVAILABLE_IN_ALL
111GType gtk_stack_get_type (void) G_GNUC_CONST;
112
113GDK_AVAILABLE_IN_ALL
114GtkWidget * gtk_stack_new (void);
115GDK_AVAILABLE_IN_ALL
116GtkStackPage * gtk_stack_add_child (GtkStack *stack,
117 GtkWidget *child);
118GDK_AVAILABLE_IN_ALL
119GtkStackPage * gtk_stack_add_named (GtkStack *stack,
120 GtkWidget *child,
121 const char *name);
122GDK_AVAILABLE_IN_ALL
123GtkStackPage * gtk_stack_add_titled (GtkStack *stack,
124 GtkWidget *child,
125 const char *name,
126 const char *title);
127GDK_AVAILABLE_IN_ALL
128void gtk_stack_remove (GtkStack *stack,
129 GtkWidget *child);
130
131GDK_AVAILABLE_IN_ALL
132GtkStackPage * gtk_stack_get_page (GtkStack *stack,
133 GtkWidget *child);
134GDK_AVAILABLE_IN_ALL
135GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack,
136 const char *name);
137GDK_AVAILABLE_IN_ALL
138void gtk_stack_set_visible_child (GtkStack *stack,
139 GtkWidget *child);
140GDK_AVAILABLE_IN_ALL
141GtkWidget * gtk_stack_get_visible_child (GtkStack *stack);
142GDK_AVAILABLE_IN_ALL
143void gtk_stack_set_visible_child_name (GtkStack *stack,
144 const char *name);
145GDK_AVAILABLE_IN_ALL
146const char * gtk_stack_get_visible_child_name (GtkStack *stack);
147GDK_AVAILABLE_IN_ALL
148void gtk_stack_set_visible_child_full (GtkStack *stack,
149 const char *name,
150 GtkStackTransitionType transition);
151GDK_AVAILABLE_IN_ALL
152void gtk_stack_set_hhomogeneous (GtkStack *stack,
153 gboolean hhomogeneous);
154GDK_AVAILABLE_IN_ALL
155gboolean gtk_stack_get_hhomogeneous (GtkStack *stack);
156GDK_AVAILABLE_IN_ALL
157void gtk_stack_set_vhomogeneous (GtkStack *stack,
158 gboolean vhomogeneous);
159GDK_AVAILABLE_IN_ALL
160gboolean gtk_stack_get_vhomogeneous (GtkStack *stack);
161GDK_AVAILABLE_IN_ALL
162void gtk_stack_set_transition_duration (GtkStack *stack,
163 guint duration);
164GDK_AVAILABLE_IN_ALL
165guint gtk_stack_get_transition_duration (GtkStack *stack);
166GDK_AVAILABLE_IN_ALL
167void gtk_stack_set_transition_type (GtkStack *stack,
168 GtkStackTransitionType transition);
169GDK_AVAILABLE_IN_ALL
170GtkStackTransitionType gtk_stack_get_transition_type (GtkStack *stack);
171GDK_AVAILABLE_IN_ALL
172gboolean gtk_stack_get_transition_running (GtkStack *stack);
173GDK_AVAILABLE_IN_ALL
174void gtk_stack_set_interpolate_size (GtkStack *stack,
175 gboolean interpolate_size);
176GDK_AVAILABLE_IN_ALL
177gboolean gtk_stack_get_interpolate_size (GtkStack *stack);
178
179GDK_AVAILABLE_IN_ALL
180GtkSelectionModel * gtk_stack_get_pages (GtkStack *stack);
181
182G_END_DECLS
183
184#endif
185

source code of gtk/gtk/gtkstack.h