Mercurial > pidgin.yaz
comparison finch/libgnt/gntfilesel.h @ 21161:e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
through 365b126365cc18309aea7f8eef0e9b2a19e6bda8
And others.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 07 Nov 2007 14:07:52 +0000 |
parents | bddf964880cf |
children |
comparison
equal
deleted
inserted
replaced
21160:45e550db32ab | 21161:e119edfc0fb0 |
---|---|
96 }; | 96 }; |
97 | 97 |
98 G_BEGIN_DECLS | 98 G_BEGIN_DECLS |
99 | 99 |
100 /** | 100 /** |
101 * | 101 * @return GType for GntFileSel. |
102 * | |
103 * @return | |
104 */ | 102 */ |
105 GType gnt_file_sel_get_gtype(void); | 103 GType gnt_file_sel_get_gtype(void); |
106 | 104 |
107 /** | 105 /** |
108 * | 106 * Create a new file selector. |
109 * | 107 * |
110 * @return | 108 * @return The newly created file selector. |
111 */ | 109 */ |
112 GntWidget * gnt_file_sel_new(void); | 110 GntWidget * gnt_file_sel_new(void); |
113 | 111 |
114 /** | 112 /** |
115 * | 113 * Set the current location of the file selector. |
116 * @param sel | 114 * |
117 * @param path | 115 * @param sel The file selector. |
118 * | 116 * @param path The current path of the selector. |
119 * @return | 117 * |
118 * @return @c TRUE if the current location was successfully changed, @c FALSE otherwise. | |
120 */ | 119 */ |
121 gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path); | 120 gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path); |
122 | 121 |
123 /** | 122 /** |
124 * | 123 * Set wheter to only allow selecting directories. |
125 * @param sel | 124 * |
126 * @param dirs | 125 * @param sel The file selector. |
126 * @param dirs @c TRUE if only directories can be selected, @c FALSE if files | |
127 * can also be selected. | |
127 */ | 128 */ |
128 void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs); | 129 void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs); |
129 | 130 |
130 /** | 131 /** |
131 * | 132 * Check whether the file selector allows only selecting directories. |
132 * @param sel | 133 * |
133 * | 134 * @param sel The file selector. |
134 * @return | 135 * |
136 * @return @c TRUE if only directories can be selected. | |
135 */ | 137 */ |
136 gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel); | 138 gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel); |
137 | 139 |
138 /** | 140 /** |
139 * | 141 * Set whether a selected file must exist. |
140 * @param sel | 142 * |
141 * @param must | 143 * @param sel The file selector. |
144 * @param must @c TRUE if the selected file must exist. | |
142 */ | 145 */ |
143 void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must); | 146 void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must); |
144 | 147 |
145 /** | 148 /** |
146 * | 149 * Check whether the selector allows selecting non-existent files. |
147 * @param sel | 150 * |
148 * | 151 * @param sel The file selector. |
149 * @return | 152 * |
153 * @return @c TRUE if the selected file must exist, @c FALSE if a non-existent | |
154 * file can be selected. | |
150 */ | 155 */ |
151 gboolean gnt_file_sel_get_must_exist(GntFileSel *sel); | 156 gboolean gnt_file_sel_get_must_exist(GntFileSel *sel); |
152 | 157 |
153 /** | 158 /** |
154 * | 159 * Get the selected file in the selector. |
155 * @param sel | 160 * |
156 * | 161 * @param sel The file selector. |
157 * @return | 162 * |
163 * @return The path of the selected file. The caller should g_free the returned | |
164 * string. | |
158 */ | 165 */ |
159 char * gnt_file_sel_get_selected_file(GntFileSel *sel); | 166 char * gnt_file_sel_get_selected_file(GntFileSel *sel); |
160 | 167 |
161 /* The returned value should be free'd */ | 168 /** |
162 | 169 * Get the list of selected files in the selector. |
163 /** | 170 * |
164 * | 171 * @param sel The file selector. |
165 * @param sel | 172 * |
166 * | 173 * @return A list of paths for the selected files. The caller must g_free the |
167 * @return | 174 * contents of the list, and g_list_free the list. |
168 */ | 175 */ |
169 GList * gnt_file_sel_get_selected_multi_files(GntFileSel *sel); | 176 GList * gnt_file_sel_get_selected_multi_files(GntFileSel *sel); |
170 | 177 |
171 /** | 178 /** |
172 * | 179 * Allow selecting multiple files. |
173 * @param sel | 180 * |
174 * @param set | 181 * @param sel The file selector. |
182 * @param set @c TRUE if selecting multiple files should be allowed. | |
175 */ | 183 */ |
176 void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set); | 184 void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set); |
177 | 185 |
178 /** | 186 /** |
179 * | 187 * Set the suggested file to have selected at startup. |
180 * @param sel | 188 * |
181 * @param suggest | 189 * @param sel The file selector. |
190 * @param suggest The suggested filename. | |
182 */ | 191 */ |
183 void gnt_file_sel_set_suggested_filename(GntFileSel *sel, const char *suggest); | 192 void gnt_file_sel_set_suggested_filename(GntFileSel *sel, const char *suggest); |
184 | 193 |
185 /** | 194 /** |
186 * | 195 * Set custom functions to read the names of files. |
187 * @param sel | 196 * |
188 * @param path | 197 * @param sel The file selector. |
189 * @param files | 198 * @param read_fn The custom read function. |
190 * @param error) | |
191 */ | 199 */ |
192 void gnt_file_sel_set_read_fn(GntFileSel *sel, gboolean (*read_fn)(const char *path, GList **files, GError **error)); | 200 void gnt_file_sel_set_read_fn(GntFileSel *sel, gboolean (*read_fn)(const char *path, GList **files, GError **error)); |
193 | 201 |
194 /** | 202 /** |
195 * | 203 * Create a new GntFile. |
196 * @param name | 204 * |
197 * @param size | 205 * @param name The name of the file. |
198 * | 206 * @param size The size of the file. |
199 * @return | 207 * |
208 * @return The newly created GntFile. | |
200 */ | 209 */ |
201 GntFile* gnt_file_new(const char *name, unsigned long size); | 210 GntFile* gnt_file_new(const char *name, unsigned long size); |
202 | 211 |
203 /** | 212 /** |
204 * | 213 * Create a new GntFile for a directory. |
205 * @param name | 214 * |
206 * | 215 * @param name The name of the directory. |
207 * @return | 216 * |
217 * @return The newly created GntFile. | |
208 */ | 218 */ |
209 GntFile* gnt_file_new_dir(const char *name); | 219 GntFile* gnt_file_new_dir(const char *name); |
210 | 220 |
211 G_END_DECLS | 221 G_END_DECLS |
212 | 222 |