alternative to assert
[gtkD.git] / gtkD / src / gtk / FileChooser.d
blob4ef6f1c4da3efff774dab1f24053dd971799e757
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkFileChooser.html
26 * outPack = gtk
27 * outFile = FileChooser
28 * strct = GtkFileChooser
29 * realStrct=
30 * ctorStrct=
31 * clss = FileChooser
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_file_chooser_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * - glib.Str
46 * - gtk.Window
47 * - glib.ListSG
48 * - gtk.Widget
49 * - gtk.FileFilter
50 * structWrap:
51 * - GSList* -> ListSG
52 * - GtkFileFilter* -> FileFilter
53 * - GtkWidget* -> Widget
54 * - GtkWindow* -> Window
55 * module aliases:
56 * local aliases:
59 module gtk.FileChooser;
61 version(noAssert)
63 version(Tango)
65 import tango.io.Stdout; // use the tango loging?
69 private import gtkc.gtktypes;
71 private import gtkc.gtk;
74 private import glib.Str;
75 private import gtk.Window;
76 private import glib.ListSG;
77 private import gtk.Widget;
78 private import gtk.FileFilter;
83 /**
84 * Description
85 * GtkFileChooser is an interface that can be implemented by file
86 * selection widgets. In GTK+, the main objects that implement this
87 * interface are GtkFileChooserWidget, GtkFileChooserDialog, and
88 * GtkFileChooserButton. You do not need to write an object that
89 * implements the GtkFileChooser interface unless you are trying to
90 * adapt an existing file selector to expose a standard programming
91 * interface.
92 * GtkFileChooser allows for shortcuts to various places in the filesystem.
93 * In the default implementation these are displayed in the left pane. It
94 * may be a bit confusing at first taht these shortcuts come from various
95 * sources and in various flavours, so lets explain the terminology here:
96 * Bookmarks
97 * are created by the user, by dragging folders from the
98 * right pane to the left pane, or by using the "Add". Bookmarks
99 * can be renamed and deleted by the user.
100 * Shortcuts
101 * can be provided by the application or by the underlying filesystem
102 * abstraction (e.g. both the gnome-vfs and the Windows filesystems
103 * provide "Desktop" shortcuts). Shortcuts cannot be modified by the
104 * user.
105 * Volumes
106 * are provided by the underlying filesystem abstraction. They are
107 * the "roots" of the filesystem.
108 * File Names and Encodings
109 * When the user is finished selecting files in a
110 * GtkFileChooser, your program can get the selected names
111 * either as filenames or as URIs. For URIs, the normal escaping
112 * rules are applied if the URI contains non-ASCII characters.
113 * However, filenames are always returned in
114 * the character set specified by the
115 * G_FILENAME_ENCODING environment variable.
116 * Please see the Glib documentation for more details about this
117 * variable.
118 * Important
119 * This means that while you can pass the result of
120 * gtk_file_chooser_get_filename() to
121 * open(2) or
122 * fopen(3), you may not be able to
123 * directly set it as the text of a GtkLabel widget unless you
124 * convert it first to UTF-8, which all GTK+ widgets expect.
125 * You should use g_filename_to_utf8() to convert filenames
126 * into strings that can be passed to GTK+ widgets.
127 * <hr>
128 * Adding a Preview Widget
129 * You can add a custom preview widget to a file chooser and then
130 * get notification about when the preview needs to be updated.
131 * To install a preview widget, use
132 * gtk_file_chooser_set_preview_widget(). Then, connect to the
133 * GtkFileChooser::update-preview signal to get notified when
134 * you need to update the contents of the preview.
135 * Your callback should use
136 * gtk_file_chooser_get_preview_filename() to see what needs
137 * previewing. Once you have generated the preview for the
138 * corresponding file, you must call
139 * gtk_file_chooser_set_preview_widget_active() with a boolean
140 * flag that indicates whether your callback could successfully
141 * generate a preview.
142 * Example2.Sample Usage
144 * GtkImage *preview;
145 * ...
146 * preview = gtk_image_new ();
147 * gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
148 * g_signal_connect (my_file_chooser, "update-preview",
149 * G_CALLBACK (update_preview_cb), preview);
151 * static void
152 * update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
154 * GtkWidget *preview;
155 * char *filename;
156 * GdkPixbuf *pixbuf;
157 * gboolean have_preview;
158 * preview = GTK_WIDGET (data);
159 * filename = gtk_file_chooser_get_preview_filename (file_chooser);
160 * pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
161 * have_preview = (pixbuf != NULL);
162 * g_free (filename);
163 * gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
164 * if (pixbuf)
165 * gobject_unref (pixbuf);
166 * gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
168 * <hr>
169 * Adding Extra Widgets
170 * You can add extra widgets to a file chooser to provide options
171 * that are not present in the default design. For example, you
172 * can add a toggle button to give the user the option to open a
173 * file in read-only mode. You can use
174 * gtk_file_chooser_set_extra_widget() to insert additional
175 * widgets in a file chooser.
176 * Example3.Sample Usage
178 * GtkWidget *toggle;
179 * ...
180 * toggle = gtk_check_button_new_with_label ("Open file read-only");
181 * gtk_widget_show (toggle);
182 * gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
184 * Note
185 * If you want to set more than one extra widget in the file
186 * chooser, you can a container such as a GtkVBox or a GtkTable
187 * and include your widgets in it. Then, set the container as
188 * the whole extra widget.
189 * <hr>
190 * Key Bindings
191 * Internally, GTK+ implements a file chooser's graphical user
192 * interface with the private
193 * GtkFileChooserDefaultClass. This
194 * widget has several key
195 * bindings and their associated signals. This section
196 * describes the available key binding signals.
197 * Example4.GtkFileChooser key binding example
198 * The default keys that activate the key-binding signals in
199 * GtkFileChooserDefaultClass are as
200 * follows:
201 * Signal name
202 * Default key combinations
203 * location-popup
204 * Control-L (empty path);
205 * / (path of "/")[a];
206 * ~ (path of "~")
207 * up-folder
208 * Alt-Up[b]
210 * Backspace
211 * down-folder
212 * Alt-Down
213 * home-folder
214 * Alt-Home
215 * desktop-folder
216 * Alt-D
217 * quick-bookmark
218 * Alt-1 through Alt-0
219 * [a]
220 * Both the individual / key and the
221 * numeric keypad's "divide" key are supported.
222 * [b]
223 * Both the individual Up key and the numeric
224 * keypad's Up key are supported.
225 * You can change these defaults to something else. For
226 * example, to add a Shift modifier to a few
227 * of the default bindings, you can include the following
228 * fragment in your .gtkrc-2.0 file:
229 * binding "my-own-gtkfilechooser-bindings" {
230 * bind "<Alt><Shift>Up" {
231 * "up-folder" ()
233 * bind "<Alt><Shift>Down" {
234 * "down-folder" ()
236 * bind "<Alt><Shift>Home" {
237 * "home-folder" ()
240 * class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
241 * The "GtkFileChooserDefault::location-popup" signal
242 * void user_function (GtkFileChooserDefault *chooser,
243 * const char *path,
244 * gpointer user_data);
245 * This is used to make the file chooser show a "Location"
246 * dialog which the user can use to manually type the name of
247 * the file he wishes to select. The
248 * path argument is a string that gets
249 * put in the text entry for the file name. By default this is bound to
250 * Control-L
251 * with a path string of "" (the empty
252 * string). It is also bound to / with a
253 * path string of "/"
254 * (a slash): this lets you type / and
255 * immediately type a path name. On Unix systems, this is bound to
256 * ~ (tilde) with a path string
257 * of "~" itself for access to home directories.
258 * chooser:
259 * the object which received the signal.
260 * path:
261 * default contents for the text entry for the file name
262 * user_data:
263 * user data set when the signal handler was connected.
264 * Tip
265 * You can create your own bindings for the
266 * location-popup signal with custom
267 * path strings, and have a crude form
268 * of easily-to-type bookmarks. For example, say you access
269 * the path /home/username/misc very
270 * frequently. You could then create an Alt-M
271 * shortcut by including the following in your
272 * .gtkrc-2.0:
273 * binding "misc-shortcut" {
274 * bind "<Alt>M" {
275 * "location-popup" ("/home/username/misc")
278 * class "GtkFileChooserDefault" binding "misc-shortcut"
279 * The "GtkFileChooserDefault::up-folder" signal
280 * void user_function (GtkFileChooserDefault *chooser,
281 * gpointer user_data);
282 * This is used to make the file chooser go to the parent of
283 * the current folder in the file hierarchy. By default this
284 * is bound to Backspace and
285 * Alt-Up
286 * (the Up key in the numeric keypad also works).
287 * chooser:
288 * the object which received the signal.
289 * user_data:
290 * user data set when the signal handler was connected.
291 * The "GtkFileChooserDefault::down-folder" signal
292 * void user_function (GtkFileChooserDefault *chooser,
293 * gpointer user_data);
294 * This is used to make the file chooser go to a child of the
295 * current folder in the file hierarchy. The subfolder that
296 * will be used is displayed in the path bar widget of the file
297 * chooser. For example, if the path bar is showing
298 * "/foo/bar/baz", then this will cause
299 * the file chooser to switch to the "baz" subfolder. By
300 * default this is bound to
301 * Alt-Down
302 * (the Down key in the numeric keypad also works).
303 * chooser:
304 * the object which received the signal.
305 * user_data:
306 * user data set when the signal handler was connected.
307 * The "GtkFileChooserDefault::home-folder" signal
308 * void user_function (GtkFileChooserDefault *chooser,
309 * gpointer user_data);
310 * This is used to make the file chooser show the user's home
311 * folder in the file list. By default this is bound to
312 * Alt-Home
313 * (the Home key in the numeric keypad also works).
314 * chooser:
315 * the object which received the signal.
316 * user_data:
317 * user data set when the signal handler was connected.
318 * The "GtkFileChooserDefault::desktop-folder" signal
319 * void user_function (GtkFileChooserDefault *chooser,
320 * gpointer user_data);
321 * This is used to make the file chooser show the user's Desktop
322 * folder in the file list. By default this is bound to
323 * Alt-D.
324 * chooser:
325 * the object which received the signal.
326 * user_data:
327 * user data set when the signal handler was connected.
328 * The "GtkFileChooserDefault::quick-bookmark" signal
329 * void user_function (GtkFileChooserDefault *chooser,
330 * gint bookmark_index,
331 * gpointer user_data);
332 * This is used to make the file chooser switch to the bookmark
333 * specified in the bookmark_index parameter.
334 * For example, if you have three bookmarks, you can pass 0, 1, 2 to
335 * this signal to switch to each of them, respectively. By default this is bound to
336 * Alt-1,
337 * Alt-2,
338 * etc. until
339 * Alt-0. Note
340 * that in the default binding,
341 * that Alt-1 is
342 * actually defined to switch to the bookmark at index 0, and so on
343 * successively;
344 * Alt-0 is
345 * defined to switch to the bookmark at index 10.
346 * chooser:
347 * the object which received the signal.
348 * bookmark_indes:
349 * index of the bookmark to switch to; the indices start at 0.
350 * user_data:
351 * user data set when the signal handler was connected.
353 public class FileChooser
356 /** the main Gtk struct */
357 protected GtkFileChooser* gtkFileChooser;
360 public GtkFileChooser* getFileChooserStruct()
362 return gtkFileChooser;
366 /** the main Gtk struct as a void* */
367 protected void* getStruct()
369 return cast(void*)gtkFileChooser;
373 * Sets our main struct and passes it to the parent class
375 public this (GtkFileChooser* gtkFileChooser)
377 version(noAssert)
379 if ( gtkFileChooser is null )
381 int zero = 0;
382 version(Tango)
384 Stdout("struct gtkFileChooser is null on constructor").newline;
386 else
388 printf("struct gtkFileChooser is null on constructor");
390 zero = zero / zero;
393 else
395 assert(gtkFileChooser !is null, "struct gtkFileChooser is null on constructor");
397 this.gtkFileChooser = gtkFileChooser;
403 // imports for the signal processing
404 private import gobject.Signals;
405 private import gtkc.gdktypes;
406 int[char[]] connectedSignals;
408 GtkFileChooserConfirmation delegate(FileChooser)[] onConfirmOverwriteListeners;
409 void addOnConfirmOverwrite(GtkFileChooserConfirmation delegate(FileChooser) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
411 if ( !("confirm-overwrite" in connectedSignals) )
413 Signals.connectData(
414 getStruct(),
415 "confirm-overwrite",
416 cast(GCallback)&callBackConfirmOverwrite,
417 cast(void*)this,
418 null,
419 connectFlags);
420 connectedSignals["confirm-overwrite"] = 1;
422 onConfirmOverwriteListeners ~= dlg;
424 extern(C) static void callBackConfirmOverwrite(GtkFileChooser* filechooserStruct, FileChooser fileChooser)
426 bool consumed = false;
428 foreach ( GtkFileChooserConfirmation delegate(FileChooser) dlg ; fileChooser.onConfirmOverwriteListeners )
430 dlg(fileChooser);
433 return consumed;
436 void delegate(FileChooser)[] onCurrentFolderChangedListeners;
437 void addOnCurrentFolderChanged(void delegate(FileChooser) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
439 if ( !("current-folder-changed" in connectedSignals) )
441 Signals.connectData(
442 getStruct(),
443 "current-folder-changed",
444 cast(GCallback)&callBackCurrentFolderChanged,
445 cast(void*)this,
446 null,
447 connectFlags);
448 connectedSignals["current-folder-changed"] = 1;
450 onCurrentFolderChangedListeners ~= dlg;
452 extern(C) static void callBackCurrentFolderChanged(GtkFileChooser* chooserStruct, FileChooser fileChooser)
454 bool consumed = false;
456 foreach ( void delegate(FileChooser) dlg ; fileChooser.onCurrentFolderChangedListeners )
458 dlg(fileChooser);
461 return consumed;
464 void delegate(FileChooser)[] onFileActivatedListeners;
465 void addOnFileActivated(void delegate(FileChooser) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
467 if ( !("file-activated" in connectedSignals) )
469 Signals.connectData(
470 getStruct(),
471 "file-activated",
472 cast(GCallback)&callBackFileActivated,
473 cast(void*)this,
474 null,
475 connectFlags);
476 connectedSignals["file-activated"] = 1;
478 onFileActivatedListeners ~= dlg;
480 extern(C) static void callBackFileActivated(GtkFileChooser* chooserStruct, FileChooser fileChooser)
482 bool consumed = false;
484 foreach ( void delegate(FileChooser) dlg ; fileChooser.onFileActivatedListeners )
486 dlg(fileChooser);
489 return consumed;
492 void delegate(FileChooser)[] onSelectionChangedListeners;
493 void addOnSelectionChanged(void delegate(FileChooser) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
495 if ( !("selection-changed" in connectedSignals) )
497 Signals.connectData(
498 getStruct(),
499 "selection-changed",
500 cast(GCallback)&callBackSelectionChanged,
501 cast(void*)this,
502 null,
503 connectFlags);
504 connectedSignals["selection-changed"] = 1;
506 onSelectionChangedListeners ~= dlg;
508 extern(C) static void callBackSelectionChanged(GtkFileChooser* chooserStruct, FileChooser fileChooser)
510 bool consumed = false;
512 foreach ( void delegate(FileChooser) dlg ; fileChooser.onSelectionChangedListeners )
514 dlg(fileChooser);
517 return consumed;
520 void delegate(FileChooser)[] onUpdatePreviewListeners;
521 void addOnUpdatePreview(void delegate(FileChooser) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
523 if ( !("update-preview" in connectedSignals) )
525 Signals.connectData(
526 getStruct(),
527 "update-preview",
528 cast(GCallback)&callBackUpdatePreview,
529 cast(void*)this,
530 null,
531 connectFlags);
532 connectedSignals["update-preview"] = 1;
534 onUpdatePreviewListeners ~= dlg;
536 extern(C) static void callBackUpdatePreview(GtkFileChooser* chooserStruct, FileChooser fileChooser)
538 bool consumed = false;
540 foreach ( void delegate(FileChooser) dlg ; fileChooser.onUpdatePreviewListeners )
542 dlg(fileChooser);
545 return consumed;
555 * Sets the type of operation that the chooser is performing; the
556 * user interface is adapted to suit the selected action. For example,
557 * an option to create a new folder might be shown if the action is
558 * GTK_FILE_CHOOSER_ACTION_SAVE but not if the action is
559 * GTK_FILE_CHOOSER_ACTION_OPEN.
560 * chooser:
561 * a GtkFileChooser
562 * action:
563 * the action that the file selector is performing
564 * Since 2.4
566 public void setAction(GtkFileChooserAction action)
568 // void gtk_file_chooser_set_action (GtkFileChooser *chooser, GtkFileChooserAction action);
569 gtk_file_chooser_set_action(gtkFileChooser, action);
573 * Gets the type of operation that the file chooser is performing; see
574 * gtk_file_chooser_set_action().
575 * chooser:
576 * a GtkFileChooser
577 * Returns:
578 * the action that the file selector is performing
579 * Since 2.4
581 public GtkFileChooserAction getAction()
583 // GtkFileChooserAction gtk_file_chooser_get_action (GtkFileChooser *chooser);
584 return gtk_file_chooser_get_action(gtkFileChooser);
588 * Sets whether only local files can be selected in the
589 * file selector. If local_only is TRUE (the default),
590 * then the selected file are files are guaranteed to be
591 * accessible through the operating systems native file
592 * file system and therefore the application only
593 * needs to worry about the filename functions in
594 * GtkFileChooser, like gtk_file_chooser_get_filename(),
595 * rather than the URI functions like
596 * gtk_file_chooser_get_uri(),
597 * chooser:
598 * a GtkFileChooser
599 * local_only:
600 * TRUE if only local files can be selected
601 * Since 2.4
603 public void setLocalOnly(int localOnly)
605 // void gtk_file_chooser_set_local_only (GtkFileChooser *chooser, gboolean local_only);
606 gtk_file_chooser_set_local_only(gtkFileChooser, localOnly);
610 * Gets whether only local files can be selected in the
611 * file selector. See gtk_file_chooser_set_local_only()
612 * chooser:
613 * a GtkFileChoosre
614 * Returns:
615 * TRUE if only local files can be selected.
616 * Since 2.4
618 public int getLocalOnly()
620 // gboolean gtk_file_chooser_get_local_only (GtkFileChooser *chooser);
621 return gtk_file_chooser_get_local_only(gtkFileChooser);
625 * Sets whether multiple files can be selected in the file selector. This is
626 * only relevant if the action is set to be GTK_FILE_CHOOSER_ACTION_OPEN or
627 * GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
628 * chooser:
629 * a GtkFileChooser
630 * select_multiple:
631 * TRUE if multiple files can be selected.
632 * Since 2.4
634 public void setSelectMultiple(int selectMultiple)
636 // void gtk_file_chooser_set_select_multiple (GtkFileChooser *chooser, gboolean select_multiple);
637 gtk_file_chooser_set_select_multiple(gtkFileChooser, selectMultiple);
641 * Gets whether multiple files can be selected in the file
642 * selector. See gtk_file_chooser_set_select_multiple().
643 * chooser:
644 * a GtkFileChooser
645 * Returns:
646 * TRUE if multiple files can be selected.
647 * Since 2.4
649 public int getSelectMultiple()
651 // gboolean gtk_file_chooser_get_select_multiple (GtkFileChooser *chooser);
652 return gtk_file_chooser_get_select_multiple(gtkFileChooser);
656 * Sets whether hidden files and folders are displayed in the file selector.
657 * chooser:
658 * a GtkFileChooser
659 * show_hidden:
660 * TRUE if hidden files and folders should be displayed.
661 * Since 2.6
663 public void setShowHidden(int showHidden)
665 // void gtk_file_chooser_set_show_hidden (GtkFileChooser *chooser, gboolean show_hidden);
666 gtk_file_chooser_set_show_hidden(gtkFileChooser, showHidden);
670 * Gets whether hidden files and folders are displayed in the file selector.
671 * See gtk_file_chooser_set_show_hidden().
672 * chooser:
673 * a GtkFileChooser
674 * Returns:
675 * TRUE if hidden files and folders are displayed.
676 * Since 2.6
678 public int getShowHidden()
680 // gboolean gtk_file_chooser_get_show_hidden (GtkFileChooser *chooser);
681 return gtk_file_chooser_get_show_hidden(gtkFileChooser);
685 * Sets whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE mode will present
686 * a confirmation dialog if the user types a file name that already exists. This
687 * is FALSE by default.
688 * Regardless of this setting, the chooser will emit the "confirm-overwrite"
689 * signal when appropriate.
690 * If all you need is the stock confirmation dialog, set this property to TRUE.
691 * You can override the way confirmation is done by actually handling the
692 * "confirm-overwrite" signal; please refer to its documentation for the
693 * details.
694 * chooser:
695 * a GtkFileChooser
696 * do_overwrite_confirmation:
697 * whether to confirm overwriting in save mode
698 * Since 2.8
700 public void setDoOverwriteConfirmation(int doOverwriteConfirmation)
702 // void gtk_file_chooser_set_do_overwrite_confirmation (GtkFileChooser *chooser, gboolean do_overwrite_confirmation);
703 gtk_file_chooser_set_do_overwrite_confirmation(gtkFileChooser, doOverwriteConfirmation);
707 * Queries whether a file chooser is set to confirm for overwriting when the user
708 * types a file name that already exists.
709 * chooser:
710 * a GtkFileChooser
711 * Returns:
712 * TRUE if the file chooser will present a confirmation dialog;
713 * FALSE otherwise.
714 * Since 2.8
716 public int getDoOverwriteConfirmation()
718 // gboolean gtk_file_chooser_get_do_overwrite_confirmation (GtkFileChooser *chooser);
719 return gtk_file_chooser_get_do_overwrite_confirmation(gtkFileChooser);
723 * Sets the current name in the file selector, as if entered
724 * by the user. Note that the name passed in here is a UTF-8
725 * string rather than a filename. This function is meant for
726 * such uses as a suggested name in a "Save As..." dialog.
727 * If you want to preselect a particular existing file, you should use
728 * gtk_file_chooser_set_filename() or gtk_file_chooser_set_uri() instead.
729 * Please see the documentation for those functions for an example of using
730 * gtk_file_chooser_set_current_name() as well.
731 * chooser:
732 * a GtkFileChooser
733 * name:
734 * the filename to use, as a UTF-8 string
735 * Since 2.4
737 public void setCurrentName(char[] name)
739 // void gtk_file_chooser_set_current_name (GtkFileChooser *chooser, const gchar *name);
740 gtk_file_chooser_set_current_name(gtkFileChooser, Str.toStringz(name));
744 * Gets the filename for the currently selected file in
745 * the file selector. If multiple files are selected,
746 * one of the filenames will be returned at random.
747 * If the file chooser is in folder mode, this function returns the selected
748 * folder.
749 * chooser:
750 * a GtkFileChooser
751 * Returns:
752 * The currently selected filename, or NULL
753 * if no file is selected, or the selected file can't
754 * be represented with a local filename. Free with g_free().
755 * Since 2.4
757 public char[] getFilename()
759 // gchar* gtk_file_chooser_get_filename (GtkFileChooser *chooser);
760 return Str.toString(gtk_file_chooser_get_filename(gtkFileChooser) );
764 * Sets filename as the current filename for the file chooser, by changing
765 * to the file's parent folder and actually selecting the file in list. If
766 * the chooser is in GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name
767 * will also appear in the dialog's file name entry.
768 * If the file name isn't in the current folder of chooser, then the current
769 * folder of chooser will be changed to the folder containing filename. This
770 * is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by
771 * gtk_file_chooser_select_filename().
772 * Note that the file must exist, or nothing will be done except
773 * for the directory change.
774 * If you are implementing a File/Save As... dialog, you
775 * should use this function if you already have a file name to which the user may save; for example,
776 * when the user opens an existing file and then does File/Save As...
777 * on it. If you don't have a file name already for example, if the user just created
778 * a new file and is saving it for the first time, do not call this function. Instead, use
779 * something similar to this:
780 * if (document_is_new)
782 * /+* the user just created a new document +/
783 * gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving);
784 * gtk_file_chooser_set_current_name (chooser, "Untitled document");
786 * else
788 * /+* the user edited an existing document +/
789 * gtk_file_chooser_set_filename (chooser, existing_filename);
791 * chooser:
792 * a GtkFileChooser
793 * filename:
794 * the filename to set as current
795 * Returns:
796 * TRUE if both the folder could be changed and the file was
797 * selected successfully, FALSE otherwise.
798 * Since 2.4
800 public int setFilename(char[] filename)
802 // gboolean gtk_file_chooser_set_filename (GtkFileChooser *chooser, const char *filename);
803 return gtk_file_chooser_set_filename(gtkFileChooser, Str.toStringz(filename));
807 * Selects a filename. If the file name isn't in the current
808 * folder of chooser, then the current folder of chooser will
809 * be changed to the folder containing filename.
810 * chooser:
811 * a GtkFileChooser
812 * filename:
813 * the filename to select
814 * Returns:
815 * TRUE if both the folder could be changed and the file was
816 * selected successfully, FALSE otherwise.
817 * Since 2.4
819 public int selectFilename(char[] filename)
821 // gboolean gtk_file_chooser_select_filename (GtkFileChooser *chooser, const char *filename);
822 return gtk_file_chooser_select_filename(gtkFileChooser, Str.toStringz(filename));
826 * Unselects a currently selected filename. If the filename
827 * is not in the current directory, does not exist, or
828 * is otherwise not currently selected, does nothing.
829 * chooser:
830 * a GtkFileChooser
831 * filename:
832 * the filename to unselect
833 * Since 2.4
835 public void unselectFilename(char[] filename)
837 // void gtk_file_chooser_unselect_filename (GtkFileChooser *chooser, const char *filename);
838 gtk_file_chooser_unselect_filename(gtkFileChooser, Str.toStringz(filename));
842 * Selects all the files in the current folder of a file chooser.
843 * chooser:
844 * a GtkFileChooser
845 * Since 2.4
847 public void selectAll()
849 // void gtk_file_chooser_select_all (GtkFileChooser *chooser);
850 gtk_file_chooser_select_all(gtkFileChooser);
854 * Unselects all the files in the current folder of a file chooser.
855 * chooser:
856 * a GtkFileChooser
857 * Since 2.4
859 public void unselectAll()
861 // void gtk_file_chooser_unselect_all (GtkFileChooser *chooser);
862 gtk_file_chooser_unselect_all(gtkFileChooser);
866 * Lists all the selected files and subfolders in the current folder of
867 * chooser. The returned names are full absolute paths. If files in the current
868 * folder cannot be represented as local filenames they will be ignored. (See
869 * gtk_file_chooser_get_uris())
870 * chooser:
871 * a GtkFileChooser
872 * Returns:
873 * a GSList containing the filenames of all selected
874 * files and subfolders in the current folder. Free the returned list
875 * with g_slist_free(), and the filenames with g_free().
876 * Since 2.4
878 public ListSG getFilenames()
880 // GSList* gtk_file_chooser_get_filenames (GtkFileChooser *chooser);
881 return new ListSG( gtk_file_chooser_get_filenames(gtkFileChooser) );
885 * Sets the current folder for chooser from a local filename.
886 * The user will be shown the full contents of the current folder,
887 * plus user interface elements for navigating to other folders.
888 * chooser:
889 * a GtkFileChooser
890 * filename:
891 * the full path of the new current folder
892 * Returns:
893 * TRUE if the folder could be changed successfully, FALSE
894 * otherwise.
895 * Since 2.4
897 public int setCurrentFolder(char[] filename)
899 // gboolean gtk_file_chooser_set_current_folder (GtkFileChooser *chooser, const gchar *filename);
900 return gtk_file_chooser_set_current_folder(gtkFileChooser, Str.toStringz(filename));
904 * Gets the current folder of chooser as a local filename.
905 * See gtk_file_chooser_set_current_folder().
906 * Note that this is the folder that the file chooser is currently displaying
907 * (e.g. "/home/username/Documents"), which is not the same
908 * as the currently-selected folder if the chooser is in
909 * GTK_FILE_CHOOSER_SELECT_FOLDER mode
910 * (e.g. "/home/username/Documents/selected-folder/". To get the
911 * currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
912 * usual way to get the selection.
913 * chooser:
914 * a GtkFileChooser
915 * Returns:
916 * the full path of the current folder, or NULL if the current
917 * path cannot be represented as a local filename. Free with g_free(). This
918 * function will also return NULL if the file chooser was unable to load the
919 * last folder that was requested from it; for example, as would be for calling
920 * gtk_file_chooser_set_current_folder() on a nonexistent folder.
921 * Since 2.4
923 public char[] getCurrentFolder()
925 // gchar* gtk_file_chooser_get_current_folder (GtkFileChooser *chooser);
926 return Str.toString(gtk_file_chooser_get_current_folder(gtkFileChooser) );
930 * Gets the URI for the currently selected file in
931 * the file selector. If multiple files are selected,
932 * one of the filenames will be returned at random.
933 * If the file chooser is in folder mode, this function returns the selected
934 * folder.
935 * chooser:
936 * a GtkFileChooser
937 * Returns:
938 * The currently selected URI, or NULL
939 * if no file is selected. Free with g_free()
940 * Since 2.4
942 public char[] getUri()
944 // gchar* gtk_file_chooser_get_uri (GtkFileChooser *chooser);
945 return Str.toString(gtk_file_chooser_get_uri(gtkFileChooser) );
949 * Sets the file referred to by uri as the current file for the file chooser,
950 * by changing to the URI's parent folder and actually selecting the URI in the
951 * list. If the chooser is GTK_FILE_CHOOSER_ACTION_SAVE mode, the URI's base
952 * name will also appear in the dialog's file name entry.
953 * If the URI isn't in the current folder of chooser, then the current folder
954 * of chooser will be changed to the folder containing uri. This is equivalent
955 * to a sequence of gtk_file_chooser_unselect_all() followed by
956 * gtk_file_chooser_select_uri().
957 * Note that the URI must exist, or nothing will be done except
958 * for the directory change.
959 * If you are implementing a File/Save As... dialog, you
960 * should use this function if you already have a file name to which the user may save; for example,
961 * when the user opens an existing file and then does File/Save As...
962 * on it. If you don't have a file name already for example, if the user just created
963 * a new file and is saving it for the first time, do not call this function. Instead, use
964 * something similar to this:
965 * if (document_is_new)
967 * /+* the user just created a new document +/
968 * gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving);
969 * gtk_file_chooser_set_current_name (chooser, "Untitled document");
971 * else
973 * /+* the user edited an existing document +/
974 * gtk_file_chooser_set_uri (chooser, existing_uri);
976 * chooser:
977 * a GtkFileChooser
978 * uri:
979 * the URI to set as current
980 * Returns:
981 * TRUE if both the folder could be changed and the URI was
982 * selected successfully, FALSE otherwise.
983 * Since 2.4
985 public int setUri(char[] uri)
987 // gboolean gtk_file_chooser_set_uri (GtkFileChooser *chooser, const char *uri);
988 return gtk_file_chooser_set_uri(gtkFileChooser, Str.toStringz(uri));
992 * Selects the file to by uri. If the URI doesn't refer to a
993 * file in the current folder of chooser, then the current folder of
994 * chooser will be changed to the folder containing filename.
995 * chooser:
996 * a GtkFileChooser
997 * uri:
998 * the URI to select
999 * Returns:
1000 * TRUE if both the folder could be changed and the URI was
1001 * selected successfully, FALSE otherwise.
1002 * Since 2.4
1004 public int selectUri(char[] uri)
1006 // gboolean gtk_file_chooser_select_uri (GtkFileChooser *chooser, const char *uri);
1007 return gtk_file_chooser_select_uri(gtkFileChooser, Str.toStringz(uri));
1011 * Unselects the file referred to by uri. If the file
1012 * is not in the current directory, does not exist, or
1013 * is otherwise not currently selected, does nothing.
1014 * chooser:
1015 * a GtkFileChooser
1016 * uri:
1017 * the URI to unselect
1018 * Since 2.4
1020 public void unselectUri(char[] uri)
1022 // void gtk_file_chooser_unselect_uri (GtkFileChooser *chooser, const char *uri);
1023 gtk_file_chooser_unselect_uri(gtkFileChooser, Str.toStringz(uri));
1027 * Lists all the selected files and subfolders in the current folder of
1028 * chooser. The returned names are full absolute URIs.
1029 * chooser:
1030 * a GtkFileChooser
1031 * Returns:
1032 * a GSList containing the URIs of all selected
1033 * files and subfolders in the current folder. Free the returned list
1034 * with g_slist_free(), and the filenames with g_free().
1035 * Since 2.4
1037 public ListSG getUris()
1039 // GSList* gtk_file_chooser_get_uris (GtkFileChooser *chooser);
1040 return new ListSG( gtk_file_chooser_get_uris(gtkFileChooser) );
1044 * Sets the current folder for chooser from an URI.
1045 * The user will be shown the full contents of the current folder,
1046 * plus user interface elements for navigating to other folders.
1047 * chooser:
1048 * a GtkFileChooser
1049 * uri:
1050 * the URI for the new current folder
1051 * Returns:
1052 * TRUE if the folder could be changed successfully, FALSE
1053 * otherwise.
1054 * Since 2.4
1056 public int setCurrentFolderUri(char[] uri)
1058 // gboolean gtk_file_chooser_set_current_folder_uri (GtkFileChooser *chooser, const gchar *uri);
1059 return gtk_file_chooser_set_current_folder_uri(gtkFileChooser, Str.toStringz(uri));
1063 * Gets the current folder of chooser as an URI.
1064 * See gtk_file_chooser_set_current_folder_uri().
1065 * Note that this is the folder that the file chooser is currently displaying
1066 * (e.g. "file:///home/username/Documents"), which is not the same
1067 * as the currently-selected folder if the chooser is in
1068 * GTK_FILE_CHOOSER_SELECT_FOLDER mode
1069 * (e.g. "file:///home/username/Documents/selected-folder/". To get the
1070 * currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
1071 * usual way to get the selection.
1072 * chooser:
1073 * a GtkFileChooser
1074 * Returns:
1075 * the URI for the current folder. Free with g_free(). This
1076 * function will also return NULL if the file chooser was unable to load the
1077 * last folder that was requested from it; for example, as would be for calling
1078 * gtk_file_chooser_set_current_folder_uri() on a nonexistent folder.
1079 * Since 2.4
1081 public char[] getCurrentFolderUri()
1083 // gchar* gtk_file_chooser_get_current_folder_uri (GtkFileChooser *chooser);
1084 return Str.toString(gtk_file_chooser_get_current_folder_uri(gtkFileChooser) );
1088 * Sets an application-supplied widget to use to display a custom preview
1089 * of the currently selected file. To implement a preview, after setting the
1090 * preview widget, you connect to the ::update-preview
1091 * signal, and call gtk_file_chooser_get_preview_filename() or
1092 * gtk_file_chooser_get_preview_uri() on each change. If you can
1093 * display a preview of the new file, update your widget and
1094 * set the preview active using gtk_file_chooser_set_preview_widget_active().
1095 * Otherwise, set the preview inactive.
1096 * When there is no application-supplied preview widget, or the
1097 * application-supplied preview widget is not active, the file chooser
1098 * may display an internally generated preview of the current file or
1099 * it may display no preview at all.
1100 * chooser:
1101 * a GtkFileChooser
1102 * preview_widget:
1103 * widget for displaying preview.
1104 * Since 2.4
1106 public void setPreviewWidget(Widget previewWidget)
1108 // void gtk_file_chooser_set_preview_widget (GtkFileChooser *chooser, GtkWidget *preview_widget);
1109 gtk_file_chooser_set_preview_widget(gtkFileChooser, (previewWidget is null) ? null : previewWidget.getWidgetStruct());
1113 * Gets the current preview widget; see
1114 * gtk_file_chooser_set_preview_widget().
1115 * chooser:
1116 * a GtkFileChooser
1117 * Returns:
1118 * the current preview widget, or NULL
1119 * Since 2.4
1121 public Widget getPreviewWidget()
1123 // GtkWidget* gtk_file_chooser_get_preview_widget (GtkFileChooser *chooser);
1124 return new Widget( gtk_file_chooser_get_preview_widget(gtkFileChooser) );
1128 * Sets whether the preview widget set by
1129 * gtk_file_chooser_set_preview_widget() should be shown for the
1130 * current filename. When active is set to false, the file chooser
1131 * may display an internally generated preview of the current file
1132 * or it may display no preview at all. See
1133 * gtk_file_chooser_set_preview_widget() for more details.
1134 * chooser:
1135 * a GtkFileChooser
1136 * active:
1137 * whether to display the user-specified preview widget
1138 * Since 2.4
1140 public void setPreviewWidgetActive(int active)
1142 // void gtk_file_chooser_set_preview_widget_active (GtkFileChooser *chooser, gboolean active);
1143 gtk_file_chooser_set_preview_widget_active(gtkFileChooser, active);
1147 * Gets whether the preview widget set by gtk_file_chooser_set_preview_widget()
1148 * should be shown for the current filename. See
1149 * gtk_file_chooser_set_preview_widget_active().
1150 * chooser:
1151 * a GtkFileChooser
1152 * Returns:
1153 * TRUE if the preview widget is active for the current filename.
1154 * Since 2.4
1156 public int getPreviewWidgetActive()
1158 // gboolean gtk_file_chooser_get_preview_widget_active (GtkFileChooser *chooser);
1159 return gtk_file_chooser_get_preview_widget_active(gtkFileChooser);
1163 * Sets whether the file chooser should display a stock label with the name of
1164 * the file that is being previewed; the default is TRUE. Applications that
1165 * want to draw the whole preview area themselves should set this to FALSE and
1166 * display the name themselves in their preview widget.
1167 * See also: gtk_file_chooser_set_preview_widget()
1168 * chooser:
1169 * a GtkFileChooser
1170 * use_label:
1171 * whether to display a stock label with the name of the previewed file
1172 * Since 2.4
1174 public void setUsePreviewLabel(int useLabel)
1176 // void gtk_file_chooser_set_use_preview_label (GtkFileChooser *chooser, gboolean use_label);
1177 gtk_file_chooser_set_use_preview_label(gtkFileChooser, useLabel);
1181 * Gets whether a stock label should be drawn with the name of the previewed
1182 * file. See gtk_file_chooser_set_use_preview_label().
1183 * chooser:
1184 * a GtkFileChooser
1185 * Returns:
1186 * TRUE if the file chooser is set to display a label with the
1187 * name of the previewed file, FALSE otherwise.
1189 public int getUsePreviewLabel()
1191 // gboolean gtk_file_chooser_get_use_preview_label (GtkFileChooser *chooser);
1192 return gtk_file_chooser_get_use_preview_label(gtkFileChooser);
1196 * Gets the filename that should be previewed in a custom preview
1197 * widget. See gtk_file_chooser_set_preview_widget().
1198 * chooser:
1199 * a GtkFileChooser
1200 * Returns:
1201 * the filename to preview, or NULL if no file
1202 * is selected, or if the selected file cannot be represented
1203 * as a local filename. Free with g_free()
1204 * Since 2.4
1206 public char[] getPreviewFilename()
1208 // char* gtk_file_chooser_get_preview_filename (GtkFileChooser *chooser);
1209 return Str.toString(gtk_file_chooser_get_preview_filename(gtkFileChooser) );
1213 * Gets the URI that should be previewed in a custom preview
1214 * widget. See gtk_file_chooser_set_preview_widget().
1215 * chooser:
1216 * a GtkFileChooser
1217 * Returns:
1218 * the URI for the file to preview, or NULL if no file is
1219 * selected. Free with g_free().
1220 * Since 2.4
1222 public char[] getPreviewUri()
1224 // char* gtk_file_chooser_get_preview_uri (GtkFileChooser *chooser);
1225 return Str.toString(gtk_file_chooser_get_preview_uri(gtkFileChooser) );
1229 * Sets an application-supplied widget to provide extra options to the user.
1230 * chooser:
1231 * a GtkFileChooser
1232 * extra_widget:
1233 * widget for extra options
1234 * Since 2.4
1236 public void setExtraWidget(Widget extraWidget)
1238 // void gtk_file_chooser_set_extra_widget (GtkFileChooser *chooser, GtkWidget *extra_widget);
1239 gtk_file_chooser_set_extra_widget(gtkFileChooser, (extraWidget is null) ? null : extraWidget.getWidgetStruct());
1243 * Gets the current preview widget; see
1244 * gtk_file_chooser_set_extra_widget().
1245 * chooser:
1246 * a GtkFileChooser
1247 * Returns:
1248 * the current extra widget, or NULL
1249 * Since 2.4
1251 public Widget getExtraWidget()
1253 // GtkWidget* gtk_file_chooser_get_extra_widget (GtkFileChooser *chooser);
1254 return new Widget( gtk_file_chooser_get_extra_widget(gtkFileChooser) );
1258 * Adds filter to the list of filters that the user can select between.
1259 * When a filter is selected, only files that are passed by that
1260 * filter are displayed.
1261 * Note that the chooser takes ownership of the filter, so you have to
1262 * ref and sink it if you want to keep a reference.
1263 * chooser:
1264 * a GtkFileChooser
1265 * filter:
1266 * a GtkFileFilter
1267 * Since 2.4
1269 public void addFilter(FileFilter filter)
1271 // void gtk_file_chooser_add_filter (GtkFileChooser *chooser, GtkFileFilter *filter);
1272 gtk_file_chooser_add_filter(gtkFileChooser, (filter is null) ? null : filter.getFileFilterStruct());
1276 * Removes filter from the list of filters that the user can select between.
1277 * chooser:
1278 * a GtkFileChooser
1279 * filter:
1280 * a GtkFileFilter
1281 * Since 2.4
1283 public void removeFilter(FileFilter filter)
1285 // void gtk_file_chooser_remove_filter (GtkFileChooser *chooser, GtkFileFilter *filter);
1286 gtk_file_chooser_remove_filter(gtkFileChooser, (filter is null) ? null : filter.getFileFilterStruct());
1290 * Lists the current set of user-selectable filters; see
1291 * gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().
1292 * chooser:
1293 * a GtkFileChooser
1294 * Returns:
1295 * a GSList containing the current set of
1296 * user selectable filters. The contents of the list are
1297 * owned by GTK+, but you must free the list itself with
1298 * g_slist_free() when you are done with it.
1299 * Since 2.4
1301 public ListSG listFilters()
1303 // GSList* gtk_file_chooser_list_filters (GtkFileChooser *chooser);
1304 return new ListSG( gtk_file_chooser_list_filters(gtkFileChooser) );
1308 * Sets the current filter; only the files that pass the
1309 * filter will be displayed. If the user-selectable list of filters
1310 * is non-empty, then the filter should be one of the filters
1311 * in that list. Setting the current filter when the list of
1312 * filters is empty is useful if you want to restrict the displayed
1313 * set of files without letting the user change it.
1314 * chooser:
1315 * a GtkFileChooser
1316 * filter:
1317 * a GtkFileFilter
1318 * Since 2.4
1320 public void setFilter(FileFilter filter)
1322 // void gtk_file_chooser_set_filter (GtkFileChooser *chooser, GtkFileFilter *filter);
1323 gtk_file_chooser_set_filter(gtkFileChooser, (filter is null) ? null : filter.getFileFilterStruct());
1327 * Gets the current filter; see gtk_file_chooser_set_filter().
1328 * chooser:
1329 * a GtkFileChooser
1330 * Returns:
1331 * the current filter, or NULL
1332 * Since 2.4
1334 public FileFilter getFilter()
1336 // GtkFileFilter* gtk_file_chooser_get_filter (GtkFileChooser *chooser);
1337 return new FileFilter( gtk_file_chooser_get_filter(gtkFileChooser) );
1341 * Adds a folder to be displayed with the shortcut folders in a file chooser.
1342 * Note that shortcut folders do not get saved, as they are provided by the
1343 * application. For example, you can use this to add a
1344 * "/usr/share/mydrawprogram/Clipart" folder to the volume list.
1345 * chooser:
1346 * a GtkFileChooser
1347 * folder:
1348 * filename of the folder to add
1349 * error:
1350 * location to store error, or NULL
1351 * Returns:
1352 * TRUE if the folder could be added successfully, FALSE
1353 * otherwise. In the latter case, the error will be set as appropriate.
1354 * Since 2.4
1356 public int addShortcutFolder(char[] folder, GError** error)
1358 // gboolean gtk_file_chooser_add_shortcut_folder (GtkFileChooser *chooser, const char *folder, GError **error);
1359 return gtk_file_chooser_add_shortcut_folder(gtkFileChooser, Str.toStringz(folder), error);
1363 * Removes a folder from a file chooser's list of shortcut folders.
1364 * chooser:
1365 * a GtkFileChooser
1366 * folder:
1367 * filename of the folder to remove
1368 * error:
1369 * location to store error, or NULL
1370 * Returns:
1371 * TRUE if the operation succeeds, FALSE otherwise.
1372 * In the latter case, the error will be set as appropriate.
1373 * See also: gtk_file_chooser_add_shortcut_folder()
1374 * Since 2.4
1376 public int removeShortcutFolder(char[] folder, GError** error)
1378 // gboolean gtk_file_chooser_remove_shortcut_folder (GtkFileChooser *chooser, const char *folder, GError **error);
1379 return gtk_file_chooser_remove_shortcut_folder(gtkFileChooser, Str.toStringz(folder), error);
1383 * Queries the list of shortcut folders in the file chooser, as set by
1384 * gtk_file_chooser_add_shortcut_folder().
1385 * chooser:
1386 * a GtkFileChooser
1387 * Returns:
1388 * A list of folder filenames, or NULL if there are no shortcut
1389 * folders. Free the returned list with g_slist_free(), and the filenames with
1390 * g_free().
1391 * Since 2.4
1393 public ListSG listShortcutFolders()
1395 // GSList* gtk_file_chooser_list_shortcut_folders (GtkFileChooser *chooser);
1396 return new ListSG( gtk_file_chooser_list_shortcut_folders(gtkFileChooser) );
1400 * Adds a folder URI to be displayed with the shortcut folders in a file
1401 * chooser. Note that shortcut folders do not get saved, as they are provided
1402 * by the application. For example, you can use this to add a
1403 * "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.
1404 * chooser:
1405 * a GtkFileChooser
1406 * uri:
1407 * URI of the folder to add
1408 * error:
1409 * location to store error, or NULL
1410 * Returns:
1411 * TRUE if the folder could be added successfully, FALSE
1412 * otherwise. In the latter case, the error will be set as appropriate.
1413 * Since 2.4
1415 public int addShortcutFolderUri(char[] uri, GError** error)
1417 // gboolean gtk_file_chooser_add_shortcut_folder_uri (GtkFileChooser *chooser, const char *uri, GError **error);
1418 return gtk_file_chooser_add_shortcut_folder_uri(gtkFileChooser, Str.toStringz(uri), error);
1422 * Removes a folder URI from a file chooser's list of shortcut folders.
1423 * chooser:
1424 * a GtkFileChooser
1425 * uri:
1426 * URI of the folder to remove
1427 * error:
1428 * location to store error, or NULL
1429 * Returns:
1430 * TRUE if the operation succeeds, FALSE otherwise.
1431 * In the latter case, the error will be set as appropriate.
1432 * See also: gtk_file_chooser_add_shortcut_folder_uri()
1433 * Since 2.4
1435 public int removeShortcutFolderUri(char[] uri, GError** error)
1437 // gboolean gtk_file_chooser_remove_shortcut_folder_uri (GtkFileChooser *chooser, const char *uri, GError **error);
1438 return gtk_file_chooser_remove_shortcut_folder_uri(gtkFileChooser, Str.toStringz(uri), error);
1442 * Queries the list of shortcut folders in the file chooser, as set by
1443 * gtk_file_chooser_add_shortcut_folder_uri().
1444 * chooser:
1445 * a GtkFileChooser
1446 * Returns:
1447 * A list of folder URIs, or NULL if there are no shortcut
1448 * folders. Free the returned list with g_slist_free(), and the URIs with
1449 * g_free().
1450 * Since 2.4
1451 * Property Details
1452 * The "action" property
1453 * "action" GtkFileChooserAction : Read / Write
1454 * The type of operation that the file selector is performing.
1455 * Default value: GTK_FILE_CHOOSER_ACTION_OPEN
1457 public ListSG listShortcutFolderUris()
1459 // GSList* gtk_file_chooser_list_shortcut_folder_uris (GtkFileChooser *chooser);
1460 return new ListSG( gtk_file_chooser_list_shortcut_folder_uris(gtkFileChooser) );