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

Prefs

#define | elm_obj_prefs_file_set(file, page, ret)
| Set file and page to populate a given prefs widget's interface. More...
#define | elm_obj_prefs_file_get(file, page, ret)
| Retrieve file and page bound to a given prefs widget. More...
#define | elm_obj_prefs_data_set(data, ret)
| Set user data for a given prefs widget. More...
#define | elm_obj_prefs_data_get(ret)
| Retrieve user data for a given prefs widget. More...
#define | elm_obj_prefs_autosave_set(autosave)
| Set whether a given prefs widget should save its values back (on the user data file, if set) automatically on every UI element changes. More...
#define | elm_obj_prefs_autosave_get(ret)
| Get whether a given prefs widget is saving its values back automatically on changes. More...
#define | elm_obj_prefs_reset(mode)
| Reset the values of a given prefs widget to a previous state. More...
#define | elm_obj_prefs_item_value_set(name, value, ret)
| Set the value on a given prefs widget's item. More...
#define | elm_obj_prefs_item_value_get(name, value, ret)
| Retrieve the value of a given prefs widget's item. More...
#define | elm_obj_prefs_item_object_get(name, ret)
| Retrieve the Elementary widget bound to a given prefs widget's item. More...
#define | elm_obj_prefs_item_visible_set(name, visible)
| Set whether the widget bound to given prefs widget's item should be visible or not. More...
#define | elm_obj_prefs_item_visible_get(name, ret)
| Retrieve whether the widget bound to a given prefs widget's item is visible or not. More...
#define | elm_obj_prefs_item_disabled_set(name, disabled)
| Set whether the widget bound to a given prefs widget's item is disabled or not. More...
#define | elm_obj_prefs_item_disabled_get(name, ret)
| Retrieve whether the widget bound to a given prefs widget's item is disabled or not. More...
#define | elm_obj_prefs_item_editable_set(name, editable)
| Set whether the widget bound to a given prefs widget's item is editable or not. More...
#define | elm_obj_prefs_item_editable_get(name, ret)
| Retrieve whether the widget bound to a given prefs widget's item is editable or not. More...
#define | elm_obj_prefs_item_swallow(name, child, ret)
| "Swallows" an object into a SWALLOW item of a prefs widget. More...
#define | elm_obj_prefs_item_unswallow(name, ret)
| Unswallow an object from a SWALLOW item of a prefs widget. More...
Eina_Bool | elm_prefs_file_set (Evas_Object *o, const char *file, const char *page)
| Set file and page to populate a given prefs widget's interface. More...
Eina_Bool | elm_prefs_file_get (const Evas_Object *o, const char **file, const char **page)
| Retrieve file and page bound to a given prefs widget. More...
Eina_Bool | elm_prefs_data_set (Evas_Object *obj, Elm_Prefs_Data *data)
| Set user data for a given prefs widget. More...
Elm_Prefs_Data * | elm_prefs_data_get (const Evas_Object *o)
| Retrieve user data for a given prefs widget. More...
void | elm_prefs_autosave_set (Evas_Object *prefs, Eina_Bool autosave)
| Set whether a given prefs widget should save its values back (on the user data file, if set) automatically on every UI element changes. More...
Eina_Bool | elm_prefs_autosave_get (const Evas_Object *prefs)
| Get whether a given prefs widget is saving its values back automatically on changes. More...
void | elm_prefs_reset (Evas_Object *prefs, Elm_Prefs_Reset_Mode mode)
| Reset the values of a given prefs widget to a previous state. More...
Eina_Bool | elm_prefs_item_value_set (Evas_Object *prefs, const char *name, const Eina_Value *value)
| Set the value on a given prefs widget's item. More...
Eina_Bool | elm_prefs_item_value_get (const Evas_Object *prefs, const char *name, Eina_Value *value)
| Retrieve the value of a given prefs widget's item. More...
const Evas_Object * | elm_prefs_item_object_get (Evas_Object *prefs, const char *name)
| Retrieve the Elementary widget bound to a given prefs widget's item. More...
void | elm_prefs_item_visible_set (Evas_Object *prefs, const char *name, Eina_Bool visible)
| Set whether the widget bound to given prefs widget's item should be visible or not. More...
Eina_Bool | elm_prefs_item_visible_get (const Evas_Object *prefs, const char *name)
| Retrieve whether the widget bound to a given prefs widget's item is visible or not. More...
void | elm_prefs_item_disabled_set (Evas_Object *prefs, const char *name, Eina_Bool disabled)
| Set whether the widget bound to a given prefs widget's item is disabled or not. More...
Eina_Bool | elm_prefs_item_disabled_get (const Evas_Object *prefs, const char *name)
| Retrieve whether the widget bound to a given prefs widget's item is disabled or not. More...
void | elm_prefs_item_editable_set (Evas_Object *prefs, const char *name, Eina_Bool editable)
| Set whether the widget bound to a given prefs widget's item is editable or not. More...
Eina_Bool | elm_prefs_item_editable_get (const Evas_Object *prefs, const char *name)
| Retrieve whether the widget bound to a given prefs widget's item is editable or not. More...
Eina_Bool | elm_prefs_item_swallow (Evas_Object *obj, const char *name, Evas_Object *child)
| "Swallows" an object into a SWALLOW item of a prefs widget. More...
Evas_Object * | elm_prefs_item_unswallow (Evas_Object *obj, const char *name)
| Unswallow an object from a SWALLOW item of a prefs widget. More...

## Detailed Description

# Prefs

Prefs is a special widget inside Elementary. It is mainly targeted to configuration dialogs. Its viewport is blank until you associate a definition file to it. That file (usually with .epb extension), is a binary format (Eet) one, coming from a human-readable textual declaration. This textual form, an Elementary prefs collection (usually with .epc extension), is translated to the binary form by means of the prefs_cc compiler.

On it one declares UI elements to populate prefs widgets, which are contained in pages (a prefs widget is always bound to one page). Those elements get properties like:

- default value,
- maximum and minumum ranges,
- acceptance and denial regular expressions, for strings,
- visibility,
- persistence,
- editability, etc.

Once a prefs widget is created, after elm_prefs_file_set() is issued on it, all of its UI elements will get default values, declared on that file. To fetch an user's own, personal set of those values, one gets to pair an Prefs Data handle to the prefs widget.

Personal, prefs data values with keys matching the ones present on the file passed on elm_prefs_file_set() to will have their values applied to the respective UI elements of the widget.

When a prefs widget dies, the values of the elements declared on its .epb file marked as permanent will be written back to the user prefs data handle, if it is writable. One is also able to make this writing event to take place automatically after each UI element modification by using elm_prefs_autosave_set().

This widget emits the following signals:

- `"page,saved"`: a given page has had its values saved back on user config file (event info is the page's name)
- `"page,reset"`: a given page has had its values reset (event info is the page's name)
- `"page,changed"`: a given page has been loaded with user (``.cfg) values (event info is the page's name)
- `"page,loaded"`: a given page has been loaded with system (``.epb) values (event info is the page's name)
- `"item,changed"`: a given page's item has changed (event info is the item's full hierarchical name, in the form `"page:subpage:subsubpage:item"`)
- `"action"`: an action item has been triggered (event info is the item's full hierarchical name, in the form `"page:subpage:subsubpage:item"`)

- Elementary Prefs Data Collection Reference

The following are examples on how to use prefs:

- Prefs Example 01
- Prefs Example 02
- Prefs Example 03

## Macro Definition Documentation

#define elm_obj_prefs_autosave_get | ( |  | ret | ) |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_AUTOSAVE_GET), \
EO_TYPECHECK(Eina_Bool *, ret)

Get whether a given prefs widget is saving its values back automatically on changes.

Parameters

  [out] | ret |

See Also
  elm_prefs_autosave_set()

Since
  1.8

Referenced by elm_prefs_autosave_get().

#define elm_obj_prefs_autosave_set | ( |  | autosave | ) |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_AUTOSAVE_SET), \
EO_TYPECHECK(Eina_Bool, autosave)

Set whether a given prefs widget should save its values back (on the user data file, if set) automatically on every UI element changes.

Parameters

  [in] | autosave |

See Also
  elm_prefs_autosave_get()

Since
  1.8

Referenced by elm_prefs_autosave_set().

#define elm_obj_prefs_data_get | ( |  | ret | ) |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_DATA_GET), \
EO_TYPECHECK(Elm_Prefs_Data **, ret)
Elm_Prefs_Data
struct _Elm_Prefs_Data Elm_Prefs_Data
An Elm Prefs Data handle.
Definition: elm_prefs_data.h:76

Retrieve user data for a given prefs widget.

Parameters

  [out] | ret |

See Also
  elm_prefs_data_get()

Since
  1.8

Referenced by elm_prefs_data_get().

#define elm_obj_prefs_data_set | ( |  | data,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_DATA_SET), \
EO_TYPECHECK(Elm_Prefs_Data *, data), \
EO_TYPECHECK(Eina_Bool *, ret)
Elm_Prefs_Data
struct _Elm_Prefs_Data Elm_Prefs_Data
An Elm Prefs Data handle.
Definition: elm_prefs_data.h:76

Set user data for a given prefs widget.

Parameters

  [in] | data |
  [out] | ret |

See Also
  elm_prefs_data_set()

Since
  1.8

Referenced by elm_prefs_data_set().

#define elm_obj_prefs_file_get | ( |  | file,
|  |  | page,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_FILE_GET), \
EO_TYPECHECK(const char **, file), \
EO_TYPECHECK(const char **, page), \
EO_TYPECHECK(Eina_Bool *, ret)

Retrieve file and page bound to a given prefs widget.

Parameters

  [out] | file |
  [out] | page |
  [out] | ret |

See Also
  elm_prefs_file_get()

Since
  1.8

Referenced by elm_prefs_file_get().

#define elm_obj_prefs_file_set | ( |  | file,
|  |  | page,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_FILE_SET), \
EO_TYPECHECK(const char *, file), \
EO_TYPECHECK(const char *, page), \
EO_TYPECHECK(Eina_Bool *, ret)

Set file and page to populate a given prefs widget's interface.

Parameters

  [in] | file |
  [in] | page |
  [out] | ret |

See Also
  elm_prefs_file_set()

Since
  1.8

Referenced by elm_prefs_file_set().

#define elm_obj_prefs_item_disabled_get | ( |  | name,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_DISABLED_GET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(Eina_Bool *, ret)

Retrieve whether the widget bound to a given prefs widget's item is disabled or not.

Parameters

  [in] | name |
  [out] | ret |

See Also
  elm_prefs_item_disabled_get()

Since
  1.8

Referenced by elm_prefs_item_disabled_get().

#define elm_obj_prefs_item_disabled_set | ( |  | name,
|  |  | disabled
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_DISABLED_SET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(Eina_Bool, disabled)

Set whether the widget bound to a given prefs widget's item is disabled or not.

Parameters

  [in] | name |
  [in] | disabled |

See Also
  elm_prefs_item_disabled_set()

Since
  1.8

Referenced by elm_prefs_item_disabled_set().

#define elm_obj_prefs_item_editable_get | ( |  | name,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_EDITABLE_GET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(Eina_Bool *, ret)

Retrieve whether the widget bound to a given prefs widget's item is editable or not.

Parameters

  [in] | name |
  [out] | ret |

See Also
  elm_prefs_item_editable_get()

Since
  1.8

Referenced by elm_prefs_item_editable_get().

#define elm_obj_prefs_item_editable_set | ( |  | name,
|  |  | editable
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_EDITABLE_SET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(Eina_Bool, editable)

Set whether the widget bound to a given prefs widget's item is editable or not.

Parameters

  [in] | name |
  [in] | editable |

See Also
  elm_prefs_item_editable_set()

Since
  1.8

Referenced by elm_prefs_item_editable_set().

#define elm_obj_prefs_item_object_get | ( |  | name,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_OBJECT_GET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(const Evas_Object **, ret)

Retrieve the Elementary widget bound to a given prefs widget's item.

Parameters

  [in] | name |
  [out] | ret |

See Also
  elm_prefs_item_value_get()

Since
  1.8

Referenced by elm_prefs_item_object_get().

#define elm_obj_prefs_item_swallow | ( |  | name,
|  |  | child,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_SWALLOW), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(Evas_Object *, child), \
EO_TYPECHECK(Eina_Bool *, ret)

"Swallows" an object into a SWALLOW item of a prefs widget.

Parameters

  [in] | name |
  [in] | child |
  [out] | ret |

See Also
  elm_prefs_item_swallow()

Since
  1.8

Referenced by elm_prefs_item_swallow().

#define elm_obj_prefs_item_unswallow | ( |  | name,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_UNSWALLOW), \
EO_TYPECHECK(const char *,name), \
EO_TYPECHECK(Evas_Object **, ret)

Unswallow an object from a SWALLOW item of a prefs widget.

Parameters

  [in] | name |
  [out] | ret |

See Also
  elm_prefs_item_unswallow()

Since
  1.8

Referenced by elm_prefs_item_unswallow().

#define elm_obj_prefs_item_value_get | ( |  | name,
|  |  | value,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_VALUE_GET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(Eina_Value *, value), \
EO_TYPECHECK(Eina_Bool *, ret)

Retrieve the value of a given prefs widget's item.

Parameters

  [in] | name |
  [out] | value |
  [out] | ret |

See Also
  elm_prefs_item_value_set()

Since
  1.8

Referenced by elm_prefs_item_value_get().

#define elm_obj_prefs_item_value_set | ( |  | name,
|  |  | value,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_VALUE_SET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(const Eina_Value *, value), \
EO_TYPECHECK(Eina_Bool *, ret)

Set the value on a given prefs widget's item.

Parameters

  [in] | name |
  [in] | value |
  [out] | ret |

See Also
  elm_prefs_item_value_get()

Since
  1.8

Referenced by elm_prefs_item_value_set().

#define elm_obj_prefs_item_visible_get | ( |  | name,
|  |  | ret
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_VISIBLE_GET), \
EO_TYPECHECK(const char *,name), \
EO_TYPECHECK(Eina_Bool *, ret)

Retrieve whether the widget bound to a given prefs widget's item is visible or not.

Parameters

  [in] | name |
  [out] | ret |

See Also
  elm_prefs_item_visible_get()

Since
  1.8

Referenced by elm_prefs_item_visible_get().

#define elm_obj_prefs_item_visible_set | ( |  | name,
|  |  | visible
| ) |  |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_ITEM_VISIBLE_SET), \
EO_TYPECHECK(const char *, name), \
EO_TYPECHECK(Eina_Bool, visible)

Set whether the widget bound to given prefs widget's item should be visible or not.

Parameters

  [in] | name |
  [in] | visible |

See Also
  elm_prefs_item_visible_set()

Since
  1.8

Referenced by elm_prefs_item_visible_set().

#define elm_obj_prefs_reset | ( |  | mode | ) |

Value:
ELM_OBJ_PREFS_ID(ELM_OBJ_PREFS_SUB_ID_RESET), \
EO_TYPECHECK(Elm_Prefs_Reset_Mode, mode)

Reset the values of a given prefs widget to a previous state.

Parameters

  [in] | mode |

Since
  1.8

Referenced by elm_prefs_reset().

## Function Documentation

Eina_Bool elm_prefs_autosave_get | ( | const Evas_Object * | prefs | ) |

Get whether a given prefs widget is saving its values back automatically on changes.

Parameters

  prefs | A valid prefs widget handle

Returns
  `EINA_TRUE` if prefs is saving automatically, `EINA_FALSE` otherwise.

See Also
  elm_prefs_autosave_set(), for more details

Since
  1.8

References elm_obj_prefs_autosave_get.

void elm_prefs_autosave_set | ( | Evas_Object * | prefs,
|  | Eina_Bool | autosave
| ) |  |

Set whether a given prefs widget should save its values back (on the user data file, if set) automatically on every UI element changes.

Parameters

  prefs | A valid prefs widget handle
  autosave | `EINA_TRUE` to save automatically, `EINA_FALSE` otherwise.

If autosave is `EINA_TRUE`, every call to elm_prefs_item_value_set(), every Elm_Prefs_Data_Event_Type::ELM_PREFS_DATA_EVENT_ITEM_CHANGED event coming for its prefs data and every UI element direct value changing will implicitly make the prefs values to be flushed back to it prefs data. If a prefs data handle with no writing permissions or no prefs data is set on prefs, naturally nothing will happen.

See Also
  elm_prefs_autosave_get()

Since
  1.8

Examples:
  prefs_example_01.c, prefs_example_02.c, and prefs_example_03.c.

References elm_obj_prefs_autosave_set.

Elm_Prefs_Data* elm_prefs_data_get | ( | const Evas_Object * | o | ) |

Retrieve user data for a given prefs widget.

Parameters

  obj | A prefs widget handle
  prefs_data | A valid prefs_data handle

Returns
  A pointer to the user data of a given prefs widget on success. `NULL` otherwise.

See Also
  elm_prefs_data_set() for more details

Since
  1.8

References elm_obj_prefs_data_get.

Eina_Bool elm_prefs_data_set | ( | Evas_Object * | obj,
|  | Elm_Prefs_Data * | data
| ) |  |

Set user data for a given prefs widget.

Parameters

  obj | A prefs widget handle
  prefs_data | A valid prefs_data handle

Returns
  `EINA_TRUE`, on success, `EINA_FALSE` otherwise

Once a prefs widget is created, after elm_prefs_file_set() is issued on it, all of its UI elements will get default values, when declared on that file. To fetch an user's own, personal set of those values, one gets to pair a prefs data handle to the prefs widget. This is what this call is intended for.

Prefs data values from prefs_data with keys matching the ones present on the file passed on elm_prefs_file_set() to obj will have their values applied to the respective UI elements of the widget.

When obj dies, the values of the elements declared on its .epb file (the one set on elm_prefs_file_set()) marked as permanent will be written back to prefs_data, if it is writable. One is also able to make this writing event to take place automatically after each UI element modification by using elm_prefs_autosave_set().

Note
  obj will keep a reference of its own for prefs_data, but you should still unreference it by yourself, after the widget is gone.

See Also
  elm_prefs_data_get()

Since
  1.8

Examples:
  prefs_example_01.c, prefs_example_02.c, and prefs_example_03.c.

References elm_obj_prefs_data_set.

Eina_Bool elm_prefs_file_get | ( | const Evas_Object * | o,
|  | const char ** | file,
|  | const char ** | page
| ) |  |

Retrieve file and page bound to a given prefs widget.

Parameters

  o | A prefs widget handle
  file | Where to store the file o is bound to
  page | Where to store the page o is bound to

Returns
  `EINA_TRUE`, on success, `EINA_FALSE` otherwise

Note
  Use `NULL` pointers on the components you're not interested in: they'll be ignored by the function.

See Also
  elm_prefs_file_set() for more information

Since
  1.8

References elm_obj_prefs_file_get.

Eina_Bool elm_prefs_file_set | ( | Evas_Object * | o,
|  | const char * | file,
|  | const char * | page
| ) |  |

Set file and page to populate a given prefs widget's interface.

Parameters

  o | A prefs widget handle
  file | The .epb (binary) file to get contents from
  page | The page, inside file, where to get item contents from

Returns
  `EINA_TRUE`, on success, `EINA_FALSE` otherwise

Elm prefs widgets start blank, with no child widgets. It's meant to have its viewport populated with child elements coming from a declaration file. That file (usually with .epb extension), is a binary format (Eet) one, coming from a human-readable textual declaration. This textual form (usually with .epc extension) is translated to the binary form by means of the prefs_cc compiler.

With this function, one thus populates a prefs widget with UI elements.

If file is `NULL`, "elm_app_data_dir_get()/preferences.epb" will be used, by default. If file is a relative path, the prefix "elm_app_data_dir_get()/" will be implicitly used with it. If page is `NULL`, it is considered "main", as default.

Warning
  If your binary is not properly installed and elm_app_data_dir_get() can't be figured out, a fallback value of "." will be tryed, instead.

See Also
  elm_prefs_file_get()

Since
  1.8

Examples:
  prefs_example_01.c, prefs_example_02.c, and prefs_example_03.c.

References elm_obj_prefs_file_set.

Eina_Bool elm_prefs_item_disabled_get | ( | const Evas_Object * | prefs,
|  | const char * | name
| ) |  |

Retrieve whether the widget bound to a given prefs widget's item is disabled or not.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to get disabled state from

Returns
  `EINA_TRUE`, if it is disabled, `EINA_FALSE` otherwise

See Also
  elm_prefs_item_disabled_set()

Since
  1.8

References elm_obj_prefs_item_disabled_get.

void elm_prefs_item_disabled_set | ( | Evas_Object * | prefs,
|  | const char * | name,
|  | Eina_Bool | disabled
| ) |  |

Set whether the widget bound to a given prefs widget's item is disabled or not.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to act on
  disabled | `EINA_TRUE`, to make it disabled, `EINA_FALSE` otherwise

See Also
  elm_prefs_item_disabled_get()

Since
  1.8

Examples:
  prefs_example_02.c.

References elm_obj_prefs_item_disabled_set.

Eina_Bool elm_prefs_item_editable_get | ( | const Evas_Object * | prefs,
|  | const char * | name
| ) |  |

Retrieve whether the widget bound to a given prefs widget's item is editable or not.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to get editable state from

Returns
  `EINA_TRUE`, if it is editable, `EINA_FALSE` otherwise

See Also
  elm_prefs_item_editable_set() for more details

Since
  1.8

References elm_obj_prefs_item_editable_get.

void elm_prefs_item_editable_set | ( | Evas_Object * | prefs,
|  | const char * | name,
|  | Eina_Bool | editable
| ) |  |

Set whether the widget bound to a given prefs widget's item is editable or not.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to act on
  editable | `EINA_TRUE`, to make it editable, `EINA_FALSE` otherwise

Note
  Only `TEXT` or `TEXTAREA` items' default widgets implement the 'editable' property. Custom registered widgets may as well implement them.

See Also
  elm_prefs_item_editable_get()

Since
  1.8

Examples:
  prefs_example_02.c.

References elm_obj_prefs_item_editable_set.

const Evas_Object* elm_prefs_item_object_get | ( | Evas_Object * | prefs,
|  | const char * | name
| ) |  |

Retrieve the Elementary widget bound to a given prefs widget's item.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to get object from

Returns
  A valid widget handle, on success, or `NULL`, otherwise

This will retrieve a handle to the real widget implementing a given item of prefs, for read-only actions.

Warning
  You should never modify the state of the returned widget, because it's meant to be managed by prefs, solely.

See Also
  elm_prefs_item_value_set()

Since
  1.8

References elm_obj_prefs_item_object_get.

Eina_Bool elm_prefs_item_swallow | ( | Evas_Object * | obj,
|  | const char * | name,
|  | Evas_Object * | child
| ) |  |

"Swallows" an object into a SWALLOW item of a prefs widget.

Parameters

  obj | A valid prefs widget handle
  name | the name of the SWALLOW item (as declared in the prefs collection)
  child | The object to occupy the item

Returns
  `EINA_TRUE`, on success, `EINA_FALSE` otherwise

See Also
  elm_prefs_item_swallow() for more details

Since
  1.8

Examples:
  prefs_example_03.c.

References elm_obj_prefs_item_swallow.

Evas_Object* elm_prefs_item_unswallow | ( | Evas_Object * | obj,
|  | const char * | name
| ) |  |

Unswallow an object from a SWALLOW item of a prefs widget.

Parameters

  obj | A valid prefs widget handle
  name | the name of the SWALLOW item (as declared in the prefs collection)

Returns
  The unswallowed object, or NULL on errors

See Also
  elm_prefs_item_unswallow() for more details

Since
  1.8

References elm_obj_prefs_item_unswallow.

Eina_Bool elm_prefs_item_value_get | ( | const Evas_Object * | prefs,
|  | const char * | name,
|  | Eina_Value * | value
| ) |  |

Retrieve the value of a given prefs widget's item.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to get value from
  value | Where to store the value of the item. It will be overwritten and setup with the type the item is bound to

Returns
  `EINA_TRUE`, on success, `EINA_FALSE` otherwise

This will retrieve the value of item named name.

See Also
  elm_prefs_item_value_set()

Since
  1.8

Examples:
  prefs_example_03.c.

References elm_obj_prefs_item_value_get.

Eina_Bool elm_prefs_item_value_set | ( | Evas_Object * | prefs,
|  | const char * | name,
|  | const Eina_Value * | value
| ) |  |

Set the value on a given prefs widget's item.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection)
  value | The value to set on the item. It should be typed as the item expects, preferably, or a conversion will take place

Returns
  `EINA_TRUE`, on success, `EINA_FALSE` otherwise

This will change the value of item named name programatically.

See Also
  elm_prefs_item_value_get()

Since
  1.8

References elm_obj_prefs_item_value_set.

Eina_Bool elm_prefs_item_visible_get | ( | const Evas_Object * | prefs,
|  | const char * | name
| ) |  |

Retrieve whether the widget bound to a given prefs widget's item is visible or not.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to get visibility state from

Returns
  `EINA_TRUE`, if it is visible, `EINA_FALSE` otherwise

See Also
  elm_prefs_item_visible_set() for more details

Since
  1.8

References elm_obj_prefs_item_visible_get.

void elm_prefs_item_visible_set | ( | Evas_Object * | prefs,
|  | const char * | name,
|  | Eina_Bool | visible
| ) |  |

Set whether the widget bound to given prefs widget's item should be visible or not.

Parameters

  prefs | A valid prefs widget handle
  name | The name of the item (as declared in the prefs collection) to change visibility of
  visible | `EINA_TRUE`, to make it visible, `EINA_FALSE` otherwise

Each prefs item may have a default visibility state, declared on the ``.epb prefs it was loaded with. By this call one may alter that state, programatically.

See Also
  elm_prefs_item_visible_get()

Since
  1.8

Examples:
  prefs_example_02.c.

References elm_obj_prefs_item_visible_set.

void elm_prefs_reset | ( | Evas_Object * | prefs,
|  | Elm_Prefs_Reset_Mode | mode
| ) |  |

Reset the values of a given prefs widget to a previous state.

Parameters

  prefs | A valid prefs widget handle
  mode | The reset mode to apply on prefs

As can be seen on #Elm_Prefs_Reset_Mode, there are two possible actions to be taken by this call – either to reset prefs' values to the defaults (declared on the ``.epb file it is bound to) or to reset to the state they were before the last modification it got.

Since
  1.8

References elm_obj_prefs_reset.

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