2004-12-07 00:55:26 +00:00
|
|
|
/*
|
|
|
|
* 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
|
2014-01-23 11:55:03 +00:00
|
|
|
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
2004-12-07 00:55:26 +00:00
|
|
|
*
|
|
|
|
* Authors: Glynn Foster <glynn.foster@sun.com>
|
|
|
|
* Lucas Rocha <lucasr@im.ufba.br>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OPTION_H
|
|
|
|
#define OPTION_H
|
|
|
|
|
|
|
|
#include "zenity.h"
|
2009-01-09 00:10:30 +00:00
|
|
|
#include <glib.h>
|
2004-12-07 00:55:26 +00:00
|
|
|
#include <langinfo.h>
|
|
|
|
#ifdef HAVE_LOCALE_H
|
|
|
|
#include <locale.h>
|
|
|
|
#endif
|
|
|
|
|
2022-05-12 01:34:29 +00:00
|
|
|
typedef enum {
|
|
|
|
MODE_ENTRY,
|
|
|
|
MODE_LIST,
|
|
|
|
MODE_TEXTINFO,
|
|
|
|
MODE_LAST
|
|
|
|
} ZenityDialogMode;
|
2004-12-07 00:55:26 +00:00
|
|
|
|
|
|
|
typedef enum {
|
2017-04-07 12:00:42 +00:00
|
|
|
ERROR_SYNTAX,
|
|
|
|
ERROR_SUPPORT,
|
|
|
|
ERROR_DIALOG,
|
|
|
|
ERROR_LAST
|
2004-12-07 00:55:26 +00:00
|
|
|
} ZenityError;
|
|
|
|
|
|
|
|
typedef struct {
|
2017-04-07 12:00:42 +00:00
|
|
|
ZenityDialogMode mode;
|
|
|
|
ZenityData *data;
|
2004-12-07 00:55:26 +00:00
|
|
|
|
2022-03-11 03:37:39 +00:00
|
|
|
ZenityEntryData *entry_data;
|
2022-05-12 01:34:29 +00:00
|
|
|
ZenityTextData *text_data;
|
2022-03-11 03:37:39 +00:00
|
|
|
ZenityTreeData *tree_data;
|
2004-12-07 00:55:26 +00:00
|
|
|
} ZenityParsingOptions;
|
|
|
|
|
2017-04-07 12:00:42 +00:00
|
|
|
void zenity_option_error (gchar *string, ZenityError error);
|
2004-12-07 00:55:26 +00:00
|
|
|
|
2017-04-07 12:00:42 +00:00
|
|
|
ZenityParsingOptions *zenity_option_parse (gint argc, gchar **argv);
|
2004-12-07 00:55:26 +00:00
|
|
|
|
2017-04-07 12:00:42 +00:00
|
|
|
void zenity_option_free (void);
|
2004-12-07 00:55:26 +00:00
|
|
|
|
|
|
|
#endif /* OPTION_H */
|