annotate finch/libgnt/gntfilesel.h @ 20964:f9e169ba967f

merge of '4c59953fd39724c7b48e897585df61dab901c4d2' and 'a998fcfd3ae58ca18d7fe6f439b7669e5a85de62'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 16 Oct 2007 06:28:54 +0000
parents 44b4e8bd759b
children 8d73d519155a ae330012956f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
1 /**
18303
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 17718
diff changeset
2 * @file gntfilesel.h File selector API
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 17718
diff changeset
3 * @ingroup gnt
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 17718
diff changeset
4 */
5c6f019e48f8 Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 17718
diff changeset
5 /*
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
6 * GNT - The GLib Ncurses Toolkit
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
7 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
8 * GNT is the legal property of its developers, whose names are too numerous
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
10 * source distribution.
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
11 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
12 * This library is free software; you can redistribute it and/or modify
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
13 * it under the terms of the GNU General Public License as published by
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
15 * (at your option) any later version.
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
16 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
17 * This program is distributed in the hope that it will be useful,
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
20 * GNU General Public License for more details.
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
21 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
22 * You should have received a copy of the GNU General Public License
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
23 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18303
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
25 */
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
26
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27 #ifndef GNT_FILE_SEL_H
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28 #define GNT_FILE_SEL_H
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30 #include "gntwindow.h"
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
31 #include "gnt.h"
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
32 #include "gntcolors.h"
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
33 #include "gntkeys.h"
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
34
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35 #define GNT_TYPE_FILE_SEL (gnt_file_sel_get_gtype())
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36 #define GNT_FILE_SEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_FILE_SEL, GntFileSel))
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 #define GNT_FILE_SEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_FILE_SEL, GntFileSelClass))
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38 #define GNT_IS_FILE_SEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_FILE_SEL))
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39 #define GNT_IS_FILE_SEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_FILE_SEL))
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
40 #define GNT_FILE_SEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_FILE_SEL, GntFileSelClass))
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
41
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42 #define GNT_FILE_SEL_FLAGS(obj) (GNT_FILE_SEL(obj)->priv.flags)
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
43 #define GNT_FILE_SEL_SET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) |= flags)
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
44 #define GNT_FILE_SEL_UNSET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) &= ~(flags))
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
45
15925
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
46 typedef struct _GntFileSel GntFileSel;
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
47 typedef struct _GntFileSelPriv GntFileSelPriv;
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
48 typedef struct _GntFileSelClass GntFileSelClass;
15988
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
49 typedef struct _GntFile GntFile;
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
50
15925
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
51 struct _GntFileSel
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
52 {
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
53 GntWindow parent;
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
54
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
55 GntWidget *dirs; /* list of files */
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
56 GntWidget *files; /* list of directories */
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
57 GntWidget *location; /* location entry */
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
58
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
59 GntWidget *select; /* select button */
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
60 GntWidget *cancel; /* cancel button */
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
61
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
62 char *current; /* Full path of the current location */
15939
0f1ab43db297 fix file saving
Richard Nelson <wabz@pidgin.im>
parents: 15929
diff changeset
63 char *suggest; /* Suggested filename */
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
64 /* XXX: someone should make these useful */
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
65 gboolean must_exist; /* Make sure the selected file (the name entered in 'location') exists */
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
66 gboolean dirsonly; /* Show only directories */
15925
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
67 gboolean multiselect;
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
68 GList *tags; /* List of tagged files when multiselect is set */
15988
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
69
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
70 gboolean (*read_fn)(const char *path, GList **files, GError **error);
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
71 };
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
72
15925
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
73 struct _GntFileSelClass
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
74 {
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
75 GntWindowClass parent;
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
76
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
77 void (*file_selected)(GntFileSel *sel, const char *path, const char *filename);
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
78 void (*gnt_reserved1)(void);
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
79 void (*gnt_reserved2)(void);
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
80 void (*gnt_reserved3)(void);
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
81 void (*gnt_reserved4)(void);
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
82 };
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
83
15988
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
84 typedef enum _GntFileType
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
85 {
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
86 GNT_FILE_REGULAR,
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
87 GNT_FILE_DIR
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
88 } GntFileType;
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
89
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
90 struct _GntFile
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
91 {
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
92 char *fullpath;
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
93 char *basename;
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
94 GntFileType type;
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
95 unsigned long size;
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
96 };
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
97
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
98 G_BEGIN_DECLS
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
99
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
100 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
101 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
102 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
103 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
104 */
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
105 GType gnt_file_sel_get_gtype(void);
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
106
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
107 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
108 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
109 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
110 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
111 */
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
112 GntWidget * gnt_file_sel_new(void);
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
113
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
114 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
115 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
116 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
117 * @param path
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
118 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
119 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
120 */
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
121 gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path);
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
122
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
123 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
124 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
125 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
126 * @param dirs
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
127 */
15849
3da9d5da9054 Directory only selection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15847
diff changeset
128 void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs);
3da9d5da9054 Directory only selection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15847
diff changeset
129
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
130 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
131 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
132 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
133 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
134 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
135 */
15849
3da9d5da9054 Directory only selection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15847
diff changeset
136 gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel);
3da9d5da9054 Directory only selection.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15847
diff changeset
137
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
138 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
139 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
140 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
141 * @param must
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
142 */
15850
65b45106bfbb Use the file selector for request-file.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15849
diff changeset
143 void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must);
65b45106bfbb Use the file selector for request-file.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15849
diff changeset
144
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
145 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
146 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
147 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
148 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
149 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
150 */
15850
65b45106bfbb Use the file selector for request-file.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15849
diff changeset
151 gboolean gnt_file_sel_get_must_exist(GntFileSel *sel);
65b45106bfbb Use the file selector for request-file.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15849
diff changeset
152
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
153 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
154 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
155 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
156 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
157 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
158 */
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
159 char * gnt_file_sel_get_selected_file(GntFileSel *sel);
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
160
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
161 /* The returned value should be free'd */
15850
65b45106bfbb Use the file selector for request-file.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15849
diff changeset
162
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
163 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
164 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
165 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
166 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
167 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
168 */
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
169 GList * gnt_file_sel_get_selected_multi_files(GntFileSel *sel);
15925
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
170
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
171 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
172 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
173 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
174 * @param set
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
175 */
15925
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
176 void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set);
f8c16848b76d Allow selecting multiple files from the file-select dialog.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15924
diff changeset
177
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
178 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
179 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
180 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
181 * @param suggest
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
182 */
15939
0f1ab43db297 fix file saving
Richard Nelson <wabz@pidgin.im>
parents: 15929
diff changeset
183 void gnt_file_sel_set_suggested_filename(GntFileSel *sel, const char *suggest);
0f1ab43db297 fix file saving
Richard Nelson <wabz@pidgin.im>
parents: 15929
diff changeset
184
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
185 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
186 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
187 * @param sel
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
188 * @param path
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
189 * @param files
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
190 * @param error)
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
191 */
15988
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
192 void gnt_file_sel_set_read_fn(GntFileSel *sel, gboolean (*read_fn)(const char *path, GList **files, GError **error));
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
193
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
194 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
195 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
196 * @param name
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
197 * @param size
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
198 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
199 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
200 */
15988
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
201 GntFile* gnt_file_new(const char *name, unsigned long size);
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
202
17718
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
203 /**
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
204 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
205 * @param name
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
206 *
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
207 * @return
8410511f4dbb applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents: 15988
diff changeset
208 */
15988
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
209 GntFile* gnt_file_new_dir(const char *name);
e05e5b148723 Allow using different methods for reading directory entries.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15939
diff changeset
210
15847
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
211 G_END_DECLS
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
212
a2ab257116ce File selector dialog. Still in an experimental state. When properly complete, this can be used for file/folder-request etc.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
213 #endif /* GNT_FILE_SEL_H */
15928
5b065c7ff5cd merge of '04076a446ca2bc48c37d00b8b255bc1311b6c51c'
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15851 15925
diff changeset
214