General

Macros | Typedefs | Enumerations | Functions | Variables
General

General Elementary API. More...

## Macros
#define | ELM_MAIN() int main(int argc, char **argv) { int ret; _elm_startup_time = ecore_time_unix_get(); elm_init(argc, argv); ret = elm_main(argc, argv); elm_shutdown(); return ret; }
| macro to be used after the elm_main() function
#define | elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
| Macro to set a label of an object item. More...

## Typedefs
typedef Eina_Bool(* | Elm_Event_Cb) (void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info)
| Function prototype definition for callbacks on input events happening on Elementary widgets. More...
typedef Eo | Elm_Object_Item
| An Elementary Object item handle.
typedef void(* | Elm_Object_Item_Signal_Cb) (void *data, Elm_Object_Item *it, const char *emission, const char *source)
| Elm_Object_Item Signal Callback functions' prototype definition. More...

## Enumerations
enum | Elm_Object_Layer { ELM_OBJECT_LAYER_BACKGROUND = EVAS_LAYER_MIN + 64, ELM_OBJECT_LAYER_DEFAULT = 0, ELM_OBJECT_LAYER_FOCUS = EVAS_LAYER_MAX - 128, ELM_OBJECT_LAYER_TOOLTIP = EVAS_LAYER_MAX - 64, ELM_OBJECT_LAYER_CURSOR = EVAS_LAYER_MAX - 32, ELM_OBJECT_LAYER_LAST }
| Defines couple of standard Evas_Object layers to be used with evas_object_layer_set(). More...

## Functions
EINA_DEPRECATED void | elm_object_domain_translatable_text_part_set (Evas_Object *obj, const char *part, const char *domain, const char *text)
| Set the text for an object's part, marking it as translatable. More...
EINA_DEPRECATED const char * | elm_object_translatable_text_part_get (const Evas_Object *obj, const char *part)
| Get the original string set as translatable for an object. More...
int | elm_init (int argc, char **argv)
| Initialize Elementary. More...
int | elm_shutdown (void)
| Shut down Elementary. More...
void | elm_run (void)
| Run Elementary's main loop. More...
void | elm_exit (void)
| Ask to exit Elementary's main loop. More...
void | elm_quicklaunch_mode_set (Eina_Bool ql_on)
| Exposed symbol used only by macros and should not be used by apps.
Eina_Bool | elm_quicklaunch_mode_get (void)
| Exposed symbol used only by macros and should not be used by apps.
int | elm_quicklaunch_init (int argc, char **argv)
| Exposed symbol used only by macros and should not be used by apps.
int | elm_quicklaunch_sub_init (int argc, char **argv)
| Exposed symbol used only by macros and should not be used by apps.
int | elm_quicklaunch_sub_shutdown (void)
| Exposed symbol used only by macros and should not be used by apps.
int | elm_quicklaunch_shutdown (void)
| Exposed symbol used only by macros and should not be used by apps.
void | elm_quicklaunch_seed (void)
| Exposed symbol used only by macros and should not be used by apps.
Eina_Bool | elm_quicklaunch_prepare (int argc, char **argv, const char *cwd)
| Exposed symbol used only by macros and should not be used by apps.
Eina_Bool | elm_quicklaunch_fork (int argc, char **argv, char *cwd, void(*postfork_func)(void *data), void *postfork_data)
| Exposed symbol used only by macros and should not be used by apps.
void | elm_quicklaunch_cleanup (void)
| Exposed symbol used only by macros and should not be used by apps.
int | elm_quicklaunch_fallback (int argc, char **argv)
| Exposed symbol used only by macros and should not be used by apps.
char * | elm_quicklaunch_exe_path_get (const char *exe, const char *cwd)
| Exposed symbol used only by macros and should not be used by apps.
Eina_Bool | elm_policy_set (unsigned int policy, int value)
| Set a new policy's value (for a given policy group/identifier). More...
int | elm_policy_get (unsigned int policy)
| Get the policy value for given policy identifier. More...
void | elm_language_set (const char *lang)
| Change the language of the current application. More...
Elm_Process_State | elm_process_state_get (void)
| The state of the process as a whole. More...
void | elm_object_part_text_set (Evas_Object *obj, const char *part, const char *text)
| Set a text of an object. More...
const char * | elm_object_part_text_get (const Evas_Object *obj, const char *part)
| Get a text of an object. More...
void | elm_object_domain_translatable_part_text_set (Evas_Object *obj, const char *part, const char *domain, const char *text)
| Set the text for an object's part, marking it as translatable. More...
const char * | elm_object_translatable_part_text_get (const Evas_Object *obj, const char *part)
| Get the original string set as translatable for an object. More...
void | elm_object_domain_part_text_translatable_set (Evas_Object *obj, const char *part, const char *domain, Eina_Bool translatable)
| Mark the part text to be translatable or not. More...
void | elm_object_part_content_set (Evas_Object *obj, const char *part, Evas_Object *content)
| Set the content on part of a given container widget. More...
Evas_Object * | elm_object_part_content_get (const Evas_Object *obj, const char *part)
| Get the content on a part of a given container widget. More...
Evas_Object * | elm_object_part_content_unset (Evas_Object *obj, const char *part)
| Unset the content on a part of a given container widget. More...
void | elm_object_access_info_set (Evas_Object *obj, const char *txt)
| Set the text to read out when in accessibility mode. More...
const char * | elm_object_access_info_get (Evas_Object *obj)
| Get the text to read out when in accessibility mode. More...
Evas_Object * | elm_object_name_find (const Evas_Object *obj, const char *name, int recurse)
| Get a named object from the children. More...
void | elm_object_disabled_set (Evas_Object *obj, Eina_Bool disabled)
| Set the disabled state of an Elementary object. More...
Eina_Bool | elm_object_disabled_get (const Evas_Object *obj)
| Get the disabled state of an Elementary object. More...
void | elm_object_signal_emit (Evas_Object *obj, const char *emission, const char *source)
| Send a signal to the widget edje object. More...
void | elm_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
| Add a callback for a signal emitted by widget edje object. More...
void * | elm_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func)
| Remove a signal-triggered callback from a widget edje object. More...
void | elm_object_event_callback_add (Evas_Object *obj, Elm_Event_Cb func, const void *data)
| Add a callback for input events (key up, key down, mouse wheel) on a given Elementary widget. More...
void * | elm_object_event_callback_del (Evas_Object *obj, Elm_Event_Cb func, const void *data)
| Remove an event callback from a widget. More...
void | elm_object_orientation_mode_disabled_set (Evas_Object *obj, Eina_Bool disabled)
| Disable the orientation mode of a given widget. More...
Eina_Bool | elm_object_orientation_mode_disabled_get (const Evas_Object *obj)
| Get the orientation mode of a given widget. More...
void * | elm_object_item_data_get (const Elm_Object_Item *it)
| Get the data associated with an object item. More...
void | elm_object_item_data_set (Elm_Object_Item *it, void *data)
| Set the data associated with an object item. More...

## Variables
int | ELM_EVENT_CONFIG_ALL_CHANGED
| Emitted when the application has reconfigured elementary settings due to an external configuration tool asking it to.
int | ELM_EVENT_POLICY_CHANGED
| Emitted when any Elementary's policy value is changed.
int | ELM_EVENT_PROCESS_BACKGROUND
| Emitted when nothing is visible and the process as a whole should go into a background state. More...
int | ELM_EVENT_PROCESS_FOREGROUND
| Emitted when going from nothing being visible to at least one window being visible. More...

## Detailed Description

General Elementary API.

Functions that don't relate to Elementary objects specifically.

Here are documented functions which init/shutdown the library, that apply to generic Elementary objects, that deal with configuration, et cetera.

This example contemplates some of these functions.

## Macro Definition Documentation

## ◆ elm_object_item_text_set

#define elm_object_item_text_set | ( |  | it,
|  |  | label
| ) |  | elm_object_item_part_text_set((it), NULL, (label))

Macro to set a label of an object item.

Parameters

  it | The Elementary object item.
  label | The new text of the label.

Note
  Elementary object items may have many labels.

Examples:
  popup_example_03.c, segment_control_example.c, and web_example_02.c.

Referenced by elm_menu_parent_get().

## Typedef Documentation

## ◆ Elm_Event_Cb

typedef Eina_Bool(* Elm_Event_Cb) (void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info)

Function prototype definition for callbacks on input events happening on Elementary widgets.

data will receive the user data pointer passed to elm_object_event_callback_add(). src will be a pointer to the widget on which the input event took place. type will get the type of this event and event_info, the struct with details on this event.

## ◆ Elm_Object_Item_Signal_Cb

Elm_Object_Item_Signal_Cb

Elm_Object_Item Signal Callback functions' prototype definition.

`data` will have the auxiliary data pointer at the time the callback registration. `it` will be a pointer the Elm_Object_Item that have the edje object where the signal comes from. `emission` will identify the exact signal's emission string and `source` the exact signal's source one.

See also
  elm_object_item_signal_callback_add()

Since
  1.8

## Enumeration Type Documentation

## ◆ Elm_Object_Layer

enum Elm_Object_Layer

Defines couple of standard Evas_Object layers to be used with evas_object_layer_set().

Note
  whenever extending with new values, try to keep some padding to siblings so there is room for further extensions.

Enumerator
ELM_OBJECT_LAYER_BACKGROUND | where to place backgrounds
ELM_OBJECT_LAYER_DEFAULT | Evas_Object default layer (and thus for Elementary)
ELM_OBJECT_LAYER_FOCUS | where focus object visualization is
ELM_OBJECT_LAYER_TOOLTIP | where to show tooltips
ELM_OBJECT_LAYER_CURSOR | where to show cursors
ELM_OBJECT_LAYER_LAST | last layer known by Elementary

## Function Documentation

## ◆ elm_exit()

void elm_exit | ( | void |  | ) |

Ask to exit Elementary's main loop.

If this call is issued, it will flag the main loop to cease processing and return back to its parent function (usually your elm_main() function). This does not mean the main loop instantly quits. So your ecore callbacks(timer, animator, event, job, and etc.) have chances to be called even after elm_exit().

See also
  elm_init() for an example. There, just after a request to close the window comes, the main loop will be left.

Note
  By using the appropriate #ELM_POLICY_QUIT on your Elementary applications, you'll be able to get this function called automatically for you.

Examples:
  button_example_00.c, efl_thread_4.c, efl_thread_5.c, fileselector_example.c, glview_example_01.c, progressbar_example.c, and win_example.c.

References elm_policy_get().

## ◆ elm_init()

int elm_init | ( | int | argc,
|  | char ** | argv
| ) |  |

Initialize Elementary.

Parameters

  [in] | argc | System's argument count value
  [in] | argv | System's pointer to array of argument strings

Returns
  The init counter value.

This function initializes Elementary and increments a counter of the number of calls to it. It returns the new counter's value.

Warning
  This call is exported only for use by the `ELM_MAIN()` macro. There is no need to use this if you use this macro (which is highly advisable). An elm_main() should contain the entry point code for your application, having the same prototype as elm_init(), and not being static (putting the `EAPI_MAIN` symbol in front of its type declaration is advisable). The `ELM_MAIN()` call should be placed just after it.

Example:

ELM_MAIN()

See the full example.

See also
  elm_shutdown().

References elm_quicklaunch_init(), and elm_quicklaunch_sub_init().

## ◆ elm_language_set()

void elm_language_set | ( | const char * | lang | ) |

Change the language of the current application.

The `lang` passed must be the full name of the locale to use, for example "en_US.utf8" or "es_ES@euro".

Changing language with this function will make Elementary run through all its widgets, translating strings set with elm_object_domain_translatable_part_text_set(). This way, an entire UI can have its language changed without having to restart the program.

For more complex cases, like having formatted strings that need translation, widgets will also emit a "language,changed" signal that the user can listen to and manually translate the text.

Parameters

  lang | Language to set, must be the full name of the locale

## ◆ elm_object_access_info_get()

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

Get the text to read out when in accessibility mode.

Parameters

  obj | The object which is to be described

Returns
  The text that describes the widget to people with poor or no vision

Since
  1.14

## ◆ elm_object_access_info_set()

void elm_object_access_info_set | ( | Evas_Object * | obj,
|  | const char * | txt
| ) |  |

Set the text to read out when in accessibility mode.

Parameters

  obj | The object which is to be described
  txt | The text that describes the widget to people with poor or no vision

## ◆ elm_object_disabled_get()

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

Get the disabled state of an Elementary object.

Parameters

  obj | The Elementary object to operate on

Returns
  `EINA_TRUE`, if the widget is disabled, `EINA_FALSE` if it's enabled (or on errors)

This gets the state of the widget, which might be enabled or disabled.

Referenced by elm_fileselector_is_save_get(), and elm_object_item_data_get().

## ◆ elm_object_disabled_set()

void elm_object_disabled_set | ( | Evas_Object * | obj,
|  | Eina_Bool | disabled
| ) |  |

Set the disabled state of an Elementary object.

Parameters

  obj | The Elementary object to operate on
  disabled | The state to put in in: `EINA_TRUE` for disabled, `EINA_FALSE` for enabled

Elementary objects can be disabled, in which state they won't receive input and, in general, will be themed differently from their normal state, usually greyed out. Useful for contexts where you don't want your users to interact with some of the parts of you interface.

This sets the state for the widget, either disabling it or enabling it back.

Referenced by elm_fileselector_is_save_set().

## ◆ elm_object_domain_part_text_translatable_set()

void elm_object_domain_part_text_translatable_set | ( | Evas_Object * | obj,
|  | const char * | part,
|  | const char * | domain,
|  | Eina_Bool | translatable
| ) |  |

Mark the part text to be translatable or not.

Once you mark the part text to be translatable, the text will be translated internally regardless of elm_object_part_text_set() and elm_object_domain_translatable_part_text_set(). In other case, if you set the Elementary policy that all text will be translatable in default, you can set the part text to not be translated by calling this API.

Parameters

  obj | The object containing the text part
  part | The part name of the translatable text
  domain | The translation domain to use
  translatable | `EINA_TRUE`, the part text will be translated internally. `EINA_FALSE`, otherwise.

See also
  elm_object_domain_translatable_part_text_set()
  elm_object_part_text_set()
  elm_policy()

Since
  1.8

## ◆ elm_object_domain_translatable_part_text_set()

void elm_object_domain_translatable_part_text_set | ( | Evas_Object * | obj,
|  | const char * | part,
|  | const char * | domain,
|  | const char * | text
| ) |  |

Set the text for an object's part, marking it as translatable.

The string to set as `text` must be the original one. Do not pass the return of `gettext()` here. Elementary will translate the string internally and set it on the object using elm_object_part_text_set(), also storing the original string so that it can be automatically translated when the language is changed with elm_language_set().

The `domain` will be stored along to find the translation in the correct catalog. It can be NULL, in which case it will use whatever domain was set by the application with `textdomain()`. This is useful in case you are building a library on top of Elementary that will have its own translatable strings, that should not be mixed with those of programs using the library.

Parameters

  obj | The object containing the text part
  part | The name of the part to set
  domain | The translation domain to use
  text | The original, non-translated text to set

Since
  1.8

Referenced by elm_object_domain_translatable_text_part_set().

## ◆ elm_object_domain_translatable_text_part_set()

EINA_DEPRECATED void elm_object_domain_translatable_text_part_set | ( | Evas_Object * | obj,
|  | const char * | part,
|  | const char * | domain,
|  | const char * | text
| ) |  |

Set the text for an object's part, marking it as translatable.

The string to set as `text` must be the original one. Do not pass the return of `gettext()` here. Elementary will translate the string internally and set it on the object using elm_object_part_text_set(), also storing the original string so that it can be automatically translated when the language is changed with elm_language_set().

The `domain` will be stored along to find the translation in the correct catalog. It can be NULL, in which case it will use whatever domain was set by the application with `textdomain()`. This is useful in case you are building a library on top of Elementary that will have its own translatable strings, that should not be mixed with those of programs using the library.

Parameters

  obj | The object containing the text part
  part | The name of the part to set
  domain | The translation domain to use
  text | The original, non-translated text to set

Deprecated:
  Use elm_object_domain_translatable_part_text_set() instead.

References elm_object_domain_translatable_part_text_set().

## ◆ elm_object_event_callback_add()

void elm_object_event_callback_add | ( | Evas_Object * | obj,
|  | Elm_Event_Cb | func,
|  | const void * | data
| ) |  |

Add a callback for input events (key up, key down, mouse wheel) on a given Elementary widget.

Parameters

  obj | The widget to add an event callback on
  func | The callback function to be executed when the event happens
  data | Data to pass in to `func`

Every widget in an Elementary interface set to receive focus, with elm_object_focus_allow_set(), will propagate all of its key up, key down and mouse wheel input events up to its parent object, and so on. All of the focusable ones in this chain which had an event callback set, with this call, will be able to treat those events. There are two ways of making the propagation of these event upwards in the tree of widgets to cease:

- Just return `EINA_TRUE` on `func`. `EINA_FALSE` will mean the event was not processed, so the propagation will go on.
- The `event_info` pointer passed to `func` will contain the event's structure and, if you OR its `event_flags` inner value to `EVAS_EVENT_FLAG_ON_HOLD`, you're telling Elementary one has already handled it, thus killing the event's propagation, too.

Note
  Your event callback will be issued on those events taking place only if no other child widget of `obj` has consumed the event already.
  Not to be confused with `evas_object_event_callback_add()`, which will add event callbacks per type on general Evas objects (no event propagation infrastructure taken in account).
  Not to be confused with `elm_object_signal_callback_add()`, which will add callbacks to signals coming from a widget's theme, not input events.
  Not to be confused with `edje_object_signal_callback_add()`, which does the same as elm_object_signal_callback_add(), but directly on an Edje object.
  Not to be confused with `evas_object_smart_callback_add()`, which adds callbacks to smart objects' smart events, and not input events.

See also
  elm_object_event_callback_del()

## ◆ elm_object_event_callback_del()

void* elm_object_event_callback_del | ( | Evas_Object * | obj,
|  | Elm_Event_Cb | func,
|  | const void * | data
| ) |  |

Remove an event callback from a widget.

This function removes a callback, previously attached to event emission by the `obj`. The parameters func and data must match exactly those passed to a previous call to elm_object_event_callback_add(). The data pointer that was passed to this call will be returned.

Parameters

  obj | The object
  func | The callback function to be executed when the event is emitted.
  data | Data to pass in to the callback function.

Returns
  The data pointer

## ◆ elm_object_item_data_get()

void* elm_object_item_data_get | ( | const Elm_Object_Item * | it | ) |

Get the data associated with an object item.

Parameters

  it | The Elementary object item

Returns
  The data associated with `it`

Note
  Every elm_object_item supports this API

Examples:
  entry_example.c, gengrid_example.c, genlist_example_05.c, index_example_01.c, index_example_02.c, and slideshow_example.c.

References elm_label_add(), elm_object_cursor_get(), elm_object_cursor_style_get(), elm_object_cursor_style_set(), elm_object_cursor_theme_search_enabled_get(), elm_object_cursor_theme_search_enabled_set(), elm_object_cursor_unset(), elm_object_disabled_get(), elm_object_focus_allow_get(), elm_object_focus_get(), elm_object_focus_set(), elm_object_signal_callback_add(), elm_object_style_set(), elm_object_tooltip_style_get(), elm_object_tooltip_style_set(), elm_object_tooltip_unset(), elm_object_tooltip_window_mode_get(), elm_object_tooltip_window_mode_set(), elm_object_widget_check(), _Elm_Widget_Smart_Data::on_create, _Elm_Widget_Smart_Data::on_destroy, _Elm_Widget_Smart_Data::parent_obj, _Elm_Widget_Smart_Data::resize_obj, and _Elm_Widget_Smart_Data::subobjs.

## ◆ elm_object_item_data_set()

void elm_object_item_data_set | ( | Elm_Object_Item * | it,
|  | void * | data
| ) |  |

Set the data associated with an object item.

Parameters

  it | The Elementary object item
  data | The data to be associated with `it`

Note
  Every elm_object_item supports this API

## ◆ elm_object_name_find()

Evas_Object* elm_object_name_find | ( | const Evas_Object * | obj,
|  | const char * | name,
|  | int | recurse
| ) |  |

Get a named object from the children.

Parameters

  obj | The parent object whose children to look at
  name | The name of the child to find
  recurse | Set to the maximum number of levels to recurse (0 == none, 1 is only look at 1 level of children etc.)

Returns
  The found object of that name, or NULL if none is found

This function searches the children (or recursively children of children and so on) of the given `obj` object looking for a child with the name of `name`. If the child is found the object is returned, or NULL is returned. You can set the name of an object with evas_object_name_set(). If the name is not unique within the child objects (or the tree is `recurse` is greater than 0) then it is undefined as to which child of that name is returned, so ensure the name is unique amongst children. If recurse is set to -1 it will recurse without limit.

## ◆ elm_object_orientation_mode_disabled_get()

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

Get the orientation mode of a given widget.

Parameters

  obj | The Elementary widget to query for its orientation mode.

Returns
  `EINA_TRUE`, if the orientation mode is disabled, `EINA_FALSE` if the orientation mode is enabled (or on errors)

See also
  elm_object_orientation_mode_disabled_set()

Since
  1.8

## ◆ elm_object_orientation_mode_disabled_set()

void elm_object_orientation_mode_disabled_set | ( | Evas_Object * | obj,
|  | Eina_Bool | disabled
| ) |  |

Disable the orientation mode of a given widget.

Orientation Mode is used for widgets to change it's styles or to send signals whenever it's window degree is changed. If the orientation mode is enabled and the widget has different looks and styles for the window degree(0, 90, 180, 270), it will apply a style that is readied for the current degree, otherwise, it will send signals to it's own edje to change it's states if the style doesn't be readied.

Parameters

  obj | The Elementary object to operate on orientation mode.
  disabled | The state to put in in: `EINA_TRUE` for disabled, `EINA_FALSE` for enabled.

Since
  1.8

## ◆ elm_object_part_content_get()

Evas_Object* elm_object_part_content_get | ( | const Evas_Object * | obj,
|  | const char * | part
| ) |  |

Get the content on a part of a given container widget.

Parameters

  obj | The Elementary container widget
  part | The container's part name to get (some might accept `NULL` for the default part)

Returns
  content of the object at the given part or `NULL`, on errors

See also
  elm_object_part_content_set() for more details

## ◆ elm_object_part_content_set()

void elm_object_part_content_set | ( | Evas_Object * | obj,
|  | const char * | part,
|  | Evas_Object * | content
| ) |  |

Set the content on part of a given container widget.

Parameters

  obj | The Elementary container widget
  part | The container's part name to set (some might accept `NULL` for the default part)
  content | The new content for that part

All widgets deriving from the The Elementary Container Class may hold child objects as content at given parts. This sets new content to a given part. If any object was already set as a content object in the same part, the previous object will be deleted automatically with this call. If the `content` is NULL, this call will just delete the previous object. If the If you wish to preserve it, issue elm_object_part_content_unset() on it first.

See also
  elm_object_part_content_get()

## ◆ elm_object_part_content_unset()

Evas_Object* elm_object_part_content_unset | ( | Evas_Object * | obj,
|  | const char * | part
| ) |  |

Unset the content on a part of a given container widget.

Parameters

  obj | The Elementary container widget
  part | The container's part name to unset (some might accept `NULL` for the default part)

Returns
  content of the object at the given part or `NULL`, on errors

See also
  elm_object_part_content_set() for more details

## ◆ elm_object_part_text_get()

const char* elm_object_part_text_get | ( | const Evas_Object * | obj,
|  | const char * | part
| ) |  |

Get a text of an object.

Parameters

  obj | The Elementary object
  part | The text part name to get (NULL for the default part)

Returns
  text of the part or NULL for any error

Note
  Elementary objects may have many text parts (e.g. Action Slider)

## ◆ elm_object_part_text_set()

void elm_object_part_text_set | ( | Evas_Object * | obj,
|  | const char * | part,
|  | const char * | text
| ) |  |

Set a text of an object.

Parameters

  obj | The Elementary object
  part | The text part name to set (NULL for the default part)
  text | The new text of the part

Note
  Elementary objects may have many text parts (e.g. Action Slider)

## ◆ elm_object_signal_callback_add()

void elm_object_signal_callback_add | ( | Evas_Object * | obj,
|  | const char * | emission,
|  | const char * | source,
|  | Edje_Signal_Cb | func,
|  | void * | data
| ) |  |

Add a callback for a signal emitted by widget edje object.

This function connects a callback function to a signal emitted by the edje object of the obj. Globs can occur in either the emission or source name.

Parameters

  obj | The object
  emission | The signal's name.
  source | The signal's source.
  func | The callback function to be executed when the signal is emitted.
  data | A pointer to data to pass to the callback function.

Referenced by elm_object_item_data_get().

## ◆ elm_object_signal_callback_del()

void* elm_object_signal_callback_del | ( | Evas_Object * | obj,
|  | const char * | emission,
|  | const char * | source,
|  | Edje_Signal_Cb | func
| ) |  |

Remove a signal-triggered callback from a widget edje object.

Parameters

  obj | The object handle
  emission | The signal's name.
  source | The signal's source.
  func | The callback function to be executed when the signal is emitted.

Returns
  The data pointer of the signal callback or `NULL`, on errors.

This function removes the last callback, previously attached to a signal emitted by an underlying Edje object of obj, whose parameters emission, source and `func` match exactly with those passed to a previous call to elm_object_signal_callback_add(). The data pointer that was passed to this call will be returned.

## ◆ elm_object_signal_emit()

void elm_object_signal_emit | ( | Evas_Object * | obj,
|  | const char * | emission,
|  | const char * | source
| ) |  |

Send a signal to the widget edje object.

This function sends a signal to the edje object of the obj. An edje program can respond to a signal by specifying matching 'signal' and 'source' fields.

Parameters

  obj | The object
  emission | The signal's name.
  source | The signal's source.

Referenced by elm_naviframe_add().

## ◆ elm_object_translatable_part_text_get()

const char* elm_object_translatable_part_text_get | ( | const Evas_Object * | obj,
|  | const char * | part
| ) |  |

Get the original string set as translatable for an object.

When setting translated strings, the function elm_object_part_text_get() will return the translation returned by `gettext()`. To get the original string use this function.

Parameters

  obj | The object
  part | The name of the part that was set

Returns
  The original, untranslated string

See also
  elm_object_translatable_part_text_set()

Since
  1.8

Referenced by elm_object_translatable_text_part_get().

## ◆ elm_object_translatable_text_part_get()

EINA_DEPRECATED const char* elm_object_translatable_text_part_get | ( | const Evas_Object * | obj,
|  | const char * | part
| ) |  |

Get the original string set as translatable for an object.

When setting translated strings, the function elm_object_part_text_get() will return the translation returned by `gettext()`. To get the original string use this function.

Parameters

  obj | The object
  part | The name of the part that was set

Returns
  The original, untranslated string

Deprecated:
  Use elm_object_translatable_part_text_get() instead.

References elm_object_translatable_part_text_get().

## ◆ elm_policy_get()

int elm_policy_get | ( | unsigned int | policy | ) |

Get the policy value for given policy identifier.

Parameters

  policy | policy identifier, as in #Elm_Policy.

Returns
  The currently set policy value, for that identifier. Will be `0` if `policy` passed is invalid.

Referenced by elm_exit(), and elm_process_state_get().

## ◆ elm_policy_set()

Eina_Bool elm_policy_set | ( | unsigned int | policy,
|  | int | value
| ) |  |

Set a new policy's value (for a given policy group/identifier).

Parameters

  policy | policy identifier, as in Elm_Policy.
  value | policy value, which depends on the identifier

Returns
  `EINA_TRUE` on success or `EINA_FALSE`, on error.

Elementary policies define applications' behavior, somehow. These behaviors are divided in policy groups (see #Elm_Policy enumeration). This call will emit the Ecore event ELM_EVENT_POLICY_CHANGED, which can be hooked at with handlers. An #Elm_Event_Policy_Changed struct will be passed, then.

Note
  Currently, we have only one policy identifier/group (#ELM_POLICY_QUIT), which has two possible values.

Examples:
  actionslider_example_01.c, bg_example_01.c, bg_example_02.c, bg_example_03.c, box_example_02.c, bubble_example_01.c, button_example_00.c, button_example_01.c, calendar_example_01.c, calendar_example_02.c, calendar_example_03.c, calendar_example_04.c, calendar_example_05.c, calendar_example_06.c, check_example_01.c, clock_example.c, codegen_example.c, colorselector_example_01.c, combobox_example_01.c, conformant_example_01.c, conformant_example_02.c, ctxpopup_example_01.c, datetime_example.c, dayselector_example.c, diskselector_example_01.c, diskselector_example_02.c, efl_thread_3.c, efl_thread_4.c, efl_thread_5.c, efl_thread_6.c, efl_thread_win32_1.c, efl_thread_win32_2.c, efl_thread_win32_3.c, efl_thread_win32_4.c, entry_example.c, fileselector_button_example.c, fileselector_entry_example.c, fileselector_example.c, flip_example_01.c, flipselector_example.c, frame_example_01.c, general_funcs_example.c, gengrid_example.c, genlist_example_01.c, genlist_example_02.c, genlist_example_03.c, genlist_example_04.c, genlist_example_05.c, glview_example_01.c, hover_example_01.c, hoversel_example_01.c, icon_example_01.c, image_example_01.c, index_example_01.c, index_example_02.c, inwin_example.c, label_example_01.c, layout_example_01.c, layout_example_02.c, layout_example_03.c, list_example_01.c, list_example_02.c, list_example_03.c, location_example_01.c, map_example_01.c, map_example_02.c, map_example_03.c, mapbuf_example.c, menu_example_01.c, naviframe_example.c, notify_example_01.c, panel_example_01.c, panes_example.c, photocam_example_01.c, popup_example_01.c, popup_example_02.c, popup_example_03.c, prefs_example_01.c, prefs_example_02.c, prefs_example_03.c, radio_example_01.c, scroller_example_01.c, segment_control_example.c, separator_example_01.c, slider_example.c, slideshow_example.c, spinner_example.c, table_example_01.c, table_example_02.c, theme_example_01.c, theme_example_02.c, thumb_example_01.c, toolbar_example_01.c, toolbar_example_02.c, toolbar_example_03.c, track_example_01.c, transit_example_01.c, transit_example_02.c, transit_example_03.c, transit_example_04.c, and web_example_02.c.

References _Elm_Event_Policy_Changed::new_value, and _Elm_Event_Policy_Changed::old_value.

## ◆ elm_process_state_get()

Elm_Process_State elm_process_state_get | ( | void |  | ) |

The state of the process as a whole.

Since
  1.12 Get the process state as a while

Returns
  The current process state

The process may logically be some runnable state. a "foreground" application runs as normal and may be user-visible or "active" in some way. A background application is not user-visible or otherwise important and likely should release resources and not wake up often or process much.

Since
  1.12

References elm_policy_get(), elm_win_iconified_get(), elm_win_norender_pop(), elm_win_norender_push(), elm_win_shaped_set(), and elm_win_withdrawn_get().

## ◆ elm_run()

void elm_run | ( | void |  | ) |

Run Elementary's main loop.

This call should be issued just after all initialization is completed. This function will not return until elm_exit() is called. It will keep looping, running the main (event/processing) loop for Elementary.

This function should be called once only from the same thread that initted elementary, (elm_init(), eina_init(), ...) and should never be nested. Never call it from within an instance of itself.

See also
  elm_init() for an example

Examples:
  actionslider_example_01.c, bg_example_01.c, bg_example_02.c, bg_example_03.c, box_example_02.c, bubble_example_01.c, button_example_00.c, button_example_01.c, calendar_example_01.c, calendar_example_02.c, calendar_example_03.c, calendar_example_04.c, calendar_example_05.c, calendar_example_06.c, check_example_01.c, clock_example.c, codegen_example.c, colorselector_example_01.c, combobox_example_01.c, conformant_example_01.c, conformant_example_02.c, ctxpopup_example_01.c, datetime_example.c, dayselector_example.c, diskselector_example_01.c, diskselector_example_02.c, efl_thread_1.c, efl_thread_2.c, efl_thread_3.c, efl_thread_4.c, efl_thread_5.c, efl_thread_6.c, efl_thread_win32_1.c, efl_thread_win32_2.c, efl_thread_win32_3.c, efl_thread_win32_4.c, entry_example.c, fileselector_button_example.c, fileselector_entry_example.c, fileselector_example.c, flip_example_01.c, flipselector_example.c, frame_example_01.c, general_funcs_example.c, gengrid_example.c, genlist_example_01.c, genlist_example_02.c, genlist_example_03.c, genlist_example_04.c, genlist_example_05.c, glview_example_01.c, hover_example_01.c, hoversel_example_01.c, icon_example_01.c, image_example_01.c, index_example_01.c, index_example_02.c, inwin_example.c, label_example_01.c, layout_example_01.c, layout_example_02.c, layout_example_03.c, list_example_01.c, list_example_02.c, list_example_03.c, location_example_01.c, map_example_01.c, map_example_02.c, map_example_03.c, mapbuf_example.c, menu_example_01.c, naviframe_example.c, notify_example_01.c, panel_example_01.c, panes_example.c, photocam_example_01.c, popup_example_01.c, popup_example_02.c, popup_example_03.c, prefs_example_01.c, prefs_example_02.c, prefs_example_03.c, progressbar_example.c, radio_example_01.c, scroller_example_01.c, segment_control_example.c, separator_example_01.c, slider_example.c, slideshow_example.c, spinner_example.c, table_example_01.c, table_example_02.c, theme_example_01.c, theme_example_02.c, thumb_example_01.c, toolbar_example_01.c, toolbar_example_02.c, toolbar_example_03.c, track_example_01.c, transit_example_01.c, transit_example_02.c, transit_example_03.c, transit_example_04.c, web_example_02.c, and win_example.c.

## ◆ elm_shutdown()

int elm_shutdown | ( | void |  | ) |

Shut down Elementary.

Returns
  The init counter value.

This should be called at the end of your application, just before it ceases to do any more processing. This will clean up any permanent resources your application may have allocated via Elementary that would otherwise persist.

See also
  elm_init() for an example

Note
  elm_shutdown() will iterate main loop until all ecore_evas are freed. There is a possibility to call your ecore callbacks(timer, animator, event, job, and etc.) in elm_shutdown()

References elm_quicklaunch_shutdown(), and elm_quicklaunch_sub_shutdown().

## Variable Documentation

## ◆ ELM_EVENT_PROCESS_BACKGROUND

int ELM_EVENT_PROCESS_BACKGROUND

Emitted when nothing is visible and the process as a whole should go into a background state.

Since
  1.12

## ◆ ELM_EVENT_PROCESS_FOREGROUND

int ELM_EVENT_PROCESS_FOREGROUND

Emitted when going from nothing being visible to at least one window being visible.

Since
  1.12