- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Functions
File Selector

## Functions
Evas_Object * | elm_fileselector_add (Evas_Object *parent)
| Add a new file selector widget to the given parent Elementary (container) object. More...
void | elm_fileselector_is_save_set (Evas_Object *obj, Eina_Bool is_save)
| Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector widget. More...
Eina_Bool | elm_fileselector_is_save_get (const Evas_Object *obj)
| Get whether the given file selector is in "saving dialog" mode. More...
void | elm_fileselector_folder_only_set (Evas_Object *obj, Eina_Bool only)
| Enable/disable folder-only view for a given file selector widget. More...
Eina_Bool | elm_fileselector_folder_only_get (const Evas_Object *obj)
| Get whether folder-only view is set for a given file selector widget. More...
void | elm_fileselector_buttons_ok_cancel_set (Evas_Object *obj, Eina_Bool buttons)
| Enable/disable the "ok" and "cancel" buttons on a given file selector widget. More...
Eina_Bool | elm_fileselector_buttons_ok_cancel_get (const Evas_Object *obj)
| Get whether the "ok" and "cancel" buttons on a given file selector widget are being shown. More...
void | elm_fileselector_expandable_set (Evas_Object *obj, Eina_Bool expand)
| Enable/disable a tree view in the given file selector widget, if it's in `#ELM_FILESELECTOR_LIST` mode More...
Eina_Bool | elm_fileselector_expandable_get (const Evas_Object *obj)
| Get whether tree view is enabled for the given file selector widget. More...
void | elm_fileselector_path_set (Evas_Object *obj, const char *path)
| Set, programmatically, the directory that a given file selector widget will display contents from. More...
const char * | elm_fileselector_path_get (const Evas_Object *obj)
| Get the parent directory's path that a given file selector widget is displaying. More...
void | elm_fileselector_mode_set (Evas_Object *obj, Elm_Fileselector_Mode mode)
| Set the mode in which a given file selector widget will display (layout) file system entries in its view. More...
Elm_Fileselector_Mode | elm_fileselector_mode_get (const Evas_Object *obj)
| Get the mode in which a given file selector widget is displaying (layouting) file system entries in its view. More...
void | elm_fileselector_multi_select_set (Evas_Object *obj, Eina_Bool multi)
| Enable or disable multi-selection in the file selector widget. More...
Eina_Bool | elm_fileselector_multi_select_get (const Evas_Object *obj)
| Get if multi-selection in the file selector is enabled or disabled. More...
Eina_Bool | elm_fileselector_selected_set (Evas_Object *obj, const char *path)
| Set, programmatically, the currently selected file/directory in the given file selector widget. More...
const char * | elm_fileselector_selected_get (const Evas_Object *obj)
| Get the currently selected item's (full) path, in the given file selector widget. More...
const Eina_List * | elm_fileselector_selected_paths_get (const Evas_Object *obj)
| Get a list of selected paths in the file selector. More...
Eina_Bool | elm_fileselector_mime_types_filter_append (Evas_Object *obj, const char *mime_types, const char *filter_name)
| Append mime types filter into filter list. More...
void | elm_fileselector_filters_clear (Evas_Object *obj)
| Clear all filters registered. More...
void | elm_fileselector_hidden_visible_set (Evas_Object *obj, Eina_Bool visible)
| Enable or disable visibility of hidden files/directories in the file selector widget. More...
Eina_Bool | elm_fileselector_hidden_visible_get (const Evas_Object *obj)
| Get if hiden files/directories in the file selector widget are visible or not. More...
#define | elm_obj_fileselector_is_save_set(is_save) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_SET), EO_TYPECHECK(Eina_Bool, is_save)
#define | elm_obj_fileselector_is_save_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_folder_only_set(only) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_FOLDER_ONLY_SET), EO_TYPECHECK(Eina_Bool, only)
#define | elm_obj_fileselector_folder_only_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_FOLDER_ONLY_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_buttons_ok_cancel_set(visible) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_BUTTONS_OK_CANCEL_SET), EO_TYPECHECK(Eina_Bool, visible)
#define | elm_obj_fileselector_buttons_ok_cancel_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_BUTTONS_OK_CANCEL_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_expandable_set(expand) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_EXPANDABLE_SET), EO_TYPECHECK(Eina_Bool, expand)
#define | elm_obj_fileselector_expandable_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_EXPANDABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_path_set(_path) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_PATH_SET), EO_TYPECHECK(const char *, _path)
#define | elm_obj_fileselector_path_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_PATH_GET), EO_TYPECHECK(const char **, ret)
#define | elm_obj_fileselector_mode_set(mode) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_Fileselector_Mode, mode)
#define | elm_obj_fileselector_mode_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_Fileselector_Mode *, ret)
#define | elm_obj_fileselector_multi_select_set(multi) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MULTI_SELECT_SET), EO_TYPECHECK(Eina_Bool, multi)
#define | elm_obj_fileselector_multi_select_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MULTI_SELECT_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_selected_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_SELECTED_GET), EO_TYPECHECK(const char **, ret)
#define | elm_obj_fileselector_selected_set(_path, ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_SELECTED_SET), EO_TYPECHECK(const char *, _path), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_selected_paths_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_SELECTED_PATHS_GET), EO_TYPECHECK(const Eina_List **, ret)
#define | elm_obj_fileselector_mime_types_filter_append(mime_types, filter_name, ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MIME_TYPES_FILTER_APPEND), EO_TYPECHECK(const char *, mime_types), EO_TYPECHECK(const char *, filter_name), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_filters_clear() ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_FILTERS_CLEAR)
#define | elm_obj_fileselector_hidden_visible_set(multi) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_HIDDEN_VISIBLE_SET), EO_TYPECHECK(Eina_Bool, multi)
#define | elm_obj_fileselector_hidden_visible_get(ret) ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_HIDDEN_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

## Detailed Description

A file selector is a widget that allows a user to navigate through a file system, reporting file selections back via its API.

It contains shortcut buttons for home directory (`~`) and to jump one directory upwards (..), as well as cancel/ok buttons to confirm/cancel a given selection. After either one of those two former actions, the file selector will issue its `"done"` smart callback.

There's a text entry on it, too, showing the name of the current selection. There's the possibility of making it editable, so it is useful on file saving dialogs on applications, where one gives a file name to save contents to, in a given directory in the system. This custom file name will be reported on the `"done"` smart callback (explained in sequence).

Finally, it has a view to display file system items into in two possible forms:

- list
- grid

If Elementary is built with support of the Ethumb thumbnailing library, the second form of view will display preview thumbnails of files which it supports.

This widget inherits from the Layout one, so that all the functions acting on it also work for file selector objects.

This widget emits the following signals, besides the ones sent from Layout:

- `"activated"` - the user activated a file. This can happen by double-clicking or pressing Enter key. (`event_info` is a pointer to the activated file path)
- `"selected"` - the user has clicked on a file (when not in folders-only mode) or directory (when in folders-only mode)
- `"selected,invalid"` - the user has tried to access wrong path which does not exist.
- `"directory,open"` - the list has been populated with new content (`event_info` is a pointer to the directory's path, a stringshared string)
- `"done"` - the user has clicked on the "ok" or "cancel" buttons (`event_info` is a pointer to the selection's path, a stringshared string)

For text, elm_layout_text_set() will work here on:

- `"ok"` - OK button label if the ok button is set.
  Since
    1.8
- `"cancel"` - Cancel button label if the cancel button is set.
  Since
    1.8
  Here is an example on its usage:
- File selector widget example

## Macro Definition Documentation

#define elm_obj_fileselector_buttons_ok_cancel_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_BUTTONS_OK_CANCEL_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether the "ok" and "cancel" buttons on a given file

Parameters

  [out] | ret |

See Also
  elm_fileselector_buttons_ok_cancel_get

Referenced by elm_fileselector_buttons_ok_cancel_get().

#define elm_obj_fileselector_buttons_ok_cancel_set | ( |  | visible | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_BUTTONS_OK_CANCEL_SET), EO_TYPECHECK(Eina_Bool, visible)

Since
  1.8

Enable/disable the "ok" and "cancel" buttons on a given file

Parameters

  [in] | visible |

See Also
  elm_fileselector_buttons_ok_cancel_set

Referenced by elm_fileselector_buttons_ok_cancel_set().

#define elm_obj_fileselector_expandable_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_EXPANDABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether tree view is enabled for the given file selector

Parameters

  [out] | ret |

See Also
  elm_fileselector_expandable_get

Referenced by elm_fileselector_expandable_get().

#define elm_obj_fileselector_expandable_set | ( |  | expand | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_EXPANDABLE_SET), EO_TYPECHECK(Eina_Bool, expand)

Since
  1.8

Enable/disable a tree view in the given file selector widget, if it's in `#ELM_FILESELECTOR_LIST` mode

Parameters

  [in] | expand |

See Also
  elm_fileselector_expandable_set

Referenced by elm_fileselector_expandable_set().

#define elm_obj_fileselector_filters_clear | ( |  | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_FILTERS_CLEAR)

Since
  1.8

Clear all filters registered

See Also
  elm_fileselector_mime_type_filter_append

Referenced by elm_fileselector_filters_clear().

#define elm_obj_fileselector_folder_only_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_FOLDER_ONLY_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether folder-only view is set for a given file selector

Parameters

  [out] | ret |

See Also
  elm_fileselector_folder_only_get

Referenced by elm_fileselector_folder_only_get().

#define elm_obj_fileselector_folder_only_set | ( |  | only | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_FOLDER_ONLY_SET), EO_TYPECHECK(Eina_Bool, only)

Since
  1.8

Enable/disable folder-only view for a given file selector widget

Parameters

  [in] | only |

See Also
  elm_fileselector_folder_only_set

Referenced by elm_fileselector_folder_only_set().

#define elm_obj_fileselector_hidden_visible_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_HIDDEN_VISIBLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get if hiden files/directories in the file selector are visible or not.

Parameters

  [out] | visible |

See Also
  elm_fileselector_hidden_visible_set

Referenced by elm_fileselector_hidden_visible_get().

#define elm_obj_fileselector_hidden_visible_set | ( |  | multi | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_HIDDEN_VISIBLE_SET), EO_TYPECHECK(Eina_Bool, multi)

Since
  1.8

Enable or disable visibility of hidden files/directories in the file selector widget.

Parameters

  [in] | visible |

See Also
  elm_fileselector_hidden_visible_get

Referenced by elm_fileselector_hidden_visible_set().

#define elm_obj_fileselector_is_save_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether the given file selector is in "saving dialog" mode

Parameters

  [out] | ret |

See Also
  elm_fileselector_is_save_get

Referenced by elm_fileselector_is_save_get().

#define elm_obj_fileselector_is_save_set | ( |  | is_save | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_SET), EO_TYPECHECK(Eina_Bool, is_save)

Since
  1.8

Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector widget

Parameters

  [in] | is_save |

See Also
  elm_fileselector_is_save_set

Referenced by elm_fileselector_is_save_set().

#define elm_obj_fileselector_mime_types_filter_append | ( |  | mime_types,
|  |  | filter_name,
|  |  | ret
| ) |  | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MIME_TYPES_FILTER_APPEND), EO_TYPECHECK(const char *, mime_types), EO_TYPECHECK(const char *, filter_name), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Append mime type based filter into filter list

Parameters

  [in] | mime_types |
  [in] | filter_name |
  [out] | ret |

See Also
  elm_fileselector_mime_types_filter_append

Referenced by elm_fileselector_mime_types_filter_append().

#define elm_obj_fileselector_mode_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_Fileselector_Mode *, ret)

Since
  1.8

Get the mode in which a given file selector widget is displaying

Parameters

  [out] | ret |

See Also
  elm_fileselector_mode_get

Referenced by elm_fileselector_mode_get().

#define elm_obj_fileselector_mode_set | ( |  | mode | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_Fileselector_Mode, mode)

Since
  1.8

Set the mode in which a given file selector widget will display (layout) file system entries in its view

Parameters

  [in] | mode |

See Also
  elm_fileselector_mode_set

Referenced by elm_fileselector_mode_set().

#define elm_obj_fileselector_multi_select_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MULTI_SELECT_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Gets if multi-selection in fileselector is enabled or disabled.

Parameters

  [out] | multi |

See Also
  elm_fileselector_multi_select_get

Referenced by elm_fileselector_multi_select_get().

#define elm_obj_fileselector_multi_select_set | ( |  | multi | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_MULTI_SELECT_SET), EO_TYPECHECK(Eina_Bool, multi)

Since
  1.8

Enable or disable multi-selection in the fileselector

Parameters

  [in] | multi |

See Also
  elm_fileselector_multi_select_set

Referenced by elm_fileselector_multi_select_set().

#define elm_obj_fileselector_path_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_PATH_GET), EO_TYPECHECK(const char **, ret)

Since
  1.8

Get the parent directory's path that a given file selector selector widget will display contents from

Parameters

  [out] | ret |

See Also
  elm_fileselector_path_get

Referenced by elm_fileselector_path_get().

#define elm_obj_fileselector_path_set | ( |  | _path | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_PATH_SET), EO_TYPECHECK(const char *, _path)

Since
  1.8

Set, programmatically, the directory that a given file selector widget will display contents from

Parameters

  [in] | _path |

See Also
  elm_fileselector_path_set

Referenced by elm_fileselector_path_set().

#define elm_obj_fileselector_selected_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_SELECTED_GET), EO_TYPECHECK(const char **, ret)

Since
  1.8

Get the currently selected item's (full) path, in the given file the given file selector widget

Parameters

  [out] | ret |

See Also
  elm_fileselector_selected_get

Referenced by elm_fileselector_selected_get().

#define elm_obj_fileselector_selected_paths_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_SELECTED_PATHS_GET), EO_TYPECHECK(const Eina_List **, ret)

Since
  1.8

Get a list of selected paths in the fileselector.

Parameters

  [out] | ret |

See Also
  elm_fileselector_selected_paths_get

Referenced by elm_fileselector_selected_paths_get().

#define elm_obj_fileselector_selected_set | ( |  | _path,
|  |  | ret
| ) |  | ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_SELECTED_SET), EO_TYPECHECK(const char *, _path), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Set, programmatically, the currently selected file/directory in the given file selector widget

Parameters

  [in] | _path |
  [out] | ret |

See Also
  elm_fileselector_selected_set

Referenced by elm_fileselector_selected_set().

## Function Documentation

Evas_Object* elm_fileselector_add | ( | Evas_Object * | parent | ) |

Add a new file selector widget to the given parent Elementary (container) object.

Parameters

  parent | The parent object

Returns
  a new file selector widget handle or `NULL`, on errors

This function inserts a new file selector widget on the canvas.

Eina_Bool elm_fileselector_buttons_ok_cancel_get | ( | const Evas_Object * | obj | ) |

Get whether the "ok" and "cancel" buttons on a given file selector widget are being shown.

Parameters

  obj | The file selector object

Returns
  `EINA_TRUE` if they are being shown, `EINA_FALSE` otherwise (and on errors)

See Also
  elm_fileselector_buttons_ok_cancel_set() for more details

References elm_obj_fileselector_buttons_ok_cancel_get.

void elm_fileselector_buttons_ok_cancel_set | ( | Evas_Object * | obj,
|  | Eina_Bool | buttons
| ) |  |

Enable/disable the "ok" and "cancel" buttons on a given file selector widget.

Parameters

  obj | The file selector object
  buttons | `EINA_TRUE` to show buttons, `EINA_FALSE` to hide.

Note
  A file selector without those buttons will never emit the `"done"` smart event, and is only usable if one is just hooking to the other two events.

See Also
  elm_fileselector_buttons_ok_cancel_get()

References elm_obj_fileselector_buttons_ok_cancel_set.

Eina_Bool elm_fileselector_expandable_get | ( | const Evas_Object * | obj | ) |

Get whether tree view is enabled for the given file selector widget.

Parameters

  obj | The file selector object

Returns
  `EINA_TRUE` if `obj` is in tree view, `EINA_FALSE` otherwise (and or errors)

See Also
  elm_fileselector_expandable_set() for more details

References elm_obj_fileselector_expandable_get.

void elm_fileselector_expandable_set | ( | Evas_Object * | obj,
|  | Eina_Bool | expand
| ) |  |

Enable/disable a tree view in the given file selector widget, if it's in `#ELM_FILESELECTOR_LIST` mode

Parameters

  obj | The file selector object
  expand | `EINA_TRUE` to enable tree view, `EINA_FALSE` to disable

In a tree view, arrows are created on the sides of directories, allowing them to expand in place.

Note
  If it's in other mode, the changes made by this function will only be visible when one switches back to "list" mode.

See Also
  elm_fileselector_expandable_get()

References elm_obj_fileselector_expandable_set.

void elm_fileselector_filters_clear | ( | Evas_Object * | obj | ) |

Clear all filters registered.

Parameters

  obj | The file selector object

Note
  If filter list is empty, file selector assume that all files are matched.

See Also
  elm_fileselector_mime_type_filter_append()

Since
  1.8

References elm_obj_fileselector_filters_clear.

Eina_Bool elm_fileselector_folder_only_get | ( | const Evas_Object * | obj | ) |

Get whether folder-only view is set for a given file selector widget.

Parameters

  obj | The file selector object

Returns
  only `EINA_TRUE` if `obj` is only displaying directories, `EINA_FALSE` if files are being displayed in it too (and on errors)

See Also
  elm_fileselector_folder_only_get()

References elm_obj_fileselector_folder_only_get.

void elm_fileselector_folder_only_set | ( | Evas_Object * | obj,
|  | Eina_Bool | only
| ) |  |

Enable/disable folder-only view for a given file selector widget.

Parameters

  obj | The file selector object
  only | `EINA_TRUE` to make `obj` only display directories, `EINA_FALSE` to make files to be displayed in it too

If enabled, the widget's view will only display folder items, naturally.

See Also
  elm_fileselector_folder_only_get()

References elm_obj_fileselector_folder_only_set.

Eina_Bool elm_fileselector_hidden_visible_get | ( | const Evas_Object * | obj | ) |

Get if hiden files/directories in the file selector widget are visible or not.

Parameters

  obj | The file selector object

Returns
  Visibility of hidden files/directories (`EINA_TRUE` = enabled/`EINA_FALSE` = disabled). Default is `EINA_FALSE`.

See Also
  elm_fileselector_hidden_visible_set()

Since
  1.8

References elm_obj_fileselector_hidden_visible_get.

void elm_fileselector_hidden_visible_set | ( | Evas_Object * | obj,
|  | Eina_Bool | visible
| ) |  |

Enable or disable visibility of hidden files/directories in the file selector widget.

Parameters

  obj | The file selector object
  visible | Visibility of hidden files/directories. Default is disabled.

This enables (`EINA_TRUE`) or disables (`EINA_FALSE`) visibility of hidden files/directories in the list/grid of the file selector widget.

Since
  1.8

References elm_obj_fileselector_hidden_visible_set.

Eina_Bool elm_fileselector_is_save_get | ( | const Evas_Object * | obj | ) |

Get whether the given file selector is in "saving dialog" mode.

Parameters

  obj | The file selector object

Returns
  `EINA_TRUE`, if the file selector is in "saving dialog" mode, `EINA_FALSE` otherwise (and on errors)

See Also
  elm_fileselector_is_save_set() for more details

References elm_obj_fileselector_is_save_get.

void elm_fileselector_is_save_set | ( | Evas_Object * | obj,
|  | Eina_Bool | is_save
| ) |  |

Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector widget.

Parameters

  obj | The file selector object
  is_save | `EINA_TRUE` to make the file selector a "saving dialog", `EINA_FALSE` otherwise

Having the entry editable is useful on file saving dialogs on applications, where one gives a file name to save contents to, in a given directory in the system. This custom file name will be reported on the `"done"` smart callback.

See Also
  elm_fileselector_is_save_get()

References elm_obj_fileselector_is_save_set.

Eina_Bool elm_fileselector_mime_types_filter_append | ( | Evas_Object * | obj,
|  | const char * | mime_types,
|  | const char * | filter_name
| ) |  |

Append mime types filter into filter list.

Parameters

  obj | The file selector object
  mime_types | comma(,) separated mime types to be allowed.
  filter_name | The name to be displayed, `mime_types` will be displayed if NULL

Returns
  `EINA_TRUE` on success, `EINA_FALSE` on failure.

Note
  a sub type of mime can be asterisk(*)
  mime type filter is only working with efreet now.
  first added filter will be the default filter at the moment.

See Also
  elm_need_efreet()
  elm_fileselector_filters_clear()

Since
  1.8

References elm_obj_fileselector_mime_types_filter_append.

Elm_Fileselector_Mode elm_fileselector_mode_get | ( | const Evas_Object * | obj | ) |

Get the mode in which a given file selector widget is displaying (layouting) file system entries in its view.

Parameters

  obj | The fileselector object

Returns
  The mode in which the fileselector is at

See Also
  elm_fileselector_mode_set() for more details

References elm_obj_fileselector_mode_get.

void elm_fileselector_mode_set | ( | Evas_Object * | obj,
|  | Elm_Fileselector_Mode | mode
| ) |  |

Set the mode in which a given file selector widget will display (layout) file system entries in its view.

Parameters

  obj | The file selector object
  mode | The mode of the fileselector, being it one of #ELM_FILESELECTOR_LIST (default) or #ELM_FILESELECTOR_GRID. The first one, naturally, will display the files in a list. The latter will make the widget to display its entries in a grid form.

Note
  By using elm_fileselector_expandable_set(), the user may trigger a tree view for that list.
  If Elementary is built with support of the Ethumb thumbnailing library, the second form of view will display preview thumbnails of files which it supports. You must have elm_need_ethumb() called in your Elementary for thumbnailing to work, though.

See Also
  elm_fileselector_expandable_set().
  elm_fileselector_mode_get().

References elm_obj_fileselector_mode_set.

Eina_Bool elm_fileselector_multi_select_get | ( | const Evas_Object * | obj | ) |

Get if multi-selection in the file selector is enabled or disabled.

Parameters

  obj | The file selector object

Returns
  Multi-select enabled/disabled (`EINA_TRUE` = enabled/`EINA_FALSE` = disabled). Default is `EINA_FALSE`.

See Also
  elm_fileselector_multi_select_set()

Since
  1.8

References elm_obj_fileselector_multi_select_get.

void elm_fileselector_multi_select_set | ( | Evas_Object * | obj,
|  | Eina_Bool | multi
| ) |  |

Enable or disable multi-selection in the file selector widget.

Parameters

  obj | The file selector object
  multi | Multi-select enable/disable. Default is disabled.

This enables (`EINA_TRUE`) or disables (`EINA_FALSE`) multi-selection in the list/grid of the file selector widget. This allows more than 1 item to be selected. To retrieve the list of selected paths, use elm_fileselector_selected_paths_get().

See Also
  elm_fileselector_selected_paths_get()
  elm_fileselector_multi_select_get()

Since
  1.8

References elm_obj_fileselector_multi_select_set.

const char* elm_fileselector_path_get | ( | const Evas_Object * | obj | ) |

Get the parent directory's path that a given file selector widget is displaying.

Parameters

  obj | The file selector object

Returns
  The (full) path of the directory the file selector is displaying, a stringshared string

See Also
  elm_fileselector_path_set()

References elm_obj_fileselector_path_get.

void elm_fileselector_path_set | ( | Evas_Object * | obj,
|  | const char * | path
| ) |  |

Set, programmatically, the directory that a given file selector widget will display contents from.

Parameters

  obj | The file selector object
  path | The path to display in `obj`

This will change the directory that `obj` is displaying. It will also clear the text entry area on the `obj` object, which displays select files' names.

See Also
  elm_fileselector_path_get()

References elm_obj_fileselector_path_set.

const char* elm_fileselector_selected_get | ( | const Evas_Object * | obj | ) |

Get the currently selected item's (full) path, in the given file selector widget.

Parameters

  obj | The file selector object

Returns
  The absolute path of the selected item, a stringshared string

Note
  Custom editions on `obj` object's text entry, if made, will appear on the return string of this function, naturally.

See Also
  elm_fileselector_selected_set() for more details

References elm_obj_fileselector_selected_get.

const Eina_List* elm_fileselector_selected_paths_get | ( | const Evas_Object * | obj | ) |

Get a list of selected paths in the file selector.

Parameters

  obj | The file selector object

Returns
  The list of selected paths, or NULL if not in multi-select mode or none are selected.

It returns a list of the selected paths. This list pointer is only valid so long as the selection doesn't change (no items are selected or unselected, or unselected implicitly by deletion). The list contains const char *. The order of the items in this list is the order which they were selected, i.e. the first item in this list is the first item that was selected, and so on.

Note
  If not in multi-select mode, consider using function elm_fileselector_selected_get() instead.

See Also
  elm_fileselector_multi_select_set()
  elm_fileselector_selected_get()

Since
  1.8

References elm_obj_fileselector_selected_paths_get.

Eina_Bool elm_fileselector_selected_set | ( | Evas_Object * | obj,
|  | const char * | path
| ) |  |

Set, programmatically, the currently selected file/directory in the given file selector widget.

Parameters

  obj | The file selector object
  path | The (full) path to a file or directory

Returns
  `EINA_TRUE` on success, `EINA_FALSE` on failure. The latter case occurs if the directory or file pointed to do not exist.

See Also
  elm_fileselector_selected_get()

References elm_obj_fileselector_selected_set.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:12