annotate src/ui_utildlg.h @ 968:065a129fd42b

Simplify things related to ViewFileInfoList * and ViewFileInfoIcon * type casting: - drop VFICON_INFO() and VFLIST_INFO() macros - rename VFLIST_INFO_POINTER() and VFICON_INFO_POINTER() to shorter VFLIST() and VFICON(). - replace all related occurrences by shorter expressions. For example: VFICON_INFO(vf, columns) becomes VFICON(vf)->columns VFLIST_INFO(vf, click_fd) becomes VFLIST(vf)->click_fd
author zas_
date Sun, 17 Aug 2008 09:30:45 +0000
parents 48c8e49b571c
children 1646720364cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
2 * (SLIK) SimpLIstic sKin functions
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 446
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13 #ifndef UI_UTILDLG_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #define UI_UTILDLG_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17 #define GENERIC_DIALOG(gd) ((GenericDialog *)gd)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 typedef struct _GenericDialog GenericDialog;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 struct _GenericDialog
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 GtkWidget *dialog; /* window */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 GtkWidget *vbox; /* place to add widgets */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 GtkWidget *hbox; /* button hbox */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 gint auto_close;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 void (*default_cb)(GenericDialog *, gpointer);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 void (*cancel_cb)(GenericDialog *, gpointer);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31 gpointer data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 /* private */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 GtkWidget *cancel_button;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37 typedef struct _FileDialog FileDialog;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 struct _FileDialog
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 GenericDialog gd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 GtkWidget *entry;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 gint type;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 gint multiple_files;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
47 FileData *source_fd;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 GList *source_list;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 gchar *dest_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 /* When parent is not NULL, the dialog is set as a transient of the window containing parent */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 GenericDialog *generic_dialog_new(const gchar *title,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 const gchar *wmclass, const gchar *wmsubclass,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 GtkWidget *parent, gint auto_close,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 void (*cancel_cb)(GenericDialog *, gpointer), gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 void generic_dialog_close(GenericDialog *gd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 GtkWidget *generic_dialog_add_button(GenericDialog *gd, const gchar *stock_id, const gchar *text,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62 void (*func_cb)(GenericDialog *, gpointer), gint is_default);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63 void generic_dialog_attach_default(GenericDialog *gd, GtkWidget *widget);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65 GtkWidget *generic_dialog_add_message(GenericDialog *gd, const gchar *icon_stock_id,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 const gchar *heading, const gchar *text);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 gint generic_dialog_get_alternative_button_order(GtkWidget *widget);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70 GenericDialog *warning_dialog(const gchar *heading, const gchar *text,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 const gchar *icon_stock_id, GtkWidget *parent);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73 FileDialog *file_dialog_new(const gchar *title,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 const gchar *wmclass, const gchar *wmsubclass,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 GtkWidget *parent,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76 void (*cancel_cb)(FileDialog *, gpointer), gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
77 void file_dialog_close(FileDialog *fd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 GtkWidget *file_dialog_add_button(FileDialog *fd, const gchar *stock_id, const gchar *text,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 void (*func_cb)(FileDialog *, gpointer), gint is_default);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82 /* default_path is default base directory, and is only used if no history
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83 * exists for history_key (HOME is used if default_path is NULL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
84 * path can be a full path or only a file name. If name only, appended to
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85 * the default_path or the last history (see default_path)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
86 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
87 void file_dialog_add_path_widgets(FileDialog *fd, const gchar *default_path, const gchar *path,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
88 const gchar *history_key, const gchar *filter, const gchar *filter_desc);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90 void file_dialog_add_filter(FileDialog *fd, const gchar *filter, const gchar *filter_desc, gint set);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
91 void file_dialog_clear_filter(FileDialog *fd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
92 void file_dialog_sync_history(FileDialog *fd, gint dir_only);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
93
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
94
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
95 #endif