diff options
Diffstat (limited to 'src/zenity.h')
-rw-r--r-- | src/zenity.h | 141 |
1 files changed, 65 insertions, 76 deletions
diff --git a/src/zenity.h b/src/zenity.h index 404eec7..20cac9f 100644 --- a/src/zenity.h +++ b/src/zenity.h @@ -1,47 +1,44 @@ -#ifndef ZENITY_H -#define ZENITY_H +/* vim: colorcolumn=80 ts=4 sw=4 + */ +#pragma once -#include <gtk/gtk.h> +#include <adwaita.h> +#include <glib/gi18n.h> + +#include "zenity-enums.h" /* auto-generated by build system */ + +#include <config.h> G_BEGIN_DECLS -#include <libintl.h> -#define _(String) dgettext (GETTEXT_PACKAGE, String) -#ifdef gettext_noop -#define N_(String) gettext_noop (String) -#else -#define N_(String) (String) -#endif +typedef enum +{ + ZENITY_OK = -1, + ZENITY_CANCEL = -2, + ZENITY_ESC = -3, + ZENITY_ERROR = -4, + ZENITY_EXTRA = -5, + ZENITY_TIMEOUT = -6 +} ZenityExitCode; typedef struct { - gchar *dialog_title; - gchar *window_icon; - gchar *ok_label; - gchar *cancel_label; - gchar **extra_label; - gint width; - gint height; - gint exit_code; - gint timeout_delay; + char *dialog_title; + char *ok_label; + char *cancel_label; + char **extra_label; + int width; + int height; + int exit_code; + int timeout_delay; gboolean modal; - guintptr attach; } ZenityData; -typedef enum { - ZENITY_OK, - ZENITY_CANCEL, - ZENITY_ESC, - ZENITY_ERROR, - ZENITY_EXTRA, - ZENITY_TIMEOUT -} ZenityExitCode; - typedef struct { - gchar *dialog_text; - gint day; - gint month; - gint year; - gchar *date_format; + char *dialog_text; + int day; + int month; + int year; + char *date_format; } ZenityCalendarData; typedef enum { @@ -53,8 +50,8 @@ typedef enum { } MsgMode; typedef struct { - gchar *dialog_text; - gchar *dialog_icon; + char *dialog_text; + char *dialog_icon; MsgMode mode; gboolean no_wrap; gboolean no_markup; @@ -63,35 +60,34 @@ typedef struct { } ZenityMsgData; typedef struct { - gchar *dialog_text; - gint value; - gint min_value; - gint max_value; - gint step; + char *dialog_text; + int value; + int min_value; + int max_value; + int step; gboolean print_partial; gboolean hide_value; } ZenityScaleData; typedef struct { - gchar *uri; + char *uri; gboolean multi; gboolean directory; gboolean save; - gboolean confirm_overwrite; - gchar *separator; - gchar **filter; + char *separator; + char **filter; } ZenityFileData; typedef struct { - gchar *dialog_text; - gchar *entry_text; + char *dialog_text; + char *entry_text; gboolean hide_text; - const gchar **data; + const char **data; } ZenityEntryData; typedef struct { - gchar *dialog_text; - gchar *entry_text; + char *dialog_text; + char *entry_text; gboolean pulsate; gboolean autoclose; gboolean autokill; @@ -101,46 +97,44 @@ typedef struct { } ZenityProgressData; typedef struct { - gchar *uri; + char *uri; gboolean editable; gboolean no_wrap; gboolean auto_scroll; - gchar *font; + char *font; GtkTextBuffer *buffer; - gchar *checkbox; + char *checkbox; #ifdef HAVE_WEBKITGTK gboolean html; gboolean no_interaction; - gchar *url; + char *url; #endif } ZenityTextData; typedef struct { - gchar *dialog_text; + char *dialog_text; GSList *columns; gboolean checkbox; gboolean radiobox; gboolean hide_header; gboolean imagebox; - gchar *separator; + char *separator; gboolean multi; gboolean editable; gboolean mid_search; - gchar *print_column; - gchar *hide_column; - const gchar **data; + char *print_column; + char *hide_column; + const char **data; } ZenityTreeData; -#ifdef HAVE_LIBNOTIFY typedef struct { - gchar *notification_text; + char *notification_text; gboolean listen; - gchar **notification_hints; + char *icon; } ZenityNotificationData; -#endif typedef struct { - gchar *color; + char *color; gboolean show_palette; } ZenityColorData; @@ -150,10 +144,9 @@ typedef struct { GSList *list_values; GSList *column_values; GSList *combo_values; - gchar *dialog_text; - gchar *separator; - gchar *date_format; - // gchar *hide_column; + char *dialog_text; + char *separator; + char *date_format; gboolean show_header; } ZenityFormsData; @@ -166,14 +159,14 @@ typedef enum { } ZenityFormsType; typedef struct { - gchar *option_value; + char *option_value; ZenityFormsType type; GtkWidget *forms_widget; } ZenityFormsValue; typedef struct { gboolean username; - gchar *password; + char *password; GtkWidget *entry_username; GtkWidget *entry_password; } ZenityPasswordData; @@ -185,10 +178,8 @@ 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_notification (ZenityData *data, + ZenityNotificationData *notification_data); void zenity_colorselection ( ZenityData *data, ZenityColorData *notification_data); @@ -199,5 +190,3 @@ void zenity_password_dialog ( ZenityData *data, ZenityPasswordData *password_data); void zenity_forms_dialog (ZenityData *data, ZenityFormsData *forms_data); G_END_DECLS - -#endif /* ZENITY_H */ |