summaryrefslogtreecommitdiff
path: root/src/option.h
diff options
context:
space:
mode:
authorGlynn Foster <glynn.foster@sun.com>2004-12-07 00:55:26 +0000
committerGlynn Foster <gman@src.gnome.org>2004-12-07 00:55:26 +0000
commitf57c93017bdfbb8612004cd05c606ea4684ea907 (patch)
treee6ebd352cfb7bf8f250c5e76d94b830168c3cdaa /src/option.h
parentPatch from Lucas Rocha <lucasr@im.ufba.br> to use the GOption API for the (diff)
downloadzenity-f57c93017bdfbb8612004cd05c606ea4684ea907.tar.gz
zenity-f57c93017bdfbb8612004cd05c606ea4684ea907.tar.bz2
zenity-f57c93017bdfbb8612004cd05c606ea4684ea907.zip
Patch from Lucas Rocha <lucasr@im.ufba.br> to use the GOption API for the
2004-12-07 Glynn Foster <glynn.foster@sun.com> Patch from Lucas Rocha <lucasr@im.ufba.br> to use the GOption API for the zenity parsing options, with some spacing fixes from Glynn. * configure.in: zenity now requires glib-2.0 >= 2.5.3 to build because now it uses GOption. popt requirement removed. * src/Makefile.am: update for new files * src/main.c: use GOption API * src/option.c, src/option.h: New files to implement the new functionality. * src/zenity.h: Fix spacing.
Diffstat (limited to 'src/option.h')
-rw-r--r--src/option.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/option.h b/src/option.h
new file mode 100644
index 00000000..63b28243
--- /dev/null
+++ b/src/option.h
@@ -0,0 +1,81 @@
+/*
+ * option.h
+ *
+ * Copyright (C) 2002 Sun Microsystems, Inc.
+ *
+ * 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
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Glynn Foster <glynn.foster@sun.com>
+ * Lucas Rocha <lucasr@im.ufba.br>
+ */
+
+#ifndef OPTION_H
+#define OPTION_H
+
+#include "zenity.h"
+#include <glib/goption.h>
+#include <langinfo.h>
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
+typedef enum {
+ MODE_CALENDAR,
+ MODE_ENTRY,
+ MODE_ERROR,
+ MODE_FILE,
+ MODE_LIST,
+ MODE_PROGRESS,
+ MODE_QUESTION,
+ MODE_TEXTINFO,
+ MODE_WARNING,
+ MODE_INFO,
+ MODE_NOTIFICATION,
+ MODE_ABOUT,
+ MODE_VERSION,
+ MODE_LAST
+} ZenityDialogMode;
+
+typedef enum {
+ ERROR_SYNTAX,
+ ERROR_SUPPORT,
+ ERROR_DIALOG,
+ ERROR_LAST
+} ZenityError;
+
+typedef struct {
+ ZenityDialogMode mode;
+ ZenityData *data;
+
+ ZenityCalendarData *calendar_data;
+ ZenityMsgData *msg_data;
+ ZenityFileData *file_data;
+ ZenityEntryData *entry_data;
+ ZenityProgressData *progress_data;
+ ZenityTextData *text_data;
+ ZenityTreeData *tree_data;
+ ZenityNotificationData *notification_data;
+} ZenityParsingOptions;
+
+void zenity_option_error (gchar *string,
+ ZenityError error);
+
+ZenityParsingOptions * zenity_option_parse (gint argc,
+ gchar **argv);
+
+void zenity_option_free (void);
+
+#endif /* OPTION_H */
bgstack15