_Elm_Prefs_Item_Iface Struct Reference

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Data Fields
_Elm_Prefs_Item_Iface Struct Reference
Elementary » Elementary Prefs

Interface between items of the Prefs widget and the real widgets implementing them. More...

`#include <elm_prefs_common.h>`

## Data Fields
unsigned int | abi_version
| always use:
const Elm_Prefs_Item_Type * | types
| types of prefs items supported by the widget, ELM_PREFS_TYPE_UNKNOWN terminated
Evas_Object *(* | add )(const Elm_Prefs_Item_Iface *iface, Evas_Object *prefs, const Elm_Prefs_Item_Type type, const Elm_Prefs_Item_Spec spec, Elm_Prefs_Item_Changed_Cb it_changed_cb)
| Function to instantiate the item widget.
Eina_Bool(* | value_set )(Evas_Object *obj, Eina_Value *value)
| Function to set the value on the item widget.
Eina_Bool(* | value_get )(Evas_Object *obj, Eina_Value *value)
| Function to set the value on the item widget.
Eina_Bool(* | value_validate )(Evas_Object *obj)
Eina_Bool(* | label_set )(Evas_Object *obj, const char *label)
| < Function to validate the value from the item widget before saving it.
Eina_Bool(* | icon_set )(Evas_Object *obj, const char *icon)
| function to set an icon on the item widget
Eina_Bool(* | editable_set )(Evas_Object *obj, Eina_Bool val)
| function to set an item widget as editable or not
Eina_Bool(* | editable_get )(Evas_Object *obj)
| function to retrieve whether an item widget is editable or not
Eina_Bool(* | expand_want )(Evas_Object *obj)
| function to get whether the item implementation needs to be expanded in the page's longitudinal axis or not

## Detailed Description

Interface between items of the Prefs widget and the real widgets implementing them.

This structure defines the interface between the Prefs widget's items (all item types in Elementary prefs collections but the `PAGE` one) and Elementary widgets implementing them. `add()` is the only mandatory function an item widget has to implement.

Note
  For items of type `PAGE`, refer to Elm_Prefs_Page_Iface.

Since
  1.8

## Field Documentation

## ◆ abi_version

unsigned int _Elm_Prefs_Item_Iface::abi_version

always use:

- ELM_PREFS_ITEM_IFACE_ABI_VERSION to declare.
- elm_prefs_widget_iface_abi_version_get() to check.

Referenced by elm_prefs_item_iface_register().

## ◆ add

Evas_Object *(* _Elm_Prefs_Item_Iface::add) (const Elm_Prefs_Item_Iface *iface, Evas_Object *prefs, const Elm_Prefs_Item_Type type, const Elm_Prefs_Item_Spec spec, Elm_Prefs_Item_Changed_Cb it_changed_cb)

Function to instantiate the item widget.

It must return the widget handle, which should be the `obj` argument on the functions which follow. That object argument, by the way, should always have their respective Elm_Prefs_Item_Node handle accessible via a `"prefs_item"` Evas object data value. The return value of the following functions should be `EINA_TRUE`, on success or `EINA_FALSE`, otherwise.

## ◆ value_set

Eina_Bool(* _Elm_Prefs_Item_Iface::value_set) (Evas_Object *obj, Eina_Value *value)

Function to set the value on the item widget.

Note that for items of type ELM_PREFS_TYPE_SEPARATOR, this function has a special meaning of making the separator widget a horizontal one

## ◆ value_get

Eina_Bool(* _Elm_Prefs_Item_Iface::value_get) (Evas_Object *obj, Eina_Value *value)

Function to set the value on the item widget.

Note that for items of type ELM_PREFS_TYPE_SEPARATOR, this function has a special meaning of making the separator widget a vertical one

## ◆ label_set

Eina_Bool(* _Elm_Prefs_Item_Iface::label_set) (Evas_Object *obj, const char *label)

< Function to validate the value from the item widget before saving it.

The return value of the following function should be `EINA_TRUE`, if the value conforms with the expected or `EINA_FALSE`, otherwise. function to set a label on the item widget