]> Pileus Git - ~andy/gtk/blob - gtk/gtkassistant.h
e59d7e94b0f8e93e1db74997ce28d42a88b3b480
[~andy/gtk] / gtk / gtkassistant.h
1 /* 
2  * GTK - The GIMP Toolkit
3  * Copyright (C) 1999  Red Hat, Inc.
4  * Copyright (C) 2002  Anders Carlsson <andersca@gnu.org>
5  * Copyright (C) 2003  Matthias Clasen <mclasen@redhat.com>
6  * Copyright (C) 2005  Carlos Garnacho Parro <carlosg@gnome.org>
7  *
8  * All rights reserved.
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the
22  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  */
25
26 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
27 #error "Only <gtk/gtk.h> can be included directly."
28 #endif
29
30 #ifndef __GTK_ASSISTANT_H__
31 #define __GTK_ASSISTANT_H__
32
33 #include <gtk/gtkwidget.h>
34 #include <gtk/gtkwindow.h>
35
36 G_BEGIN_DECLS
37
38 #define GTK_TYPE_ASSISTANT         (gtk_assistant_get_type ())
39 #define GTK_ASSISTANT(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_ASSISTANT, GtkAssistant))
40 #define GTK_ASSISTANT_CLASS(c)     (G_TYPE_CHECK_CLASS_CAST    ((c), GTK_TYPE_ASSISTANT, GtkAssistantClass))
41 #define GTK_IS_ASSISTANT(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_ASSISTANT))
42 #define GTK_IS_ASSISTANT_CLASS(c)  (G_TYPE_CHECK_CLASS_TYPE    ((c), GTK_TYPE_ASSISTANT))
43 #define GTK_ASSISTANT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS  ((o), GTK_TYPE_ASSISTANT, GtkAssistantClass))
44
45 typedef enum
46 {
47   GTK_ASSISTANT_PAGE_CONTENT,
48   GTK_ASSISTANT_PAGE_INTRO,
49   GTK_ASSISTANT_PAGE_CONFIRM,
50   GTK_ASSISTANT_PAGE_SUMMARY,
51   GTK_ASSISTANT_PAGE_PROGRESS
52 } GtkAssistantPageType;
53
54 typedef struct _GtkAssistant        GtkAssistant;
55 typedef struct _GtkAssistantPrivate GtkAssistantPrivate;
56 typedef struct _GtkAssistantClass   GtkAssistantClass;
57
58 struct _GtkAssistant
59 {
60   GtkWindow  parent;
61
62   GtkWidget *GSEAL (cancel);
63   GtkWidget *GSEAL (forward);
64   GtkWidget *GSEAL (back);
65   GtkWidget *GSEAL (apply);
66   GtkWidget *GSEAL (close);
67   GtkWidget *GSEAL (last);
68
69   /*< private >*/
70   GtkAssistantPrivate *GSEAL (priv);
71 };
72
73 struct _GtkAssistantClass
74 {
75   GtkWindowClass parent_class;
76
77   void (* prepare) (GtkAssistant *assistant, GtkWidget *page);
78   void (* apply)   (GtkAssistant *assistant);
79   void (* close)   (GtkAssistant *assistant);
80   void (* cancel)  (GtkAssistant *assistant);
81
82   /* Padding for future expansion */
83   void (*_gtk_reserved1) (void);
84   void (*_gtk_reserved2) (void);
85   void (*_gtk_reserved3) (void);
86   void (*_gtk_reserved4) (void);
87   void (*_gtk_reserved5) (void);
88 };
89
90 typedef gint (*GtkAssistantPageFunc) (gint current_page, gpointer data);
91
92 GType                 gtk_assistant_get_type              (void) G_GNUC_CONST;
93 GtkWidget            *gtk_assistant_new                   (void);
94 gint                  gtk_assistant_get_current_page      (GtkAssistant         *assistant);
95 void                  gtk_assistant_set_current_page      (GtkAssistant         *assistant,
96                                                            gint                  page_num);
97 gint                  gtk_assistant_get_n_pages           (GtkAssistant         *assistant);
98 GtkWidget            *gtk_assistant_get_nth_page          (GtkAssistant         *assistant,
99                                                            gint                  page_num);
100 gint                  gtk_assistant_prepend_page          (GtkAssistant         *assistant,
101                                                            GtkWidget            *page);
102 gint                  gtk_assistant_append_page           (GtkAssistant         *assistant,
103                                                            GtkWidget            *page);
104 gint                  gtk_assistant_insert_page           (GtkAssistant         *assistant,
105                                                            GtkWidget            *page,
106                                                            gint                  position);
107 void                  gtk_assistant_set_forward_page_func (GtkAssistant         *assistant,
108                                                            GtkAssistantPageFunc  page_func,
109                                                            gpointer              data,
110                                                            GDestroyNotify        destroy);
111 void                  gtk_assistant_set_page_type         (GtkAssistant         *assistant,
112                                                            GtkWidget            *page,
113                                                            GtkAssistantPageType  type);
114 GtkAssistantPageType  gtk_assistant_get_page_type         (GtkAssistant         *assistant,
115                                                            GtkWidget            *page);
116 void                  gtk_assistant_set_page_title        (GtkAssistant         *assistant,
117                                                            GtkWidget            *page,
118                                                            const gchar          *title);
119 G_CONST_RETURN gchar *gtk_assistant_get_page_title        (GtkAssistant         *assistant,
120                                                            GtkWidget            *page);
121 void                  gtk_assistant_set_page_header_image (GtkAssistant         *assistant,
122                                                            GtkWidget            *page,
123                                                            GdkPixbuf            *pixbuf);
124 GdkPixbuf            *gtk_assistant_get_page_header_image (GtkAssistant         *assistant,
125                                                            GtkWidget            *page);
126 void                  gtk_assistant_set_page_side_image   (GtkAssistant         *assistant,
127                                                            GtkWidget            *page,
128                                                            GdkPixbuf            *pixbuf);
129 GdkPixbuf            *gtk_assistant_get_page_side_image   (GtkAssistant         *assistant,
130                                                            GtkWidget            *page);
131 void                  gtk_assistant_set_page_complete     (GtkAssistant         *assistant,
132                                                            GtkWidget            *page,
133                                                            gboolean              complete);
134 gboolean              gtk_assistant_get_page_complete     (GtkAssistant         *assistant,
135                                                            GtkWidget            *page);
136 void                  gtk_assistant_add_action_widget     (GtkAssistant         *assistant,
137                                                            GtkWidget            *child);
138 void                  gtk_assistant_remove_action_widget  (GtkAssistant         *assistant,
139                                                            GtkWidget            *child);
140
141 void                  gtk_assistant_update_buttons_state  (GtkAssistant *assistant);
142
143 G_END_DECLS
144
145 #endif /* __GTK_ASSISTANT_H__ */