1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
/* vim: colorcolumn=80 ts=4 sw=t
*/
/*
* util.h
*
* Copyright © 2002 Sun Microsystems, Inc.
* © 1999, 2000 Red Hat Inc.
* © 1998 James Henstridge
* © 1995-2002 Free Software Foundation
* © 2021 Logan Rathbone
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* Original Authors of util.c (inferring they were the authors of
* this file as well):
*
* Glynn Foster <glynn.foster@sun.com>
* Havoc Pennington <hp@redhat.com>
* James Henstridge <james@daa.com.au>
* Tom Tromey <tromey@redhat.com>
*/
#ifndef UTIL_H
#define UTIL_H
#include "zenity.h"
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define ZENITY_UI_FILE_FULLPATH ZENITY_DATADIR "/zenity.ui"
#define ZENITY_UI_FILE_RELATIVEPATH "./zenity.ui"
#define ZENITY_IMAGE_FULLPATH(filename) (ZENITY_DATADIR "/" filename)
GtkBuilder *zenity_util_load_ui_file (const gchar *widget_root,
...) G_GNUC_NULL_TERMINATED;
gchar *zenity_util_strip_newline (gchar *string);
gboolean zenity_util_fill_file_buffer (GtkTextBuffer *buffer,
const gchar *filename);
const gchar *zenity_util_icon_name_from_filename (const gchar *filename);
void zenity_util_set_window_icon (GtkWidget *widget,
const gchar *filename, const gchar *default_file);
void zenity_util_set_window_icon_from_icon_name (GtkWidget *widget,
const gchar *filename, const gchar *default_icon_name);
void zenity_util_set_window_icon_from_file (GtkWidget *widget,
const gchar *filename);
void zenity_util_show_help (GError **error);
gint zenity_util_return_exit_code (ZenityExitCode value);
void zenity_util_exit_code_with_data (ZenityExitCode value, ZenityData *data);
void zenity_util_show_dialog (GtkWidget *widget);
gboolean zenity_util_timeout_handle (gpointer data);
int zenity_util_gapp_main (GtkWindow *window);
void zenity_util_gapp_quit (GtkWindow *window);
G_END_DECLS
#endif /* UTIL_H */
|