finch/libgnt/gntfilesel.h

changeset 15987
71d668c3d56d
parent 15913
e4c15762aafa
parent 15986
49c0e6c8c116
child 15989
2023148e9514
equal deleted inserted replaced
15913:e4c15762aafa 15987:71d668c3d56d
15 15
16 #define GNT_FILE_SEL_FLAGS(obj) (GNT_FILE_SEL(obj)->priv.flags) 16 #define GNT_FILE_SEL_FLAGS(obj) (GNT_FILE_SEL(obj)->priv.flags)
17 #define GNT_FILE_SEL_SET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) |= flags) 17 #define GNT_FILE_SEL_SET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) |= flags)
18 #define GNT_FILE_SEL_UNSET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) &= ~(flags)) 18 #define GNT_FILE_SEL_UNSET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) &= ~(flags))
19 19
20 typedef struct _GnFileSel GntFileSel; 20 typedef struct _GntFileSel GntFileSel;
21 typedef struct _GnFileSelPriv GntFileSelPriv; 21 typedef struct _GntFileSelPriv GntFileSelPriv;
22 typedef struct _GnFileSelClass GntFileSelClass; 22 typedef struct _GntFileSelClass GntFileSelClass;
23 23
24 struct _GnFileSel 24 struct _GntFileSel
25 { 25 {
26 GntWindow parent; 26 GntWindow parent;
27 27
28 GntWidget *dirs; /* list of files */ 28 GntWidget *dirs; /* list of files */
29 GntWidget *files; /* list of directories */ 29 GntWidget *files; /* list of directories */
34 34
35 char *current; /* Full path of the current location */ 35 char *current; /* Full path of the current location */
36 /* XXX: someone should make these useful */ 36 /* XXX: someone should make these useful */
37 gboolean must_exist; /* Make sure the selected file (the name entered in 'location') exists */ 37 gboolean must_exist; /* Make sure the selected file (the name entered in 'location') exists */
38 gboolean dirsonly; /* Show only directories */ 38 gboolean dirsonly; /* Show only directories */
39 gboolean multiselect;
40 GList *tags; /* List of tagged files when multiselect is set */
39 }; 41 };
40 42
41 struct _GnFileSelClass 43 struct _GntFileSelClass
42 { 44 {
43 GntWindowClass parent; 45 GntWindowClass parent;
44 46
45 void (*file_selected)(GntFileSel *sel, const char *path, const char *filename); 47 void (*file_selected)(GntFileSel *sel, const char *path, const char *filename);
46 void (*gnt_reserved1)(void); 48 void (*gnt_reserved1)(void);
51 53
52 G_BEGIN_DECLS 54 G_BEGIN_DECLS
53 55
54 GType gnt_file_sel_get_gtype(void); 56 GType gnt_file_sel_get_gtype(void);
55 57
56 GntWidget *gnt_file_sel_new(); 58 GntWidget *gnt_file_sel_new(void);
57 59
58 gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path); 60 gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path);
59
60 const char *gnt_file_sel_get_current_location(GntFileSel *sel);
61 61
62 void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs); 62 void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs);
63 63
64 gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel); 64 gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel);
65 65
66 void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must);
67
68 gboolean gnt_file_sel_get_must_exist(GntFileSel *sel);
69
70 char *gnt_file_sel_get_selected_file(GntFileSel *sel); /* The returned value should be free'd */
71
72 GList *gnt_file_sel_get_selected_multi_files(GntFileSel *sel);
73
74 void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set);
75
66 G_END_DECLS 76 G_END_DECLS
67 77
68 #endif /* GNT_FILE_SEL_H */ 78 #endif /* GNT_FILE_SEL_H */
79

mercurial