~ubuntu-branches/ubuntu/warty/zenity/warty

« back to all changes in this revision

Viewing changes to src/zenity.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2004-10-12 01:48:22 UTC
  • Revision ID: james.westby@ubuntu.com-20041012014822-89rmdkuj434ynu0n
Tags: upstream-2.8.1
ImportĀ upstreamĀ versionĀ 2.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef ZENITY_H
 
2
#define ZENITY_H
 
3
 
 
4
#include <gtk/gtk.h>
 
5
 
 
6
G_BEGIN_DECLS
 
7
 
 
8
#ifdef ENABLE_NLS
 
9
#include <libintl.h>
 
10
#define _(String) dgettext(GETTEXT_PACKAGE,String)
 
11
#ifdef gettext_noop
 
12
#define N_(String) gettext_noop(String)
 
13
#else
 
14
#define N_(String) (String)
 
15
#endif
 
16
#else /* NLS is disabled */
 
17
#define _(String) (String)
 
18
#define N_(String) (String)
 
19
#define textdomain(String) (String)
 
20
#define gettext(String) (String)
 
21
#define dgettext(Domain,String) (String)
 
22
#define dcgettext(Domain,String,Type) (String)
 
23
#define bindtextdomain(Domain,Directory) (Domain) 
 
24
#endif
 
25
 
 
26
typedef struct {
 
27
  gchar *dialog_title;
 
28
  gchar *window_icon;
 
29
  gint   width;
 
30
  gint   height;
 
31
  gint   exit_code;
 
32
} ZenityData;
 
33
 
 
34
typedef enum {
 
35
  ZENITY_OK,
 
36
  ZENITY_CANCEL,
 
37
  ZENITY_ESC,
 
38
  ZENITY_ERROR,
 
39
  ZENITY_EXTRA
 
40
} ZenityExitCode;
 
41
 
 
42
typedef struct {
 
43
  gchar *dialog_text;
 
44
  gint   day;
 
45
  gint   month;
 
46
  gint   year;
 
47
  gchar *date_format;
 
48
} ZenityCalendarData;
 
49
 
 
50
typedef enum {
 
51
  ZENITY_MSG_WARNING,
 
52
  ZENITY_MSG_QUESTION,
 
53
  ZENITY_MSG_ERROR,
 
54
  ZENITY_MSG_INFO
 
55
} MsgMode;
 
56
 
 
57
typedef struct {
 
58
  gchar *dialog_text;
 
59
  MsgMode  mode;
 
60
} ZenityMsgData;
 
61
 
 
62
typedef struct {
 
63
  gchar *uri;
 
64
  gboolean multi;
 
65
  gchar *separator;
 
66
} ZenityFileData;
 
67
 
 
68
typedef struct {
 
69
  gchar        *dialog_text;
 
70
  gchar        *entry_text;
 
71
  gboolean      visible;
 
72
} ZenityEntryData;
 
73
 
 
74
typedef struct {
 
75
  gchar        *dialog_text;
 
76
  gchar        *entry_text;
 
77
  gboolean      pulsate;
 
78
  gboolean      autoclose;
 
79
  gdouble       percentage;
 
80
} ZenityProgressData;
 
81
 
 
82
typedef struct {
 
83
  gchar         *uri;
 
84
  gboolean      editable;
 
85
  GtkTextBuffer *buffer;
 
86
} ZenityTextData;
 
87
 
 
88
typedef struct {
 
89
  gchar        *dialog_text;
 
90
  GSList       *columns;
 
91
  gboolean      checkbox;
 
92
  gboolean      radiobox;
 
93
  gchar        *separator;
 
94
  gboolean      editable;
 
95
  gchar        *print_column;
 
96
  const gchar **data;
 
97
} ZenityTreeData;
 
98
 
 
99
void    zenity_calendar         (ZenityData             *data,
 
100
                                ZenityCalendarData      *calendar_data);
 
101
void    zenity_msg              (ZenityData             *data,
 
102
                                 ZenityMsgData          *msg_data);
 
103
void    zenity_fileselection    (ZenityData             *data,
 
104
                                 ZenityFileData         *file_data);
 
105
void    zenity_entry            (ZenityData             *data,
 
106
                                 ZenityEntryData        *entry_data);
 
107
void    zenity_progress         (ZenityData             *data,
 
108
                                 ZenityProgressData     *progress_data);
 
109
void    zenity_text             (ZenityData             *data,
 
110
                                 ZenityTextData         *text_data);
 
111
void    zenity_tree             (ZenityData             *data,
 
112
                                 ZenityTreeData         *tree_data);
 
113
void    zenity_about            (ZenityData             *data);
 
114
 
 
115
G_END_DECLS
 
116
 
 
117
#endif /* ZENITY_H */