zenity/src/zenity.h

197 lines
4.6 KiB
C
Raw Normal View History

2003-01-03 13:26:04 +00:00
#ifndef ZENITY_H
#define ZENITY_H
#include <gtk/gtk.h>
G_BEGIN_DECLS
#ifdef ENABLE_NLS
#include <libintl.h>
2003-01-03 13:26:04 +00:00
#define _(String) dgettext(GETTEXT_PACKAGE,String)
#ifdef gettext_noop
#define N_(String) gettext_noop(String)
#else
#define N_(String) (String)
#endif
#else /* NLS is disabled */
#define _(String) (String)
#define N_(String) (String)
#define textdomain(String) (String)
#define gettext(String) (String)
#define dgettext(Domain,String) (String)
#define dcgettext(Domain,String,Type) (String)
#define bindtextdomain(Domain,Directory) (Domain)
#endif
typedef struct {
gchar *dialog_title;
gchar *window_icon;
gint width;
gint height;
gint exit_code;
gint timeout_delay;
2003-01-03 13:26:04 +00:00
} ZenityData;
typedef enum {
ZENITY_OK,
ZENITY_CANCEL,
ZENITY_ESC,
ZENITY_ERROR,
ZENITY_EXTRA,
ZENITY_TIMEOUT
} ZenityExitCode;
2003-01-03 13:26:04 +00:00
typedef struct {
gchar *dialog_text;
gint day;
gint month;
gint year;
gchar *date_format;
2003-01-03 13:26:04 +00:00
} ZenityCalendarData;
typedef enum {
ZENITY_MSG_WARNING,
ZENITY_MSG_QUESTION,
ZENITY_MSG_ERROR,
ZENITY_MSG_INFO
2003-01-03 13:26:04 +00:00
} MsgMode;
typedef struct {
gchar *dialog_text;
MsgMode mode;
gboolean no_wrap;
gchar *ok_label;
gchar *cancel_label;
2003-01-03 13:26:04 +00:00
} ZenityMsgData;
typedef struct {
gchar *dialog_text;
gint value;
gint min_value;
gint max_value;
gint step;
gboolean print_partial;
gboolean hide_value;
} ZenityScaleData;
2003-01-03 13:26:04 +00:00
typedef struct {
gchar *uri;
2003-06-09 18:57:01 +00:00
gboolean multi;
gboolean directory;
gboolean save;
gboolean confirm_overwrite;
gchar *separator;
gchar **filter;
2003-01-03 13:26:04 +00:00
} ZenityFileData;
typedef struct {
gchar *dialog_text;
gchar *entry_text;
gboolean hide_text;
const gchar **data;
2003-01-03 13:26:04 +00:00
} ZenityEntryData;
typedef struct {
gchar *dialog_text;
gchar *entry_text;
gboolean pulsate;
gboolean autoclose;
gboolean autokill;
gdouble percentage;
gboolean no_cancel;
2003-01-03 13:26:04 +00:00
} ZenityProgressData;
typedef struct {
gchar *uri;
gboolean editable;
gboolean no_wrap;
gchar *font;
GtkTextBuffer *buffer;
2003-01-03 13:26:04 +00:00
} ZenityTextData;
typedef struct {
gchar *dialog_text;
GSList *columns;
gboolean checkbox;
gboolean radiobox;
gboolean hide_header;
gchar *separator;
2005-06-27 03:13:37 +00:00
gboolean multi;
gboolean editable;
gchar *print_column;
2005-07-01 21:28:36 +00:00
gchar *hide_column;
const gchar **data;
2003-01-03 13:26:04 +00:00
} ZenityTreeData;
#ifdef HAVE_LIBNOTIFY
typedef struct {
gchar *notification_text;
gboolean listen;
} ZenityNotificationData;
#endif
typedef struct {
gchar *color;
gboolean show_palette;
} ZenityColorData;
typedef struct {
GSList *list;
GSList *list_widgets;
gchar *dialog_text;
gchar *separator;
gchar *date_format;
} ZenityFormsData;
typedef enum {
ZENITY_FORMS_ENTRY,
ZENITY_FORMS_PASSWORD,
ZENITY_FORMS_CALENDAR
} ZenityFormsType;
typedef struct {
gchar *option_value;
ZenityFormsType type;
GtkWidget *forms_widget;
} ZenityFormsValue;
2010-07-10 19:13:40 +00:00
typedef struct {
gboolean username;
gchar *password;
GtkWidget *entry_username;
GtkWidget *entry_password;
} ZenityPasswordData;
void zenity_calendar (ZenityData *data,
ZenityCalendarData *calendar_data);
void zenity_msg (ZenityData *data,
ZenityMsgData *msg_data);
void zenity_fileselection (ZenityData *data,
ZenityFileData *file_data);
void zenity_entry (ZenityData *data,
ZenityEntryData *entry_data);
void zenity_progress (ZenityData *data,
ZenityProgressData *progress_data);
void zenity_text (ZenityData *data,
ZenityTextData *text_data);
void zenity_tree (ZenityData *data,
ZenityTreeData *tree_data);
#ifdef HAVE_LIBNOTIFY
void zenity_notification (ZenityData *data,
ZenityNotificationData *notification_data);
#endif
void zenity_colorselection (ZenityData *data,
ZenityColorData *notification_data);
void zenity_scale (ZenityData *data,
ZenityScaleData *scale_data);
void zenity_about (ZenityData *data);
2003-01-03 13:26:04 +00:00
2010-07-10 19:13:40 +00:00
void zenity_password_dialog (ZenityData *data,
ZenityPasswordData *password_data);
void zenity_forms_dialog (ZenityData *data,
ZenityFormsData *forms_data);
2003-01-03 13:26:04 +00:00
G_END_DECLS
#endif /* ZENITY_H */