1 #include "elm_interface_fileselector_eo.legacy.h"
2 /**
3  * Add a new file selector widget to the given parent Elementary
4  * (container) object
5  *
6  * @param parent The parent object
7  * @return a new file selector widget handle or @c NULL, on errors
8  *
9  * This function inserts a new file selector widget on the canvas.
10  *
11  * @ingroup Elm_Fileselector
12  */
13 EAPI Evas_Object          *elm_fileselector_add(Evas_Object *parent);
14 
15 /**
16  * Enable/disable the file name entry box where the user can type
17  * in a name for a file, in a given file selector widget
18  *
19  * @param obj The file selector object
20  * @param is_save @c EINA_TRUE to make the file selector a "saving
21  * dialog", @c EINA_FALSE otherwise. Default is @c EINA_TRUE.
22  *
23  * Having the entry editable is useful on file saving dialogs on
24  * applications, where one gives a file name to save contents to,
25  * in a given directory in the system. This custom file name will
26  * be reported on the @c "done" smart callback.
27  *
28  * @see elm_fileselector_is_save_get()
29  *
30  * @ingroup Elm_Fileselector
31  */
32 EAPI void                  elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save);
33 
34 /**
35  * Get whether the given file selector is in "saving dialog" mode
36  *
37  * @param obj The file selector object
38  * @return @c EINA_TRUE, if the file selector is in "saving dialog"
39  * mode, @c EINA_FALSE otherwise (and on errors)
40  *
41  * @see elm_fileselector_is_save_set() for more details
42  *
43  * @ingroup Elm_Fileselector
44  */
45 EAPI Eina_Bool             elm_fileselector_is_save_get(const Evas_Object *obj);
46 
47 /**
48  * Enable/disable folder-only view for a given file selector widget
49  *
50  * @param obj The file selector object
51  * @param only @c EINA_TRUE to make @p obj only display
52  * directories, @c EINA_FALSE to make files to be displayed in it
53  * too
54  *
55  * If enabled, the widget's view will only display folder items,
56  * naturally.
57  *
58  * @see elm_fileselector_folder_only_get()
59  *
60  * @ingroup Elm_Fileselector
61  */
62 EAPI void                  elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool only);
63 
64 /**
65  * Get whether folder-only view is set for a given file selector
66  * widget
67  *
68  * @param obj The file selector object
69  * @return only @c EINA_TRUE if @p obj is only displaying
70  * directories, @c EINA_FALSE if files are being displayed in it
71  * too (and on errors)
72  *
73  * @see elm_fileselector_folder_only_get()
74  *
75  * @ingroup Elm_Fileselector
76  */
77 EAPI Eina_Bool             elm_fileselector_folder_only_get(const Evas_Object *obj);
78 
79 /**
80  * Enable/disable a tree view in the given file selector widget,
81  * <b>if it's in @c #ELM_FILESELECTOR_LIST mode</b>
82  *
83  * @param obj The file selector object
84  * @param expand @c EINA_TRUE to enable tree view, @c EINA_FALSE to
85  * disable
86  *
87  * In a tree view, arrows are created on the sides of directories,
88  * allowing them to expand in place.
89  *
90  * @note If it's in other mode, the changes made by this function
91  * will only be visible when one switches back to "list" mode.
92  *
93  * @see elm_fileselector_expandable_get()
94  *
95  * @ingroup Elm_Fileselector
96  */
97 EAPI void                  elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool expand);
98 
99 /**
100  * Get whether tree view is enabled for the given file selector
101  * widget
102  *
103  * @param obj The file selector object
104  * @return @c EINA_TRUE if @p obj is in tree view, @c EINA_FALSE
105  * otherwise (and or errors)
106  *
107  * @see elm_fileselector_expandable_set() for more details
108  *
109  * @ingroup Elm_Fileselector
110  */
111 EAPI Eina_Bool             elm_fileselector_expandable_get(const Evas_Object *obj);
112 
113 /**
114  * Set, programmatically, the @b directory that a given file
115  * selector widget will display contents from
116  *
117  * @param obj The file selector object
118  * @param path The path to display in @p obj
119  *
120  * This will change the @b directory that @p obj is displaying. It
121  * will also clear the text entry area on the @p obj object, which
122  * displays select files' names.
123  *
124  * @see elm_fileselector_path_get()
125  *
126  * @ingroup Elm_Fileselector
127  */
128 EAPI void                  elm_fileselector_path_set(Evas_Object *obj, const char *path);
129 
130 /**
131  * Get the parent directory's path that a given file selector
132  * widget is displaying
133  *
134  * @param obj The file selector object
135  * @return The (full) path of the directory the file selector is
136  * displaying, a @b stringshared string
137  *
138  * @see elm_fileselector_path_set()
139  *
140  * @ingroup Elm_Fileselector
141  */
142 EAPI const char           *elm_fileselector_path_get(const Evas_Object *obj);
143 
144 /**
145  * Set the mode in which a given file selector widget will display
146  * (layout) file system entries in its view
147  *
148  * @param obj The file selector object
149  * @param mode The mode of the fileselector, being it one of #ELM_FILESELECTOR_LIST
150  * (default) or #ELM_FILESELECTOR_GRID. The first one, naturally, will display
151  * the files in a list. The latter will make the widget to display its entries
152  * in a grid form.
153  *
154  * @note By using elm_fileselector_expandable_set(), the user may
155  * trigger a tree view for that list.
156  *
157  * @note If Elementary is built with support of the Ethumb
158  * thumbnailing library, the second form of view will display
159  * preview thumbnails of files which it supports. You must have
160  * elm_need_ethumb() called in your Elementary for thumbnailing to
161  * work, though.
162  *
163  * @see elm_fileselector_expandable_set().
164  * @see elm_fileselector_mode_get().
165  *
166  * @ingroup Elm_Fileselector
167  */
168 EAPI void                  elm_fileselector_mode_set(Evas_Object *obj, Elm_Fileselector_Mode mode);
169 
170 /**
171  * Get the mode in which a given file selector widget is displaying
172  * (layouting) file system entries in its view
173  *
174  * @param obj The fileselector object
175  * @return The mode in which the fileselector is at
176  *
177  * @see elm_fileselector_mode_set() for more details
178  *
179  * @ingroup Elm_Fileselector
180  */
181 EAPI Elm_Fileselector_Mode elm_fileselector_mode_get(const Evas_Object *obj);
182 
183 /**
184  * Enable or disable multi-selection in the file selector widget.
185  *
186  * @param obj The file selector object
187  * @param multi Multi-select enable/disable. Default is disabled.
188  *
189  * This enables (@c EINA_TRUE) or disables (@c EINA_FALSE) multi-selection in
190  * the list/grid of the file selector widget. This allows more than 1 item to
191  * be selected. To retrieve the list of selected paths, use
192  * elm_fileselector_selected_paths_get().
193  *
194  * @see elm_fileselector_selected_paths_get()
195  * @see elm_fileselector_multi_select_get()
196  *
197  * @since 1.8
198  * @ingroup Elm_Fileselector
199  */
200 EAPI void                  elm_fileselector_multi_select_set(Evas_Object *obj, Eina_Bool multi);
201 
202 /**
203  * Get if multi-selection in the file selector is enabled or disabled.
204  *
205  * @param obj The file selector object
206  * @return Multi-select enabled/disabled
207  * (@c EINA_TRUE = enabled/@c EINA_FALSE = disabled). Default is @c EINA_FALSE.
208  *
209  * @see elm_fileselector_multi_select_set()
210  *
211  * @since 1.8
212  * @ingroup Elm_Fileselector
213  */
214 EAPI Eina_Bool             elm_fileselector_multi_select_get(const Evas_Object *obj);
215 
216 /**
217  * Set, programmatically, the currently selected file/directory in
218  * the given file selector widget
219  *
220  * @param obj The file selector object
221  * @param path The (full) path to a file or directory
222  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. The
223  * latter case occurs if the directory or file pointed to do not
224  * exist.
225  *
226  * @see elm_fileselector_selected_get()
227  *
228  * @ingroup Elm_Fileselector
229  */
230 EAPI Eina_Bool             elm_fileselector_selected_set(Evas_Object *obj, const char *path);
231 
232 /**
233  * Get the currently selected item's (full) path, in the given file
234  * selector widget
235  *
236  * @param obj The file selector object
237  * @return The absolute path of the selected item, a @b
238  * stringshared string
239  *
240  * @note Custom editions on @p obj object's text entry, if made,
241  * will appear on the return string of this function, naturally.
242  *
243  * @see elm_fileselector_selected_set() for more details
244  *
245  * @ingroup Elm_Fileselector
246  */
247 EAPI const char           *elm_fileselector_selected_get(const Evas_Object *obj);
248 
249 EAPI void                  elm_fileselector_current_name_set(Evas_Object *obj, const char *name);
250 EAPI const char           *elm_fileselector_current_name_get(const Evas_Object *obj);
251 
252 /**
253  * Get a list of selected paths in the file selector.
254  *
255  * @param obj The file selector object
256  * @return The list of selected paths, or NULL if not in multi-select mode or none are selected.
257  *
258  * It returns a list of the selected paths. This list pointer is only valid so
259  * long as the selection doesn't change (no items are selected or unselected, or
260  * unselected implicitly by deletion). The list contains const char *.
261  * The order of the items in this list is the order which they were selected,
262  * i.e. the first item in this list is the first item that was selected, and so on.
263  *
264  * @note If not in multi-select mode, consider using function
265  * elm_fileselector_selected_get() instead.
266  *
267  * @see elm_fileselector_multi_select_set()
268  * @see elm_fileselector_selected_get()
269  *
270  * @since 1.8
271  * @ingroup Elm_Fileselector
272  */
273 EAPI const Eina_List      *elm_fileselector_selected_paths_get(const Evas_Object *obj);
274 
275 /**
276  * Append mime types filter into filter list
277  *
278  * @param obj The file selector object
279  * @param mime_types comma(,) separated mime types to be allowed.
280  * @param filter_name The name to be displayed, @p mime_types will be displayed if NULL
281  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
282  *
283  * @note a sub type of mime can be asterisk(*)
284  * @note mime type filter is only working with efreet now.
285  * @note first added filter will be the default filter at the moment.
286  *
287  * @see elm_need_efreet()
288  * @see elm_fileselector_filters_clear()
289  *
290  * @since 1.8
291  * @ingroup Elm_Fileselector
292  */
293 EAPI Eina_Bool             elm_fileselector_mime_types_filter_append(Evas_Object *obj, const char *mime_types, const char *filter_name);
294 
295 /**
296  * Append custom filter into filter list
297  *
298  * @param obj The file selector object
299  * @param func The function to call when manipulating files and directories.
300  * @param data The data to be passed to this @p func call.
301  * @param filter_name The name to be displayed, "custom" will be displayed if NULL
302  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
303  *
304  * @note first added filter will be the default filter at the moment.
305  *
306  * @since 1.9
307  * @ingroup Elm_Fileselector
308  */
309 EAPI Eina_Bool             elm_fileselector_custom_filter_append(Evas_Object *obj, Elm_Fileselector_Filter_Func func, void *data, const char *filter_name);
310 
311 /**
312  * Clear all filters registered
313  *
314  * @param obj The file selector object
315  *
316  * @note If filter list is empty, file selector assume that all
317  * files are matched.
318  *
319  * @see elm_fileselector_mime_type_filter_append()
320  *
321  * @since 1.8
322  * @ingroup Elm_Fileselector
323  */
324 EAPI void                  elm_fileselector_filters_clear(Evas_Object *obj);
325 
326 /**
327  * Enable or disable visibility of hidden files/directories
328  * in the file selector widget.
329  *
330  * @param obj The file selector object
331  * @param visible Visibility of hidden files/directories. Default is disabled.
332  *
333  * This enables (@c EINA_TRUE) or disables (@c EINA_FALSE) visibility of hidden
334  * files/directories in the list/grid of the file selector widget.
335  *
336  * @since 1.8
337  * @ingroup Elm_Fileselector
338  */
339 EAPI void                  elm_fileselector_hidden_visible_set(Evas_Object *obj, Eina_Bool visible);
340 
341 /**
342  * Get if hidden files/directories in the file selector widget are visible or not.
343  *
344  * @param obj The file selector object
345  * @return Visibility of hidden files/directories
346  * (@c EINA_TRUE = enabled/@c EINA_FALSE = disabled). Default is @c EINA_FALSE.
347  *
348  * @see elm_fileselector_hidden_visible_set()
349  *
350  * @since 1.8
351  * @ingroup Elm_Fileselector
352  */
353 EAPI Eina_Bool             elm_fileselector_hidden_visible_get(const Evas_Object *obj);
354 
355 /**
356  * Set the size for the thumbnail of the file selector widget's view.
357  *
358  * @param obj The file selector object
359  * @param w The thumbnail's width.
360  * @param h The thumbnail's height.
361  *
362  * @note If w or h is 0, default value will be used.
363  *
364  * @see elm_fileselector_thumbnail_size_get()
365  *
366  * @since 1.9
367  * @ingroup Elm_Fileselector
368  */
369 EAPI void                  elm_fileselector_thumbnail_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
370 
371 /**
372  * Get the size for the thumbnail of a given file selector widget
373  *
374  * @param obj The file selector object.
375  * @param w Pointer to a variable where to store the thumbnail's width.
376  * @param h Pointer to a variable where to store the thumbnail's height.
377  *
378  * @note Use @c NULL pointers on the size values you're not
379  * interested in: they'll be ignored by the function.
380  *
381  * @see elm_fileselector_thumbnail_size_set()
382  *
383  * @since 1.9
384  * @ingroup Elm_Fileselector
385  */
386 EAPI void                  elm_fileselector_thumbnail_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
387 
388 /**
389  * Get the sort method of the file selector widget.
390  *
391  * @param obj The file selector object
392  * @return The sort method
393  *
394  * @see elm_fileselector_sort_method_set()
395  *
396  * @since 1.9
397  * @ingroup Elm_Fileselector
398  */
399 EAPI Elm_Fileselector_Sort elm_fileselector_sort_method_get(const Evas_Object *obj);
400 
401 /**
402  * Set the sort method of the file selector widget.
403  *
404  * @param obj The file selector object
405  * @param sort The sort method
406  *
407  * @see elm_fileselector_sort_method_get()
408  *
409  * @since 1.9
410  * @ingroup Elm_Fileselector
411  */
412 EAPI void                  elm_fileselector_sort_method_set(Evas_Object *obj, Elm_Fileselector_Sort sort);
413 
414 #include "elm_fileselector_eo.legacy.h"
415