gtkaboutdialog.h 9.36 KB
Newer Older
Cody Russell's avatar
Cody Russell committed
1
/* GTK - The GIMP Toolkit
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

   Copyright (C) 2001 CodeFactory AB
   Copyright (C) 2001 Anders Carlsson <andersca@codefactory.se>
   Copyright (C) 2003, 2004 Matthias Clasen <mclasen@redhat.com>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
Javier Jardón's avatar
Javier Jardón committed
18
   License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 20 21 22

   Author: Anders Carlsson <andersca@codefactory.se>
*/

23 24 25
#ifndef __GTK_ABOUT_DIALOG_H__
#define __GTK_ABOUT_DIALOG_H__

26
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
27 28 29
#error "Only <gtk/gtk.h> can be included directly."
#endif

30 31 32 33 34 35 36 37 38 39 40 41 42
#include <gtk/gtkdialog.h>

G_BEGIN_DECLS

#define GTK_TYPE_ABOUT_DIALOG            (gtk_about_dialog_get_type ())
#define GTK_ABOUT_DIALOG(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ABOUT_DIALOG, GtkAboutDialog))
#define GTK_ABOUT_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ABOUT_DIALOG, GtkAboutDialogClass))
#define GTK_IS_ABOUT_DIALOG(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ABOUT_DIALOG))
#define GTK_IS_ABOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ABOUT_DIALOG))
#define GTK_ABOUT_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ABOUT_DIALOG, GtkAboutDialogClass))

typedef struct _GtkAboutDialog        GtkAboutDialog;
typedef struct _GtkAboutDialogClass   GtkAboutDialogClass;
43
typedef struct _GtkAboutDialogPrivate GtkAboutDialogPrivate;
44

45 46 47 48 49
/**
 * GtkLicense:
 * @GTK_LICENSE_UNKNOWN: No license specified
 * @GTK_LICENSE_CUSTOM: A license text is going to be specified by the
 *   developer
50 51 52 53
 * @GTK_LICENSE_GPL_2_0: The GNU General Public License, version 2.0 or later
 * @GTK_LICENSE_GPL_3_0: The GNU General Public License, version 3.0 or later
 * @GTK_LICENSE_LGPL_2_1: The GNU Lesser General Public License, version 2.1 or later
 * @GTK_LICENSE_LGPL_3_0: The GNU Lesser General Public License, version 3.0 or later
54 55 56
 * @GTK_LICENSE_BSD: The BSD standard license
 * @GTK_LICENSE_MIT_X11: The MIT/X11 standard license
 * @GTK_LICENSE_ARTISTIC: The Artistic License, version 2.0
57 58 59 60
 * @GTK_LICENSE_GPL_2_0_ONLY: The GNU General Public License, version 2.0 only. Since 3.12.
 * @GTK_LICENSE_GPL_3_0_ONLY: The GNU General Public License, version 3.0 only. Since 3.12.
 * @GTK_LICENSE_LGPL_2_1_ONLY: The GNU Lesser General Public License, version 2.1 only. Since 3.12.
 * @GTK_LICENSE_LGPL_3_0_ONLY: The GNU Lesser General Public License, version 3.0 only. Since 3.12.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
 *
 * The type of license for an application.
 *
 * This enumeration can be expanded at later date.
 *
 * Since: 3.0
 */
typedef enum {
  GTK_LICENSE_UNKNOWN,
  GTK_LICENSE_CUSTOM,

  GTK_LICENSE_GPL_2_0,
  GTK_LICENSE_GPL_3_0,

  GTK_LICENSE_LGPL_2_1,
  GTK_LICENSE_LGPL_3_0,

  GTK_LICENSE_BSD,
  GTK_LICENSE_MIT_X11,

81 82 83 84 85 86
  GTK_LICENSE_ARTISTIC,

  GTK_LICENSE_GPL_2_0_ONLY,
  GTK_LICENSE_GPL_3_0_ONLY,
  GTK_LICENSE_LGPL_2_1_ONLY,
  GTK_LICENSE_LGPL_3_0_ONLY
87 88
} GtkLicense;

89 90 91 92 93 94
/**
 * GtkAboutDialog:
 *
 * The <structname>GtkAboutDialog</structname> struct contains
 * only private fields and should not be directly accessed.
 */
95
struct _GtkAboutDialog
96 97 98 99
{
  GtkDialog parent_instance;

  /*< private >*/
100
  GtkAboutDialogPrivate *priv;
101 102
};

103
struct _GtkAboutDialogClass
104 105 106
{
  GtkDialogClass parent_class;

107 108 109
  gboolean (*activate_link) (GtkAboutDialog *dialog,
                             const gchar    *uri);

110 111 112 113 114 115 116
  /* Padding for future expansion */
  void (*_gtk_reserved1) (void);
  void (*_gtk_reserved2) (void);
  void (*_gtk_reserved3) (void);
  void (*_gtk_reserved4) (void);
};

117
GDK_AVAILABLE_IN_ALL
118
GType                  gtk_about_dialog_get_type               (void) G_GNUC_CONST;
119
GDK_AVAILABLE_IN_ALL
120
GtkWidget             *gtk_about_dialog_new                    (void);
121
GDK_AVAILABLE_IN_ALL
122
void                   gtk_show_about_dialog                   (GtkWindow       *parent,
123 124
                                                                const gchar     *first_property_name,
                                                                ...) G_GNUC_NULL_TERMINATED;
125
GDK_AVAILABLE_IN_ALL
126
const gchar *          gtk_about_dialog_get_program_name       (GtkAboutDialog  *about);
127
GDK_AVAILABLE_IN_ALL
128
void                   gtk_about_dialog_set_program_name       (GtkAboutDialog  *about,
129
                                                                const gchar     *name);
130
GDK_AVAILABLE_IN_ALL
131
const gchar *          gtk_about_dialog_get_version            (GtkAboutDialog  *about);
132
GDK_AVAILABLE_IN_ALL
133
void                   gtk_about_dialog_set_version            (GtkAboutDialog  *about,
134
                                                                const gchar     *version);
135
GDK_AVAILABLE_IN_ALL
136
const gchar *          gtk_about_dialog_get_copyright          (GtkAboutDialog  *about);
137
GDK_AVAILABLE_IN_ALL
138
void                   gtk_about_dialog_set_copyright          (GtkAboutDialog  *about,
139
                                                                const gchar     *copyright);
140
GDK_AVAILABLE_IN_ALL
141
const gchar *          gtk_about_dialog_get_comments           (GtkAboutDialog  *about);
142
GDK_AVAILABLE_IN_ALL
143
void                   gtk_about_dialog_set_comments           (GtkAboutDialog  *about,
144
                                                                const gchar     *comments);
145
GDK_AVAILABLE_IN_ALL
146
const gchar *          gtk_about_dialog_get_license            (GtkAboutDialog  *about);
147
GDK_AVAILABLE_IN_ALL
148
void                   gtk_about_dialog_set_license            (GtkAboutDialog  *about,
149
                                                                const gchar     *license);
150
GDK_AVAILABLE_IN_ALL
151 152
void                   gtk_about_dialog_set_license_type       (GtkAboutDialog  *about,
                                                                GtkLicense       license_type);
153
GDK_AVAILABLE_IN_ALL
154
GtkLicense             gtk_about_dialog_get_license_type       (GtkAboutDialog  *about);
155

156
GDK_AVAILABLE_IN_ALL
157
gboolean               gtk_about_dialog_get_wrap_license       (GtkAboutDialog  *about);
158
GDK_AVAILABLE_IN_ALL
159 160 161
void                   gtk_about_dialog_set_wrap_license       (GtkAboutDialog  *about,
                                                                gboolean         wrap_license);

162
GDK_AVAILABLE_IN_ALL
163
const gchar *          gtk_about_dialog_get_website            (GtkAboutDialog  *about);
164
GDK_AVAILABLE_IN_ALL
165
void                   gtk_about_dialog_set_website            (GtkAboutDialog  *about,
166
                                                                const gchar     *website);
167
GDK_AVAILABLE_IN_ALL
168
const gchar *          gtk_about_dialog_get_website_label      (GtkAboutDialog  *about);
169
GDK_AVAILABLE_IN_ALL
170
void                   gtk_about_dialog_set_website_label      (GtkAboutDialog  *about,
171
                                                                const gchar     *website_label);
172
GDK_AVAILABLE_IN_ALL
173
const gchar* const *   gtk_about_dialog_get_authors            (GtkAboutDialog  *about);
174
GDK_AVAILABLE_IN_ALL
175
void                   gtk_about_dialog_set_authors            (GtkAboutDialog  *about,
176
                                                                const gchar    **authors);
177
GDK_AVAILABLE_IN_ALL
178
const gchar* const *   gtk_about_dialog_get_documenters        (GtkAboutDialog  *about);
179
GDK_AVAILABLE_IN_ALL
180
void                   gtk_about_dialog_set_documenters        (GtkAboutDialog  *about,
181
                                                                const gchar    **documenters);
182
GDK_AVAILABLE_IN_ALL
183
const gchar* const *   gtk_about_dialog_get_artists            (GtkAboutDialog  *about);
184
GDK_AVAILABLE_IN_ALL
185
void                   gtk_about_dialog_set_artists            (GtkAboutDialog  *about,
186
                                                                const gchar    **artists);
187
GDK_AVAILABLE_IN_ALL
188
const gchar *          gtk_about_dialog_get_translator_credits (GtkAboutDialog  *about);
189
GDK_AVAILABLE_IN_ALL
190
void                   gtk_about_dialog_set_translator_credits (GtkAboutDialog  *about,
191
                                                                const gchar     *translator_credits);
192
GDK_AVAILABLE_IN_ALL
193
GdkPixbuf             *gtk_about_dialog_get_logo               (GtkAboutDialog  *about);
194
GDK_AVAILABLE_IN_ALL
195
void                   gtk_about_dialog_set_logo               (GtkAboutDialog  *about,
196
                                                                GdkPixbuf       *logo);
197
GDK_AVAILABLE_IN_ALL
198
const gchar *          gtk_about_dialog_get_logo_icon_name     (GtkAboutDialog  *about);
199
GDK_AVAILABLE_IN_ALL
200
void                   gtk_about_dialog_set_logo_icon_name     (GtkAboutDialog  *about,
201
                                                                const gchar     *icon_name);
202
GDK_AVAILABLE_IN_3_4
203 204 205
void                  gtk_about_dialog_add_credit_section      (GtkAboutDialog  *about,
                                                                const gchar     *section_name,
                                                                const gchar    **people);
206 207 208 209 210 211

G_END_DECLS

#endif /* __GTK_ABOUT_DIALOG_H__ */