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 | |
31 | G_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 | |
41 | typedef struct _GtkStack GtkStack; |
42 | typedef struct _GtkStackClass GtkStackClass; |
43 | |
44 | typedef 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 | |
67 | struct _GtkStack { |
68 | GtkContainer parent_instance; |
69 | }; |
70 | |
71 | struct _GtkStackClass { |
72 | GtkContainerClass parent_class; |
73 | }; |
74 | |
75 | GDK_AVAILABLE_IN_3_10 |
76 | GType gtk_stack_get_type (void) G_GNUC_CONST; |
77 | |
78 | GDK_AVAILABLE_IN_3_10 |
79 | GtkWidget * gtk_stack_new (void); |
80 | GDK_AVAILABLE_IN_3_10 |
81 | void gtk_stack_add_named (GtkStack *stack, |
82 | GtkWidget *child, |
83 | const gchar *name); |
84 | GDK_AVAILABLE_IN_3_10 |
85 | void gtk_stack_add_titled (GtkStack *stack, |
86 | GtkWidget *child, |
87 | const gchar *name, |
88 | const gchar *title); |
89 | GDK_AVAILABLE_IN_3_12 |
90 | GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack, |
91 | const gchar *name); |
92 | GDK_AVAILABLE_IN_3_10 |
93 | void gtk_stack_set_visible_child (GtkStack *stack, |
94 | GtkWidget *child); |
95 | GDK_AVAILABLE_IN_3_10 |
96 | GtkWidget * gtk_stack_get_visible_child (GtkStack *stack); |
97 | GDK_AVAILABLE_IN_3_10 |
98 | void gtk_stack_set_visible_child_name (GtkStack *stack, |
99 | const gchar *name); |
100 | GDK_AVAILABLE_IN_3_10 |
101 | const gchar * gtk_stack_get_visible_child_name (GtkStack *stack); |
102 | GDK_AVAILABLE_IN_3_10 |
103 | void gtk_stack_set_visible_child_full (GtkStack *stack, |
104 | const gchar *name, |
105 | GtkStackTransitionType transition); |
106 | GDK_AVAILABLE_IN_3_10 |
107 | void gtk_stack_set_homogeneous (GtkStack *stack, |
108 | gboolean homogeneous); |
109 | GDK_AVAILABLE_IN_3_10 |
110 | gboolean gtk_stack_get_homogeneous (GtkStack *stack); |
111 | GDK_AVAILABLE_IN_3_16 |
112 | void gtk_stack_set_hhomogeneous (GtkStack *stack, |
113 | gboolean hhomogeneous); |
114 | GDK_AVAILABLE_IN_3_16 |
115 | gboolean gtk_stack_get_hhomogeneous (GtkStack *stack); |
116 | GDK_AVAILABLE_IN_3_16 |
117 | void gtk_stack_set_vhomogeneous (GtkStack *stack, |
118 | gboolean vhomogeneous); |
119 | GDK_AVAILABLE_IN_3_16 |
120 | gboolean gtk_stack_get_vhomogeneous (GtkStack *stack); |
121 | GDK_AVAILABLE_IN_3_10 |
122 | void gtk_stack_set_transition_duration (GtkStack *stack, |
123 | guint duration); |
124 | GDK_AVAILABLE_IN_3_10 |
125 | guint gtk_stack_get_transition_duration (GtkStack *stack); |
126 | GDK_AVAILABLE_IN_3_10 |
127 | void gtk_stack_set_transition_type (GtkStack *stack, |
128 | GtkStackTransitionType transition); |
129 | GDK_AVAILABLE_IN_3_10 |
130 | GtkStackTransitionType gtk_stack_get_transition_type (GtkStack *stack); |
131 | GDK_AVAILABLE_IN_3_12 |
132 | gboolean gtk_stack_get_transition_running (GtkStack *stack); |
133 | GDK_AVAILABLE_IN_3_18 |
134 | void gtk_stack_set_interpolate_size (GtkStack *stack, |
135 | gboolean interpolate_size); |
136 | GDK_AVAILABLE_IN_3_18 |
137 | gboolean gtk_stack_get_interpolate_size (GtkStack *stack); |
138 | G_END_DECLS |
139 | |
140 | #endif |
141 | |