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 | |
32 | G_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 | |
39 | typedef 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 | |
45 | typedef struct _GtkStackPage GtkStackPage; |
46 | |
47 | typedef 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 | |
73 | GDK_AVAILABLE_IN_ALL |
74 | GType gtk_stack_page_get_type (void) G_GNUC_CONST; |
75 | GDK_AVAILABLE_IN_ALL |
76 | GtkWidget * gtk_stack_page_get_child (GtkStackPage *self); |
77 | GDK_AVAILABLE_IN_ALL |
78 | gboolean gtk_stack_page_get_visible (GtkStackPage *self); |
79 | GDK_AVAILABLE_IN_ALL |
80 | void gtk_stack_page_set_visible (GtkStackPage *self, |
81 | gboolean visible); |
82 | GDK_AVAILABLE_IN_ALL |
83 | gboolean gtk_stack_page_get_needs_attention (GtkStackPage *self); |
84 | GDK_AVAILABLE_IN_ALL |
85 | void gtk_stack_page_set_needs_attention (GtkStackPage *self, |
86 | gboolean setting); |
87 | GDK_AVAILABLE_IN_ALL |
88 | gboolean gtk_stack_page_get_use_underline (GtkStackPage *self); |
89 | GDK_AVAILABLE_IN_ALL |
90 | void gtk_stack_page_set_use_underline (GtkStackPage *self, |
91 | gboolean setting); |
92 | GDK_AVAILABLE_IN_ALL |
93 | const char * gtk_stack_page_get_name (GtkStackPage *self); |
94 | GDK_AVAILABLE_IN_ALL |
95 | void gtk_stack_page_set_name (GtkStackPage *self, |
96 | const char *setting); |
97 | GDK_AVAILABLE_IN_ALL |
98 | const char * gtk_stack_page_get_title (GtkStackPage *self); |
99 | GDK_AVAILABLE_IN_ALL |
100 | void gtk_stack_page_set_title (GtkStackPage *self, |
101 | const char *setting); |
102 | GDK_AVAILABLE_IN_ALL |
103 | const char * gtk_stack_page_get_icon_name (GtkStackPage *self); |
104 | GDK_AVAILABLE_IN_ALL |
105 | void gtk_stack_page_set_icon_name (GtkStackPage *self, |
106 | const char *setting); |
107 | |
108 | |
109 | |
110 | GDK_AVAILABLE_IN_ALL |
111 | GType gtk_stack_get_type (void) G_GNUC_CONST; |
112 | |
113 | GDK_AVAILABLE_IN_ALL |
114 | GtkWidget * gtk_stack_new (void); |
115 | GDK_AVAILABLE_IN_ALL |
116 | GtkStackPage * gtk_stack_add_child (GtkStack *stack, |
117 | GtkWidget *child); |
118 | GDK_AVAILABLE_IN_ALL |
119 | GtkStackPage * gtk_stack_add_named (GtkStack *stack, |
120 | GtkWidget *child, |
121 | const char *name); |
122 | GDK_AVAILABLE_IN_ALL |
123 | GtkStackPage * gtk_stack_add_titled (GtkStack *stack, |
124 | GtkWidget *child, |
125 | const char *name, |
126 | const char *title); |
127 | GDK_AVAILABLE_IN_ALL |
128 | void gtk_stack_remove (GtkStack *stack, |
129 | GtkWidget *child); |
130 | |
131 | GDK_AVAILABLE_IN_ALL |
132 | GtkStackPage * gtk_stack_get_page (GtkStack *stack, |
133 | GtkWidget *child); |
134 | GDK_AVAILABLE_IN_ALL |
135 | GtkWidget * gtk_stack_get_child_by_name (GtkStack *stack, |
136 | const char *name); |
137 | GDK_AVAILABLE_IN_ALL |
138 | void gtk_stack_set_visible_child (GtkStack *stack, |
139 | GtkWidget *child); |
140 | GDK_AVAILABLE_IN_ALL |
141 | GtkWidget * gtk_stack_get_visible_child (GtkStack *stack); |
142 | GDK_AVAILABLE_IN_ALL |
143 | void gtk_stack_set_visible_child_name (GtkStack *stack, |
144 | const char *name); |
145 | GDK_AVAILABLE_IN_ALL |
146 | const char * gtk_stack_get_visible_child_name (GtkStack *stack); |
147 | GDK_AVAILABLE_IN_ALL |
148 | void gtk_stack_set_visible_child_full (GtkStack *stack, |
149 | const char *name, |
150 | GtkStackTransitionType transition); |
151 | GDK_AVAILABLE_IN_ALL |
152 | void gtk_stack_set_hhomogeneous (GtkStack *stack, |
153 | gboolean hhomogeneous); |
154 | GDK_AVAILABLE_IN_ALL |
155 | gboolean gtk_stack_get_hhomogeneous (GtkStack *stack); |
156 | GDK_AVAILABLE_IN_ALL |
157 | void gtk_stack_set_vhomogeneous (GtkStack *stack, |
158 | gboolean vhomogeneous); |
159 | GDK_AVAILABLE_IN_ALL |
160 | gboolean gtk_stack_get_vhomogeneous (GtkStack *stack); |
161 | GDK_AVAILABLE_IN_ALL |
162 | void gtk_stack_set_transition_duration (GtkStack *stack, |
163 | guint duration); |
164 | GDK_AVAILABLE_IN_ALL |
165 | guint gtk_stack_get_transition_duration (GtkStack *stack); |
166 | GDK_AVAILABLE_IN_ALL |
167 | void gtk_stack_set_transition_type (GtkStack *stack, |
168 | GtkStackTransitionType transition); |
169 | GDK_AVAILABLE_IN_ALL |
170 | GtkStackTransitionType gtk_stack_get_transition_type (GtkStack *stack); |
171 | GDK_AVAILABLE_IN_ALL |
172 | gboolean gtk_stack_get_transition_running (GtkStack *stack); |
173 | GDK_AVAILABLE_IN_ALL |
174 | void gtk_stack_set_interpolate_size (GtkStack *stack, |
175 | gboolean interpolate_size); |
176 | GDK_AVAILABLE_IN_ALL |
177 | gboolean gtk_stack_get_interpolate_size (GtkStack *stack); |
178 | |
179 | GDK_AVAILABLE_IN_ALL |
180 | GtkSelectionModel * gtk_stack_get_pages (GtkStack *stack); |
181 | |
182 | G_END_DECLS |
183 | |
184 | #endif |
185 | |