-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathui-utildlg.h
102 lines (75 loc) · 3.22 KB
/
ui-utildlg.h
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
* Copyright (C) 2004 John Ellis
* Copyright (C) 2008 - 2016 The Geeqie Team
*
* Author: John Ellis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef UI_UTILDLG_H
#define UI_UTILDLG_H
#include <glib.h>
#include <gtk/gtk.h>
class FileData;
struct GenericDialog
{
GtkWidget *dialog; /**< window */
GtkWidget *vbox; /**< place to add widgets */
GtkWidget *hbox; /**< button hbox */
gboolean auto_close;
void (*default_cb)(GenericDialog *, gpointer);
void (*cancel_cb)(GenericDialog *, gpointer);
gpointer data;
GtkWidget *cancel_button; /**< private */
};
#define GENERIC_DIALOG(gd) ((GenericDialog *)gd)
struct FileDialog
{
GenericDialog gd;
GtkWidget *entry;
gint type;
FileData *source_fd;
GList *source_list;
gchar *dest_path;
};
GenericDialog *generic_dialog_new(const gchar *title,
const gchar *role,
GtkWidget *parent, gboolean auto_close,
void (*cancel_cb)(GenericDialog *, gpointer), gpointer data);
void generic_dialog_close(GenericDialog *gd);
GtkWidget *generic_dialog_add_button(GenericDialog *gd, const gchar *icon_name, const gchar *text,
void (*func_cb)(GenericDialog *, gpointer), gboolean is_default);
void generic_dialog_attach_default(GenericDialog *gd, GtkWidget *widget);
GtkWidget *generic_dialog_add_message(GenericDialog *gd, const gchar *icon_name,
const gchar *heading, const gchar *text, gboolean expand);
gboolean generic_dialog_get_alternative_button_order(GtkWidget *widget);
GenericDialog *warning_dialog(const gchar *heading, const gchar *text,
const gchar *icon_name, GtkWidget *parent);
FileDialog *file_dialog_new(const gchar *title,
const gchar *role,
GtkWidget *parent,
void (*cancel_cb)(FileDialog *, gpointer), gpointer data);
void file_dialog_close(FileDialog *fd);
GtkWidget *file_dialog_add_button(FileDialog *fd, const gchar *stock_id, const gchar *text,
void (*func_cb)(FileDialog *, gpointer), gboolean is_default);
void file_dialog_add_path_widgets(FileDialog *fd, const gchar *default_path, const gchar *path,
const gchar *history_key, const gchar *filter, const gchar *filter_desc);
void file_dialog_sync_history(FileDialog *fd, gboolean dir_only);
gboolean generic_dialog_find_window(const gchar *title, const gchar *role, GdkRectangle &rect);
void generic_dialog_windows_load_config(const gchar **attribute_names, const gchar **attribute_values);
void generic_dialog_windows_write_config(GString *outstr, gint indent);
void new_appimage_notification(GtkApplication *app);
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */