1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
139
  
140
  
141
  
142
  
143
  
144
  
145
  
146
  
147
  
148
  
149
  
150
  
151
  
152
  
153
  
154
  
155
  
156
  
157
  
158
  
159
  
160
  
161
  
162
  
163
  
164
  
165
  
166
  
167
  
168
  
169
  
170
  
171
  
172
  
173
  
174
  
175
  
176
  
177
  
178
  
179
  
180
  
181
  
182
  
183
  
184
  
185
  
186
  
187
  
188
  
189
  
190
  
191
  
192
  
193
  
194
  
195
  
196
  
197
  
198
  
199
  
200
  
201
  
202
  
203
  
204
  
205
  
206
  
207
  
208
  
209
  
210
  
211
  
212
  
213
  
214
  
215
  
216
  
217
  
218
  
219
  
220
  
221
  
222
  
223
  
224
  
225
  
226
  
227
  
228
  
229
  
230
  
231
  
232
  
233
  
234
  
235
  
236
  
237
  
238
  
239
  
240
  
241
  
242
  
243
  
244
  
245
  
246
  
247
  
248
  
249
  
250
  
251
  
252
  
253
  
254
  
255
  
256
  
257
  
258
  
259
  
260
  
261
  
262
  
263
  
264
  
265
  
266
  
267
  
268
  
269
  
270
  
271
  
272
  
273
  
274
  
275
  
276
  
277
  
278
  
279
  
280
  
281
  
282
  
283
  
284
  
285
  
286
  
287
  
288
  
289
  
290
  
291
  
292
  
293
  
294
  
295
  
296
  
297
  
298
  
299
  
300
  
301
  
302
  
303
  
304
  
305
  
306
  
307
  
308
  
309
  
310
  
311
  
312
  
313
  
314
  
315
  
316
  
317
  
318
  
319
  
320
  
321
  
322
  
323
  
324
  
325
  
326
  
327
  
328
  
329
  
330
  
331
  
332
  
333
  
334
  
335
  
336
  
337
  
338
  
339
  
340
  
341
  
342
  
343
  
344
  
345
  
346
  
347
  
348
  
349
  
350
  
351
  
352
  
353
  
354
  
355
  
356
  
357
  
358
  
359
  
360
  
361
  
362
  
363
  
364
  
365
  
366
  
367
  
368
  
369
  
370
  
371
  
372
  
373
  
374
  
375
  
376
  
377
  
378
  
379
  
380
  
381
  
382
  
383
  
384
  
385
  
386
  
387
  
388
  
389
  
390
  
391
  
392
  
393
  
394
  
395
  
396
  
397
  
398
  
399
  
400
  
401
  
402
  
403
  
404
  
405
  
406
  
407
  
408
  
409
  
410
  
411
  
412
  
413
  
414
  
415
  
416
  
417
  
418
  
419
  
420
  
421
  
422
  
423
  
424
  
425
  
426
  
427
  
428
  
429
  
430
  
431
  
432
  
433
  
434
  
435
  
436
  
437
  
438
  
439
  
440
  
441
  
442
  
443
  
444
  
445
  
446
  
447
  
448
  
449
  
450
  
451
  
452
  
453
  
454
  
455
  
456
  
457
  
458
  
459
  
460
  
461
  
462
  
463
  
464
  
465
  
466
  
467
  
468
  
469
  
470
  
471
  
472
  
473
  
474
  
475
  
476
  
477
  
478
  
479
  
480
  
481
  
482
  
483
  
484
  
485
  
486
  
487
  
488
  
489
  
490
  
491
  
492
  
493
  
494
  
495
  
496
  
497
  
498
  
499
  
500
  
501
  
502
  
503
  
504
  
505
  
506
  
507
  
508
  
509
  
510
  
511
  
512
  
513
  
514
  
515
  
516
  
517
  
518
  
519
  
520
  
521
  
522
  
523
  
524
  
525
  
526
  
527
  
528
  
529
  
530
  
531
  
532
  
533
  
534
  
535
  
536
  
537
  
538
  
539
  
540
  
541
  
542
  
543
  
544
  
545
  
546
  
547
  
548
  
549
  
550
  
551
  
552
  
553
  
554
  
555
  
556
  
557
  
558
  
559
  
560
  
561
  
562
  
563
  
564
  
565
  
566
  
567
  
568
  
569
  
570
  
571
  
572
  
573
  
574
  
575
  
576
  
577
  
578
  
579
  
580
  
581
  
582
  
583
  
584
  
585
  
586
  
587
  
588
  
589
  
590
  
591
  
592
  
593
  
594
  
595
  
596
  
597
  
598
  
599
  
600
  
601
  
602
  
603
  
604
  
605
  
606
  
607
  
608
  
609
  
610
  
611
  
612
  
613
  
614
  
615
  
616
  
617
  
618
  
619
  
620
  
621
  
622
  
623
  
624
  
625
  
626
  
627
  
628
  
629
  
630
  
631
  
632
  
633
  
634
  
635
  
636
  
637
  
638
  
639
  
640
  
641
  
642
  
643
  
644
  
645
  
646
  
647
  
648
  
649
  
650
  
651
  
652
  
653
  
654
  
655
  
656
  
657
  
658
  
659
  
660
  
661
  
662
  
663
  
664
  
665
  
//! Properties: 
//! int action 
//! GTK2.Widget extra-widget 
//! string file-system-backend 
//! GTK2.FileFilter filter 
//! int local-only 
//! GTk.Widget preview-widget 
//! int preview-widget-active 
//! int select-multiple 
//! int show-hidden 
//! int use-preview-label 
 
signal current_folder_changed; 
signal file_activated; 
signal selection_changed; 
signal update_preview; 
 
void set_action(int action) 
//! Sets type of action, from opening or saving a file, or  
//! opening or saving a folder. 
//! Options are: 
//!  CONST(GTK_FILE_CHOOSER_ACTION_OPEN) 
//!  CONST(GTK_FILE_CHOOSER_ACTION_SAVE) 
//!  CONST(GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) 
//!  CONST(GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) 
{ 
  pgtk_verify_inited(); 
  { 
    INT_TYPE action; 
    get_all_args("set_action",args,"%i",&action); 
    gtk_file_chooser_set_action(GTK_FILE_CHOOSER(THIS->obj),action); 
  } 
  RETURN_THIS(); 
} 
 
int get_action() 
//! Get the type of action the file chooser is performing. 
{ 
  pgtk_verify_inited(); 
  { 
    int res=gtk_file_chooser_get_action(GTK_FILE_CHOOSER(THIS->obj)); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
void set_local_only(int local_only) 
//! Sets whether on local files can be selected. 
{ 
  pgtk_verify_inited(); 
  { 
    INT_TYPE loc; 
    get_all_args("set_local_only",args,"%i",&loc); 
    gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(THIS->obj),loc); 
  } 
  RETURN_THIS(); 
} 
 
int get_local_only() 
//! Gets whether only local files can be selected in the file selector. 
{ 
  pgtk_verify_inited(); 
  { 
    int res=gtk_file_chooser_get_local_only(GTK_FILE_CHOOSER(THIS->obj)); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
void set_select_multiple(int select_multiple) 
//! Sets whether multiple files can be selected in the file selector. 
//! This is only relevant if the action is set to be 
//! CONST(GTK_FILE_CHOOSER_ACTION_OPEN) or 
//! CONST(GTK_FILE_CHOOSER_ACTION_SAVE) 
{ 
  pgtk_verify_inited(); 
  { 
    INT_TYPE sel; 
    get_all_args("set_select_multiple",args,"%i",&sel); 
    gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(THIS->obj),sel); 
  } 
  RETURN_THIS(); 
} 
 
int get_select_multiple() 
//! Gets whether multiple files can be selected. 
{ 
  pgtk_verify_inited(); 
  { 
    int res=gtk_file_chooser_get_select_multiple(GTK_FILE_CHOOSER(THIS->obj)); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
require gtk26; 
void set_show_hidden(int setting) 
//! Sets whether hidden files and folders are displayed. 
{ 
  pgtk_verify_inited(); 
  { 
    INT_TYPE set; 
    get_all_args("set_show_hidden",args,"%i",&set); 
    gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(THIS->obj),set); 
  } 
  RETURN_THIS(); 
} 
 
int get_show_hidden() 
//! Gets whether hidden files and folders are displayed. 
{ 
  pgtk_verify_inited(); 
  { 
    int res=gtk_file_chooser_get_show_hidden(GTK_FILE_CHOOSER(THIS->obj)); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
endrequire; 
 
require gtk28; 
void set_do_overwrite_confirmation(int setting); 
//! Sets whether a file chooser in GTK2.FILE_CHOOSER_ACTION_SAVE mode will 
//! present a confirmation dialog if the users types a file name that already 
//! exists.  This is FALSE by default. 
//! <p> 
//! Regardless of this setting, the chooser will emit the "confirm-overwrite" 
//! signal when appropriate. 
//! <p> 
//! If all you need is the stock confirmation dialog, set this property to TRUE. 
//! You can override the way confirmation is done by actually handling the 
//! "confirm-overwrite" signal. 
 
int get_do_overwrite_confirmation(); 
//! Queries whether a file chooser is set to confirm for overwriting when the 
//! user types a file name that already exists. 
endrequire; 
 
void set_current_name(string filename) 
//! Sets current name. 
{ 
  pgtk_verify_inited(); 
  { 
    char *s; 
    get_all_args("set_current_name",args,"%s",&s); 
    gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(THIS->obj),s); 
  } 
  RETURN_THIS(); 
} 
 
string get_filename() 
//! Gets the filename for the currently select file. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    gchar *file=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_GCHAR(file); 
    g_free(file); 
  } 
} 
 
int set_filename(string filename) 
//! Sets filename as the current filename. 
//! Same as unselect_all() followed by select_filename(); 
{ 
  pgtk_verify_inited(); 
  { 
    int res; 
    char *file; 
    get_all_args("set_filename",args,"%s",&file); 
    res=gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(THIS->obj),file); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
int select_filename(string filename) 
//! Selects a filename. 
{ 
  pgtk_verify_inited(); 
  { 
    int res; 
    char *file; 
    get_all_args("select_filename",args,"%s",&file); 
    res=gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(THIS->obj),file); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
void unselect_filename(string filename) 
//! Unselects a currently selected filename. 
{ 
  pgtk_verify_inited(); 
  { 
    char *file; 
    get_all_args("unselect_filename",args,"%s",&file); 
    gtk_file_chooser_unselect_filename(GTK_FILE_CHOOSER(THIS->obj),file); 
  } 
  RETURN_THIS(); 
} 
 
void select_all() 
//! Select all files. 
{ 
  pgtk_verify_inited(); 
  gtk_file_chooser_select_all(GTK_FILE_CHOOSER(THIS->obj)); 
  RETURN_THIS(); 
} 
 
void unselect_all() 
//! Unselect all files. 
{ 
  pgtk_verify_inited(); 
  gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(THIS->obj)); 
  RETURN_THIS(); 
} 
 
array(string) get_filenames() 
//! Get a list of all selected file and subfolders. 
//! The returned names are full absolute paths. 
//! If files in the current folder cannot be represented as local 
//! filenames, they will be ignored.  If you want those files, 
//! You may want to use get_uris() instead. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    GSList *gs1=gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(THIS->obj)); 
    GSList *gs2=gs1; 
    int i=0; 
    while (gs2) { 
      i++; 
      PGTK_PUSH_GCHAR(gs2->data); 
      g_free(gs2->data); 
      gs2=g_slist_next(gs2); 
    } 
    f_aggregate(i); 
    g_slist_free(gs1); 
  } 
} 
 
int set_current_folder(string folder) 
//! Sets the current folder from a local filename.  The user 
//! will be shown the full contents of the current folder, plus 
//! user interface elements for navigating to other folders. 
{ 
  pgtk_verify_inited(); 
  { 
    int res; 
    char *fold; 
    get_all_args("set_current_folder",args,"%s",&fold); 
    res=gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(THIS->obj),fold); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
string get_current_folder() 
//! Gets the current folder as a local filename. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    gchar *s; 
    s=gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_GCHAR(s); 
    g_free(s); 
  } 
} 
 
string get_uri() 
//! Gets the URI for the currently selected file. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    gchar *s; 
    s=gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_GCHAR(s); 
    g_free(s); 
  } 
} 
 
int set_uri(string uri) 
//! Sets the uri as the current file. 
{ 
  pgtk_verify_inited(); 
  { 
    int res; 
    char *uri; 
    get_all_args("set_uri",args,"%s",&uri); 
    res=gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(THIS->obj),uri); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
int select_uri(string uri) 
//! Selects the file by uri. 
{ 
  pgtk_verify_inited(); 
  { 
    int res; 
    char *uri; 
    get_all_args("select_uri",args,"%s",&uri); 
    res=gtk_file_chooser_select_uri(GTK_FILE_CHOOSER(THIS->obj),uri); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
void unselect_uri(string uri) 
//! Unselect the uri. 
{ 
  pgtk_verify_inited(); 
  { 
    char *uri; 
    get_all_args("unselect_uri",args,"%s",&uri); 
    gtk_file_chooser_unselect_uri(GTK_FILE_CHOOSER(THIS->obj),uri); 
  } 
  RETURN_THIS(); 
} 
 
array(string) get_uris() 
//! List all the selected files and subfolders in the current folder. 
//! The returned names are full absolute URIs. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    GSList *gs1=gtk_file_chooser_get_uris(GTK_FILE_CHOOSER(THIS->obj)); 
    GSList *gs2=gs1; 
    int i=0; 
    while (gs2) { 
      i++; 
      PGTK_PUSH_GCHAR(gs2->data); 
      g_free(gs2->data); 
      gs2=g_slist_next(gs2); 
    } 
    f_aggregate(i); 
    g_slist_free(gs1); 
  } 
} 
 
int set_current_folder_uri(string uri) 
//! Sets the current folder from a URI. 
{ 
  pgtk_verify_inited(); 
  { 
    int res; 
    char *uri; 
    get_all_args("set_current_folder_uri",args,"%s",&uri); 
    res=gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(THIS->obj),uri); 
    my_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
string get_current_folder_uri() 
//! Gets the current folder as a URI. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    gchar *s=gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_GCHAR(s); 
    g_free(s); 
  } 
} 
 
void set_extra_widget(GTK.Widget extra) 
//! Sets an application-supplied widget to provide extra 
//! options to the user. 
{ 
  pgtk_verify_inited(); 
  { 
    struct object *o1; 
    get_all_args("set_extra_widget",args,"%o",&o1); 
    gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(THIS->obj), 
                        GTK_WIDGET(get_gobject(o1))); 
  } 
  RETURN_THIS(); 
} 
 
void set_preview_widget(GTK2.Widget widget) 
//! Sets an application-supplied widget to use to display a custom preview of 
//! the currently selected file.  To implement a preview, after setting the 
//! preview widget, you connect to the "update-preview" signal, and call 
//! get_preview_filename() or get_preview_uri() on each change.  If you can 
//! display a preview of the new file, update your widget and set the preview 
//! active using set_preview_widget_active().  Otherwise, set the preview 
//! inactive. 
//! <p> 
//! When there is no application-supplied preview widget, or the application- 
//! supplied preview widget is not active, the file chooser may display an 
//! internally generated preview of the current file or it may display no 
//! preview at all. 
{ 
  pgtk_verify_inited(); 
  { 
    struct object *o1; 
    get_all_args("set_preview_widget",args,"%o",&o1); 
    gtk_file_chooser_set_preview_widget(GTK_FILE_CHOOSER(THIS->obj), 
                        GTK_WIDGET(get_gobject(o1))); 
  } 
  RETURN_THIS(); 
} 
 
GTK2.Widget get_preview_widget() 
//! Gets the current preview widget. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    GtkWidget *widget; 
    widget=gtk_file_chooser_get_preview_widget(GTK_FILE_CHOOSER(THIS->obj)); 
    push_gobject(widget); 
  } 
} 
 
void set_preview_widget_active(int setting) 
//! Sets whether the preview widget set by set_preview_widget() should be shown 
//! for the current filename.  When setting is set to false, the file chooser 
//! may display an internally generated preview of the current file or it may 
//! display no preview at all. 
{ 
  pgtk_verify_inited(); 
  { 
    INT_TYPE set; 
    get_all_args("set_preview_widget_active",args,"%i",&set); 
    gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(THIS->obj),set); 
  } 
  RETURN_THIS(); 
} 
 
int get_preview_widget_active() 
//! Gets whether the preview widget set by set_preview_widget_active() should 
//! be shown for the current filename. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    int res=gtk_file_chooser_get_preview_widget_active( 
                        GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
void set_use_preview_label(int setting) 
//! Sets whether the file chooser should display a stock label with the name 
//! of the file that is being previewed; the default is true.  Applications 
//! that want to draw the whole preview area themselves should set this to 
//! false and display the name themselves in their preview widget. 
{ 
  pgtk_verify_inited(); 
  { 
    INT_TYPE set; 
    get_all_args("set_use_preview_label",args,"%i",&set); 
    gtk_file_chooser_set_use_preview_label(GTK_FILE_CHOOSER(THIS->obj),set); 
  } 
  RETURN_THIS(); 
} 
 
int get_use_preview_label() 
//! Gets whether a stock label should be drawn with the name of the previewed 
//! file. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    int res=gtk_file_chooser_get_use_preview_label(GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
string get_preview_filename() 
//! Gets the filename that should be previewed in a custom preview widget. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    char *file=gtk_file_chooser_get_preview_filename(GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_GCHAR(file); 
    g_free(file); 
  } 
} 
 
string get_preview_uri() 
//! Gets the URI that should be previewed in a custom preview widget. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    char *uri=gtk_file_chooser_get_preview_uri(GTK_FILE_CHOOSER(THIS->obj)); 
    PGTK_PUSH_GCHAR(uri); 
    g_free(uri); 
  } 
} 
 
void set_extra_widget(GTK2.Widget widget) 
//! Sets an application-supplied widget to provide extra options to the user. 
{ 
  pgtk_verify_inited(); 
  { 
    struct object *o1; 
    get_all_args("set_extra_widget",args,"%o",&o1); 
    gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(THIS->obj), 
                        GTK_WIDGET(get_gobject(o1))); 
  } 
  RETURN_THIS(); 
} 
 
GTK2.Widget get_extra_widget() 
//! Gets the extra widget. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    GtkWidget *widget=gtk_file_chooser_get_extra_widget(GTK_FILE_CHOOSER(THIS->obj)); 
    push_gobject(widget); 
  } 
} 
 
/* TODO: *shortcut_folder* *filter* */ 
/* 
void add_filter(GTK2.FileFilter filter); 
//! Adds filter to the list of filters that the user can select between.  When 
//! a filter is selected, only files that are passed by that filter are 
//! displayed. 
 
void remove_filter(GTK2.FileFilter filter); 
//! Removes filter from the list of filters that the user can select between. 
 
array(GTK2.FileFilter) list_filters() 
//! Lists the current set of user-selectable filters. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    GSList *gsl,*gs2; 
    int i=0; 
    gsl=gs2=gtk_file_chooser_list_filters(GTK_FILE_CHOOSER(THIS->obj)); 
    while (gs2) { 
      push_gobject(gs2->data); 
      i++; 
      gs2=g_slist_next(gs2); 
    } 
    f_aggregate(i); 
    g_slist_free(gsl); 
  } 
} 
 
void set_filter(GTK2.FileFilter filter); 
//! Sets the current filter; only the files that pass the filter will be 
//! displayed.  If the user-selectable list of filters is non-empty, then the 
//! filter should be one of the filters in that list.  Setting the current 
//! filter when the list of filters is empty is useful if you want to restrict 
//! the displayed set of files without letting the user change it. 
 
GTK2.FileFilter get_filter(); 
//! Gets the current filter. 
*/ 
 
int add_shortcut_folder(string folder) 
//! Adds a folder to be displayed with the shortcut folders in a file chooser. 
//! Note that shortcut folders do not get saved, as they are provided by the 
//! application.  For example, you can use this to add a  
//! "/usr/share/mydrawprogram/Clipart" folder to the volume list. 
{ 
  pgtk_verify_inited(); 
  { 
    const char *folder; 
    int res; 
    get_all_args("add_shortcut_folder",args,"%s",&folder); 
    res=gtk_file_chooser_add_shortcut_folder(GTK_FILE_CHOOSER(THIS->obj), 
                        folder,NULL); 
    my_pop_n_elems(args); 
    push_int(res); 
  } 
} 
 
void remove_shortcut_folder(string folder) 
//! Removes a folder from the list of shortcut folders. 
{ 
  pgtk_verify_inited(); 
  { 
    const char *folder; 
    get_all_args("remove_shortcut_folder",args,"%s",&folder); 
    gtk_file_chooser_remove_shortcut_folder(GTK_FILE_CHOOSER(THIS->obj), 
                        folder,NULL); 
  } 
  RETURN_THIS(); 
} 
 
array(string) list_shortcut_folders() 
//! Queries the list of shortcut folders. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    GSList *gsl,*gs2; 
    int i=0; 
    gsl=gs2=gtk_file_chooser_list_shortcut_folders(GTK_FILE_CHOOSER(THIS->obj)); 
    while (gs2) { 
      PGTK_PUSH_GCHAR(gs2->data); 
      i++; 
      g_free(gs2->data); 
      gs2=g_slist_next(gs2); 
    } 
    f_aggregate(i); 
    g_slist_free(gsl); 
  } 
} 
 
int add_shortcut_folder_uri(string uri) 
//! Adds a folder URI to be displayed with the shortcut folders. 
{ 
  pgtk_verify_inited(); 
  { 
    const char *uri; 
    int res; 
    get_all_args("add_shortcut_folder_uri",args,"%s",&uri); 
    res=gtk_file_chooser_add_shortcut_folder_uri(GTK_FILE_CHOOSER(THIS->obj), 
                        uri,NULL); 
    my_pop_n_elems(args); 
    push_int(res); 
  } 
} 
 
void remove_shortcut_folder_uri(string uri) 
//! Removes a folder URI. 
{ 
  pgtk_verify_inited(); 
  { 
    const char *uri; 
    get_all_args("remove_shortcut_folder_uri",args,"%s",&uri); 
    gtk_file_chooser_remove_shortcut_folder_uri(GTK_FILE_CHOOSER(THIS->obj), 
                        uri,NULL); 
  } 
  RETURN_THIS(); 
} 
 
array(string) list_shortcut_folder_uris() 
//! Queries the list of shortcut folders. 
{ 
  pgtk_verify_inited(); 
  my_pop_n_elems(args); 
  { 
    GSList *gsl,*gs2; 
    int i=0; 
    gsl=gs2=gtk_file_chooser_list_shortcut_folder_uris(GTK_FILE_CHOOSER(THIS->obj)); 
    while (gs2) { 
      PGTK_PUSH_GCHAR(gs2->data); 
      i++; 
      g_free(gs2->data); 
      gs2=g_slist_next(gs2); 
    } 
    f_aggregate(i); 
    g_slist_free(gsl); 
  } 
}