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/gtkcontainer.h>
30
31G_BEGIN_DECLS
32
33
34#define GTK_TYPE_STACK (gtk_stack_get_type ())
35#define GTK_STACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_STACK, GtkStack))
36#define GTK_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_STACK, GtkStackClass))
37#define GTK_IS_STACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_STACK))
38#define GTK_IS_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_STACK))
39#define GTK_STACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STACK, GtkStackClass))
40
41typedef struct _GtkStack GtkStack;
42typedef struct _GtkStackClass GtkStackClass;
43
44typedef enum {
45 GTK_STACK_TRANSITION_TYPE_NONE,
46 GTK_STACK_TRANSITION_TYPE_CROSSFADE,
47 GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT,
48 GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT,
49 GTK_STACK_TRANSITION_TYPE_SLIDE_UP,
50 GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN,
51 GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT,
52 GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN,
53 GTK_STACK_TRANSITION_TYPE_OVER_UP,
54 GTK_STACK_TRANSITION_TYPE_OVER_DOWN,
55 GTK_STACK_TRANSITION_TYPE_OVER_LEFT,
56 GTK_STACK_TRANSITION_TYPE_OVER_RIGHT,
57 GTK_STACK_TRANSITION_TYPE_UNDER_UP,
58 GTK_STACK_TRANSITION_TYPE_UNDER_DOWN,
59 GTK_STACK_TRANSITION_TYPE_UNDER_LEFT,
60 GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT,
61 GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN,
62 GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP,
63 GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT,
64 GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT
65} GtkStackTransitionType;
66
67struct _GtkStack {
68 GtkContainer parent_instance;
69};
70
71struct _GtkStackClass {
72 GtkContainerClass parent_class;
73};
74
75GDK_AVAILABLE_IN_3_10
76GType gtk_stack_get_type (void) G_GNUC_CONST;
77
78GDK_AVAILABLE_IN_3_10
79GtkWidget * gtk_stack_new (void);
80GDK_AVAILABLE_IN_3_10
81void gtk_stack_add_named (GtkStack *stack,
82 GtkWidget *child,
83 const gchar *name);
84GDK_AVAILABLE_IN_3_10
85void gtk_stack_add_titled (GtkStack *stack,
86 GtkWidget *child,
87 const gchar *name,
88 const gchar *title);
89GDK_AVAILABLE_IN_3_12
90GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack,
91 const gchar *name);
92GDK_AVAILABLE_IN_3_10
93void gtk_stack_set_visible_child (GtkStack *stack,
94 GtkWidget *child);
95GDK_AVAILABLE_IN_3_10
96GtkWidget * gtk_stack_get_visible_child (GtkStack *stack);
97GDK_AVAILABLE_IN_3_10
98void gtk_stack_set_visible_child_name (GtkStack *stack,
99 const gchar *name);
100GDK_AVAILABLE_IN_3_10
101const gchar * gtk_stack_get_visible_child_name (GtkStack *stack);
102GDK_AVAILABLE_IN_3_10
103void gtk_stack_set_visible_child_full (GtkStack *stack,
104 const gchar *name,
105 GtkStackTransitionType transition);
106GDK_AVAILABLE_IN_3_10
107void gtk_stack_set_homogeneous (GtkStack *stack,
108 gboolean homogeneous);
109GDK_AVAILABLE_IN_3_10
110gboolean gtk_stack_get_homogeneous (GtkStack *stack);
111GDK_AVAILABLE_IN_3_16
112void gtk_stack_set_hhomogeneous (GtkStack *stack,
113 gboolean hhomogeneous);
114GDK_AVAILABLE_IN_3_16
115gboolean gtk_stack_get_hhomogeneous (GtkStack *stack);
116GDK_AVAILABLE_IN_3_16
117void gtk_stack_set_vhomogeneous (GtkStack *stack,
118 gboolean vhomogeneous);
119GDK_AVAILABLE_IN_3_16
120gboolean gtk_stack_get_vhomogeneous (GtkStack *stack);
121GDK_AVAILABLE_IN_3_10
122void gtk_stack_set_transition_duration (GtkStack *stack,
123 guint duration);
124GDK_AVAILABLE_IN_3_10
125guint gtk_stack_get_transition_duration (GtkStack *stack);
126GDK_AVAILABLE_IN_3_10
127void gtk_stack_set_transition_type (GtkStack *stack,
128 GtkStackTransitionType transition);
129GDK_AVAILABLE_IN_3_10
130GtkStackTransitionType gtk_stack_get_transition_type (GtkStack *stack);
131GDK_AVAILABLE_IN_3_12
132gboolean gtk_stack_get_transition_running (GtkStack *stack);
133GDK_AVAILABLE_IN_3_18
134void gtk_stack_set_interpolate_size (GtkStack *stack,
135 gboolean interpolate_size);
136GDK_AVAILABLE_IN_3_18
137gboolean gtk_stack_get_interpolate_size (GtkStack *stack);
138G_END_DECLS
139
140#endif
141

source code of include/gtk-3.0/gtk/gtkstack.h