diff --git a/legacy/elementary/src/lib/Makefile.am b/legacy/elementary/src/lib/Makefile.am index 57beee09e0..44dc6b0bf5 100644 --- a/legacy/elementary/src/lib/Makefile.am +++ b/legacy/elementary/src/lib/Makefile.am @@ -265,13 +265,21 @@ elm_label_common.h \ elm_label_eo.h \ elm_label_legacy.h \ elm_layout.h \ +elm_layout_common.h \ +elm_layout_eo.h \ +elm_layout_legacy.h \ elm_list.h \ +elm_list_common.h \ +elm_list_eo.h \ +elm_list_legacy.h \ elm_macros.h \ elm_map.h \ elm_map_common.h \ elm_map_eo.h \ elm_map_legacy.h \ elm_mapbuf.h \ +elm_mapbuf_eo.h \ +elm_mapbuf_legacy.h \ elm_menu.h \ elm_menu_common.h \ elm_menu_eo.h \ @@ -279,6 +287,9 @@ elm_menu_legacy.h \ elm_mirroring.h \ elm_need.h \ elm_notify.h \ +elm_notify_common.h \ +elm_notify_eo.h \ +elm_notify_legacy.h \ elm_object.h \ elm_object_item.h \ elm_panel.h \ @@ -289,6 +300,8 @@ elm_panes.h \ elm_panes_eo.h \ elm_panes_legacy.h \ elm_photo.h \ +elm_photo_eo.h \ +elm_photo_legacy.h \ elm_photocam.h \ elm_photocam_eo.h \ elm_photocam_legacy.h \ @@ -312,6 +325,9 @@ elm_route_legacy.h \ elm_scale.h \ elm_scroll.h \ elm_scroller.h \ +elm_scroller_common.h \ +elm_scroller_eo.h \ +elm_scroller_legacy.h \ elm_segment_control.h \ elm_segment_control_common.h \ elm_segment_control_eo.h \ @@ -344,6 +360,9 @@ elm_thumb_common.h \ elm_thumb_eo.h \ elm_thumb_legacy.h \ elm_toolbar.h \ +elm_toolbar_common.h \ +elm_toolbar_eo.h \ +elm_toolbar_legacy.h \ elm_tooltip.h \ elm_transit.h \ elm_video.h \ @@ -353,7 +372,10 @@ elm_web.h \ elm_web_common.h \ elm_web_eo.h \ elm_web_legacy.h \ -elm_win.h +elm_win.h \ +elm_win_common.h \ +elm_win_eo.h \ +elm_win_legacy.h includesubdir = $(includedir)/elementary-@VMAJ@/ libelementary_la_SOURCES = \ diff --git a/legacy/elementary/src/lib/elc_fileselector_eo.h b/legacy/elementary/src/lib/elc_fileselector_eo.h index 3e9b14d21a..06eba98698 100644 --- a/legacy/elementary/src/lib/elc_fileselector_eo.h +++ b/legacy/elementary/src/lib/elc_fileselector_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Fileselector + * + * @{ + */ #define ELM_OBJ_FILESELECTOR_CLASS elm_obj_fileselector_class_get() const Eo_Class *elm_obj_fileselector_class_get(void) EINA_CONST; @@ -201,3 +206,6 @@ enum * @see elm_fileselector_selected_set */ #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) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_naviframe_eo.h b/legacy/elementary/src/lib/elc_naviframe_eo.h index aebaf16c33..4f327ff57b 100644 --- a/legacy/elementary/src/lib/elc_naviframe_eo.h +++ b/legacy/elementary/src/lib/elc_naviframe_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Naviframe + * + * @{ + */ #define ELM_OBJ_NAVIFRAME_CLASS elm_obj_naviframe_class_get() const Eo_Class *elm_obj_naviframe_class_get(void) EINA_CONST; @@ -210,3 +215,6 @@ enum * @see elm_naviframe_event_enabled_get */ #define elm_obj_naviframe_event_enabled_get(ret) ELM_OBJ_NAVIFRAME_ID(ELM_OBJ_NAVIFRAME_SUB_ID_EVENT_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elc_popup_eo.h b/legacy/elementary/src/lib/elc_popup_eo.h index bd96717018..6d09109379 100644 --- a/legacy/elementary/src/lib/elc_popup_eo.h +++ b/legacy/elementary/src/lib/elc_popup_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Popup + * + * @{ + */ #define ELM_OBJ_POPUP_CLASS elm_obj_popup_class_get() const Eo_Class *elm_obj_popup_class_get(void) EINA_CONST; @@ -133,3 +138,6 @@ enum * @see elm_popup_item_append */ #define elm_obj_popup_item_append(label, icon, func, data, ret) ELM_OBJ_POPUP_ID(ELM_OBJ_POPUP_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_conform_eo.h b/legacy/elementary/src/lib/elm_conform_eo.h index 1ceb3c4d6b..0a7aa170db 100644 --- a/legacy/elementary/src/lib/elm_conform_eo.h +++ b/legacy/elementary/src/lib/elm_conform_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Conformant + * + * @{ + */ #define ELM_OBJ_CONFORMANT_CLASS elm_obj_conformant_class_get() const Eo_Class *elm_obj_conformant_class_get(void) EINA_CONST; @@ -8,3 +13,6 @@ enum { ELM_OBJ_CONFORMANT_SUB_ID_LAST }; +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_gengrid_eo.h b/legacy/elementary/src/lib/elm_gengrid_eo.h index d8a50be506..19c6ea631b 100644 --- a/legacy/elementary/src/lib/elm_gengrid_eo.h +++ b/legacy/elementary/src/lib/elm_gengrid_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Gengrid + * + * @{ + */ #define ELM_OBJ_GENGRID_PAN_CLASS elm_obj_gengrid_pan_class_get() const Eo_Class *elm_obj_gengrid_pan_class_get(void) EINA_CONST; @@ -599,4 +604,7 @@ enum #define elm_obj_gengrid_highlight_mode_get(ret) ELM_OBJ_GENGRID_ID(ELM_OBJ_GENGRID_SUB_ID_HIGHLIGHT_MODE_GET), EO_TYPECHECK(Eina_Bool *, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_genlist_eo.h b/legacy/elementary/src/lib/elm_genlist_eo.h index ad29b3d514..ec4bffa82b 100644 --- a/legacy/elementary/src/lib/elm_genlist_eo.h +++ b/legacy/elementary/src/lib/elm_genlist_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Genlist + * + * @{ + */ #define ELM_OBJ_GENLIST_PAN_CLASS elm_obj_genlist_pan_class_get() const Eo_Class *elm_obj_genlist_pan_class_get(void) EINA_CONST; @@ -505,4 +510,7 @@ enum */ #define elm_obj_genlist_tree_effect_enabled_get(ret) ELM_OBJ_GENLIST_ID(ELM_OBJ_GENLIST_SUB_ID_TREE_EFFECT_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_grid_eo.h b/legacy/elementary/src/lib/elm_grid_eo.h index 30858e15aa..853dda2103 100644 --- a/legacy/elementary/src/lib/elm_grid_eo.h +++ b/legacy/elementary/src/lib/elm_grid_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Grid + * + * @{ + */ #define ELM_OBJ_GRID_CLASS elm_obj_grid_class_get() const Eo_Class *elm_obj_grid_class_get(void) EINA_CONST; @@ -96,3 +101,6 @@ enum #define elm_obj_grid_children_get(ret) ELM_OBJ_GRID_ID(ELM_OBJ_GRID_SUB_ID_CHILDREN_GET), EO_TYPECHECK(Eina_List **, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_image_eo.h b/legacy/elementary/src/lib/elm_image_eo.h index e43a2804a2..d34f320c3d 100644 --- a/legacy/elementary/src/lib/elm_image_eo.h +++ b/legacy/elementary/src/lib/elm_image_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Image + * + * @{ + */ #define ELM_OBJ_IMAGE_CLASS elm_obj_image_class_get() const Eo_Class *elm_obj_image_class_get(void) EINA_CONST; @@ -542,3 +547,6 @@ enum #define elm_obj_image_scale_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SCALE_GET), EO_TYPECHECK(double *, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_index_eo.h b/legacy/elementary/src/lib/elm_index_eo.h index c928e4b795..768c5f9500 100644 --- a/legacy/elementary/src/lib/elm_index_eo.h +++ b/legacy/elementary/src/lib/elm_index_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Index + * + * @{ + */ #define ELM_OBJ_INDEX_CLASS elm_obj_index_class_get() const Eo_Class *elm_obj_index_class_get(void) EINA_CONST; @@ -306,3 +311,6 @@ enum #define elm_obj_index_omit_enabled_get(ret) ELM_OBJ_INDEX_ID(ELM_OBJ_INDEX_SUB_ID_OMIT_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_label_eo.h b/legacy/elementary/src/lib/elm_label_eo.h index 0e2dc3ad16..f79cb95f5d 100644 --- a/legacy/elementary/src/lib/elm_label_eo.h +++ b/legacy/elementary/src/lib/elm_label_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Label + * + * @{ + */ #define ELM_OBJ_LABEL_CLASS elm_obj_label_class_get() const Eo_Class *elm_obj_label_class_get(void) EINA_CONST; @@ -174,3 +179,6 @@ enum * @ingroup Label */ #define elm_obj_label_slide_go() ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_GO) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_layout.h b/legacy/elementary/src/lib/elm_layout.h index 47a009d6a0..773b032be5 100644 --- a/legacy/elementary/src/lib/elm_layout.h +++ b/legacy/elementary/src/lib/elm_layout.h @@ -165,1174 +165,13 @@ * */ -#define ELM_OBJ_LAYOUT_CLASS elm_obj_layout_class_get() - - const Eo_Class *elm_obj_layout_class_get(void) EINA_CONST; - - extern EAPI Eo_Op ELM_OBJ_LAYOUT_BASE_ID; - - enum -{ - ELM_OBJ_LAYOUT_SUB_ID_FILE_SET, - ELM_OBJ_LAYOUT_SUB_ID_THEME_SET, - ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_EMIT, - ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_ADD, - ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_DEL, - ELM_OBJ_LAYOUT_SUB_ID_TEXT_SET, - ELM_OBJ_LAYOUT_SUB_ID_TEXT_GET, - ELM_OBJ_LAYOUT_SUB_ID_BOX_APPEND, - ELM_OBJ_LAYOUT_SUB_ID_BOX_PREPEND, - ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_BEFORE, - ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_AT, - ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE, - ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE_ALL, - ELM_OBJ_LAYOUT_SUB_ID_TABLE_PACK, - ELM_OBJ_LAYOUT_SUB_ID_TABLE_UNPACK, - ELM_OBJ_LAYOUT_SUB_ID_TABLE_CLEAR, - ELM_OBJ_LAYOUT_SUB_ID_EDJE_GET, - ELM_OBJ_LAYOUT_SUB_ID_DATA_GET, - ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL, - ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_SET, - ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_GET, - ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_UNSET, - ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_SET, - ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_GET, - ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_SET, - ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_GET, - ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_SET, - ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_GET, - ELM_OBJ_LAYOUT_SUB_ID_TEXT_ALIASES_GET, - ELM_OBJ_LAYOUT_SUB_ID_CONTENT_ALIASES_GET, - ELM_OBJ_LAYOUT_SUB_ID_SUB_OBJECT_ADD_ENABLE, - ELM_OBJ_LAYOUT_SUB_ID_THEME_ENABLE, - ELM_OBJ_LAYOUT_SUB_ID_FREEZE, - ELM_OBJ_LAYOUT_SUB_ID_THAW, - ELM_OBJ_LAYOUT_SUB_ID_LAST -}; - -#define ELM_OBJ_LAYOUT_ID(sub_id) (ELM_OBJ_LAYOUT_BASE_ID + sub_id) - - -/** - * @def elm_obj_layout_file_set - * @since 1.8 - * - * Set the file that will be used as layout - * - * @param[in] file - * @param[in] group - * @param[out] ret - * - * @see elm_layout_file_set - */ -#define elm_obj_layout_file_set(file, group, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_theme_set - * @since 1.8 - * - * Set the edje group from the elementary theme that will be used as layout - * - * @param[in] klass - * @param[in] group - * @param[in] style - * @param[out] ret - * - * @see elm_layout_theme_set - */ -#define elm_obj_layout_theme_set(klass, group, style, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_THEME_SET), EO_TYPECHECK(const char *, klass), EO_TYPECHECK(const char *, group), EO_TYPECHECK(const char *, style), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_signal_emit - * @since 1.8 - * - * Send a (Edje) signal to a given layout widget's underlying Edje - * - * @param[in] emission - * @param[in] source - * - * @see elm_layout_signal_emit - */ -#define elm_obj_layout_signal_emit(emission, source) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_EMIT), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source) - -/** - * @def elm_obj_layout_signal_callback_add - * @since 1.8 - * - * Add a callback for a (Edje) signal emitted by a layout widget's - * - * @param[in] emission - * @param[in] source - * @param[in] func - * @param[in] data - * - * @see elm_layout_signal_callback_add - */ -#define elm_obj_layout_signal_callback_add(emission, source, func, data) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_ADD), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void *, data) - -/** - * @def elm_obj_layout_signal_callback_del - * @since 1.8 - * - * Remove a signal-triggered callback from a given layout widget. - * - * @param[in] emission - * @param[in] source - * @param[in] func - * @param[out] ret - * - * @see elm_layout_signal_callback_del - */ -#define elm_obj_layout_signal_callback_del(emission, source, func, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_DEL), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void **, ret) - -/** - * @def elm_obj_layout_text_set - * @since 1.8 - * - * Set the text of the given part - * - * @param[in] part - * @param[in] text - * @param[out] ret - * - * @see elm_layout_text_set - */ -#define elm_obj_layout_text_set(part, text, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(const char *, text), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_text_get - * @since 1.8 - * - * Get the text set in the given part - * - * @param[in] part - * @param[out] ret - * - * @see elm_layout_text_get - */ -#define elm_obj_layout_text_get(part, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_layout_box_append - * @since 1.8 - * - * Append child to layout box part. - * - * @param[in] part - * @param[in] child - * @param[out] ret - * - * @see elm_layout_box_append - */ -#define elm_obj_layout_box_append(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_APPEND), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_box_prepend - * @since 1.8 - * - * Prepend child to layout box part. - * - * @param[in] part - * @param[in] child - * @param[out] ret - * - * @see elm_layout_box_prepend - */ -#define elm_obj_layout_box_prepend(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_PREPEND), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_box_insert_before - * @since 1.8 - * - * Insert child to layout box part before a reference object. - * - * @param[in] part - * @param[in] child - * @param[in] reference - * @param[out] ret - * - * @see elm_layout_box_insert_before - */ -#define elm_obj_layout_box_insert_before(part, child, reference, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_BEFORE), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_box_insert_at - * @since 1.8 - * - * Insert child to layout box part at a given position. - * - * @param[in] part - * @param[in] child - * @param[in] pos - * @param[out] ret - * - * @see elm_layout_box_insert_at - */ -#define elm_obj_layout_box_insert_at(part, child, pos, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_AT), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_box_remove - * @since 1.8 - * - * Remove a child of the given part box. - * - * @param[in] part - * @param[in] child - * @param[out] ret - * - * @see elm_layout_box_remove - */ -#define elm_obj_layout_box_remove(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object **, ret) - -/** - * @def elm_obj_layout_box_remove_all - * @since 1.8 - * - * Remove all children of the given part box. - * - * @param[in] part - * @param[in] clear - * @param[out] ret - * - * @see elm_layout_box_remove_all - */ -#define elm_obj_layout_box_remove_all(part, clear, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE_ALL), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Eina_Bool, clear), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_table_pack - * @since 1.8 - * - * Insert child to layout table part. - * - * @param[in] part - * @param[in] child - * @param[in] col - * @param[in] row - * @param[in] colspan - * @param[in] rowspan - * @param[out] ret - * - * @see elm_layout_table_pack - */ -#define elm_obj_layout_table_pack(part, child, col, row, colspan, rowspan, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TABLE_PACK), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned short, col), EO_TYPECHECK(unsigned short, row), EO_TYPECHECK(unsigned short, colspan), EO_TYPECHECK(unsigned short, rowspan), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_table_unpack - * @since 1.8 - * - * Unpack (remove) a child of the given part table. - * - * @param[in] part - * @param[in] child - * @param[out] ret - * - * @see elm_layout_table_unpack - */ -#define elm_obj_layout_table_unpack(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TABLE_UNPACK), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object **, ret) - -/** - * @def elm_obj_layout_table_clear - * @since 1.8 - * - * Remove all the child objects of the given part table. - * - * @param[in] part - * @param[in] clear - * @param[out] ret - * - * @see elm_layout_table_clear - */ -#define elm_obj_layout_table_clear(part, clear, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TABLE_CLEAR), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Eina_Bool, clear), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_edje_get - * @since 1.8 - * - * Get the edje layout - * - * @param[out] ret - * - * @see elm_layout_edje_get - */ -#define elm_obj_layout_edje_get(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_EDJE_GET), EO_TYPECHECK(Evas_Object **, ret) - -/** - * @def elm_obj_layout_data_get - * @since 1.8 - * - * Get the edje data from the given layout - * - * @param[in] key - * @param[out] ret - * - * @see elm_layout_data_get - */ -#define elm_obj_layout_data_get(key, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_DATA_GET), EO_TYPECHECK(const char *, key), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_layout_sizing_eval - * @since 1.8 - * - * Eval sizing - * - * @see elm_layout_sizing_eval - */ -#define elm_obj_layout_sizing_eval() ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL) - -/** - * @def elm_obj_layout_part_cursor_set - * @since 1.8 - * - * Sets a specific cursor for an edje part. - * - * @param[in] part_name - * @param[in] cursor - * @param[out] ret - * - * @see elm_layout_part_cursor_set - */ -#define elm_obj_layout_part_cursor_set(part_name, cursor, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_SET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char *, cursor), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_part_cursor_get - * @since 1.8 - * - * Get the cursor to be shown when mouse is over an edje part - * - * @param[in] part_name - * @param[out] ret - * - * @see elm_layout_part_cursor_get - */ -#define elm_obj_layout_part_cursor_get(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_GET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_layout_part_cursor_unset - * @since 1.8 - * - * Unsets a cursor previously set with elm_layout_part_cursor_set(). - * - * @param[in] part_name - * @param[out] ret - * - * @see elm_layout_part_cursor_unset - */ -#define elm_obj_layout_part_cursor_unset(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_UNSET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_part_cursor_style_set - * @since 1.8 - * - * Sets a specific cursor style for an edje part. - * - * @param[in] part_name - * @param[in] style - * @param[out] ret - * - * @see elm_layout_part_cursor_style_set - */ -#define elm_obj_layout_part_cursor_style_set(part_name, style, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_SET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char *, style), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_part_cursor_style_get - * @since 1.8 - * - * Gets a specific cursor style for an edje part. - * - * @param[in] part_name - * @param[out] ret - * - * @see elm_layout_part_cursor_style_get - */ -#define elm_obj_layout_part_cursor_style_get(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_GET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_layout_part_cursor_engine_only_set - * @since 1.8 - * - * Sets if the cursor set should be searched on the theme or should use - * - * @param[in] part_name - * @param[in] engine_only - * @param[out] ret - * - * @see elm_layout_part_cursor_engine_only_set - */ -#define elm_obj_layout_part_cursor_engine_only_set(part_name, engine_only, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_SET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(Eina_Bool, engine_only), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_part_cursor_engine_only_get - * @since 1.8 - * - * Gets a specific cursor engine_only for an edje part. - * - * @param[in] part_name - * @param[out] ret - * - * @see elm_layout_part_cursor_engine_only_get - */ -#define elm_obj_layout_part_cursor_engine_only_get(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_GET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_edje_object_can_access_set - * @since 1.8 - * - * Set accessibility to all texblock(text) parts in the layout object - * - * @param[in] can_access - * @param[out] ret - * - * @see elm_layout_edje_object_can_access_set - */ -#define elm_obj_layout_edje_object_can_access_set(can_access, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_SET), EO_TYPECHECK(Eina_Bool, can_access), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_edje_object_can_access_get - * @since 1.8 - * - * Get accessibility state of texblock(text) parts in the layout object - * - * @param[out] ret - * - * @see elm_layout_edje_object_can_access_get - */ -#define elm_obj_layout_edje_object_can_access_get(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_layout_smart_text_aliases_get - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[out] aliases - */ -#define elm_obj_layout_smart_text_aliases_get(aliases) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_ALIASES_GET), EO_TYPECHECK(const Elm_Layout_Part_Alias_Description **, aliases) - -/** - * @def elm_obj_layout_smart_content_aliases_get - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[out] aliases - */ -#define elm_obj_layout_smart_content_aliases_get(aliases) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_CONTENT_ALIASES_GET), EO_TYPECHECK(const Elm_Layout_Part_Alias_Description **, aliases) - -/** - * @def elm_obj_layout_sub_object_add_enable - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[in] enable - * - * @see elm_layout_sub_object_add_enable - */ -#define elm_obj_layout_sub_object_add_enable(enable) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SUB_OBJECT_ADD_ENABLE), EO_TYPECHECK(Eina_Bool *, enable) - -/** - * @def elm_obj_layout_theme_enable - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[in] enable - */ -#define elm_obj_layout_theme_enable(enable) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_THEME_ENABLE), EO_TYPECHECK(Eina_Bool *, enable) - -/** - * @def elm_obj_layout_freeze - * @since 1.8 - * - * @brief Freezes the Elementary layout object. - * - * @param[out] ret - * - * @see elm_layout_freeze - */ -#define elm_obj_layout_freeze(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_FREEZE), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_layout_thaw - * @since 1.8 - * - * @brief Thaws the Elementary object. - * - * @param[out] ret - * - * @see elm_layout_thaw - */ -#define elm_obj_layout_thaw(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_THAW), EO_TYPECHECK(int *, ret) - -/** - * Add a new layout to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @see elm_layout_file_set() - * @see elm_layout_theme_set() - * - * @ingroup Layout - */ -EAPI Evas_Object *elm_layout_add(Evas_Object *parent); - -/** - * Set the file that will be used as layout - * - * @param obj The layout object - * @param file The path to file (edj) that will be used as layout - * @param group The group that the layout belongs in edje file - * - * @return (1 = success, 0 = error) - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group); - -/** - * @brief Freezes the Elementary layout object. - * - * @param obj A handle to an Elementary layout object. - * @return The frozen state or 0 on Error - * - * This function puts all changes on hold. Successive freezes will - * nest, requiring an equal number of thaws. - * - * @see elm_layout_thaw() - */ -EAPI int elm_layout_freeze(Evas_Object *obj); - -/** - * @brief Thaws the Elementary object. - * - * @param obj A handle to an Elementary layout object. - * @return The frozen state or 0 if the object is not frozen or on error. - * - * This function thaws the given Edje object and the Elementary sizing calc. - * - * @note: If sucessives freezes were done, an equal number of - * thaws will be required. - * - * @see elm_layout_freeze() - */ -EAPI int elm_layout_thaw(Evas_Object *obj); - -/** - * Set the edje group from the elementary theme that will be used as layout - * - * @param obj The layout object - * @param clas the class of the group - * @param group the group - * @param style the style to used - * - * @return (1 = success, 0 = error) - * - * Note that @a style will be the new style of @a obj too, as in an - * elm_object_style_set() call. - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style); - -/** - * Send a (Edje) signal to a given layout widget's underlying Edje - * object. - * - * @param obj The layout object handle - * @param emission The signal's name string - * @param source The signal's source string - * - * This function sends a signal to the underlying Edje object of @a - * obj. An Edje program on that Edje object's definition can respond - * to a signal by specifying matching 'signal' and 'source' fields. - * - * @ingroup Layout - */ -EAPI void elm_layout_signal_emit(Evas_Object *obj, const char *emission, const char *source); - -/** - * Add a callback for a (Edje) signal emitted by a layout widget's - * underlying Edje object. - * - * @param obj The layout object handle - * @param emission The signal's name string - * @param source The signal's source string - * @param func The callback function to be executed when the signal is - * emitted. - * @param data A pointer to data to pass in to the callback function. - * - * This function connects a callback function to a signal emitted by - * the underlying Edje object of @a obj. Globs are accepted in either - * the emission or source strings (see @c - * edje_object_signal_callback_add()). - * - * @ingroup Layout - */ -EAPI void elm_layout_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); - -/** - * Remove a signal-triggered callback from a given layout widget. - * - * @param obj The layout object handle - * @param emission The signal's name string - * @param source The signal's source string - * @param func The callback function being executed when the signal - * was emitted. - * @return The data pointer of the signal callback (passed on - * elm_layout_signal_callback_add()) or @c NULL, on errors. - * - * This function removes the @b last callback attached to a signal - * emitted by the undelying Edje object of @a obj, with parameters @a - * emission, @a source and @c func matching exactly those passed to a - * previous call to elm_layout_signal_callback_add(). The data pointer - * that was passed to this call will be returned. - * - * @ingroup Layout - */ -EAPI void *elm_layout_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func); - -/** - * Append child to layout box part. - * - * @param obj the layout object - * @param part the box part to which the object will be appended. - * @param child the child object to append to box. - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * Once the object is appended, it will become child of the layout. Its - * lifetime will be bound to the layout, whenever the layout dies the child - * will be deleted automatically. One should use elm_layout_box_remove() to - * make this layout forget about the object. - * - * @see elm_layout_box_prepend() - * @see elm_layout_box_insert_before() - * @see elm_layout_box_insert_at() - * @see elm_layout_box_remove() - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child); - -/** - * Prepend child to layout box part. - * - * @param obj the layout object - * @param part the box part to prepend. - * @param child the child object to prepend to box. - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * Once the object is prepended, it will become child of the layout. Its - * lifetime will be bound to the layout, whenever the layout dies the child - * will be deleted automatically. One should use elm_layout_box_remove() to - * make this layout forget about the object. - * - * @see elm_layout_box_append() - * @see elm_layout_box_insert_before() - * @see elm_layout_box_insert_at() - * @see elm_layout_box_remove() - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child); - -/** - * Insert child to layout box part before a reference object. - * - * @param obj the layout object - * @param part the box part to insert. - * @param child the child object to insert into box. - * @param reference another reference object to insert before in box. - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * Once the object is inserted, it will become child of the layout. Its - * lifetime will be bound to the layout, whenever the layout dies the child - * will be deleted automatically. One should use elm_layout_box_remove() to - * make this layout forget about the object. - * - * @see elm_layout_box_append() - * @see elm_layout_box_prepend() - * @see elm_layout_box_insert_before() - * @see elm_layout_box_remove() - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference); - -/** - * Insert child to layout box part at a given position. - * - * @param obj the layout object - * @param part the box part to insert. - * @param child the child object to insert into box. - * @param pos the numeric position >=0 to insert the child. - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * Once the object is inserted, it will become child of the layout. Its - * lifetime will be bound to the layout, whenever the layout dies the child - * will be deleted automatically. One should use elm_layout_box_remove() to - * make this layout forget about the object. - * - * @see elm_layout_box_append() - * @see elm_layout_box_prepend() - * @see elm_layout_box_insert_before() - * @see elm_layout_box_remove() - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos); - -/** - * Remove a child of the given part box. - * - * @param obj The layout object - * @param part The box part name to remove child. - * @param child The object to remove from box. - * @return The object that was being used, or NULL if not found. - * - * The object will be removed from the box part and its lifetime will - * not be handled by the layout anymore. This is equivalent to - * elm_layout_content_unset() for box. - * - * @see elm_layout_box_append() - * @see elm_layout_box_remove_all() - * - * @ingroup Layout - */ -EAPI Evas_Object *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child); - -/** - * Remove all children of the given part box. - * - * @param obj The layout object - * @param part The box part name to remove child. - * @param clear If EINA_TRUE, then all objects will be deleted as - * well, otherwise they will just be removed and will be - * dangling on the canvas. - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * The objects will be removed from the box part and their lifetime will - * not be handled by the layout anymore. This is equivalent to - * elm_layout_box_remove() for all box children. - * - * @see elm_layout_box_append() - * @see elm_layout_box_remove() - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear); - -/** - * Insert child to layout table part. - * - * @param obj the layout object - * @param part the box part to pack child. - * @param child_obj the child object to pack into table. - * @param col the column to which the child should be added. (>= 0) - * @param row the row to which the child should be added. (>= 0) - * @param colspan how many columns should be used to store this object. (>= - * 1) - * @param rowspan how many rows should be used to store this object. (>= 1) - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * Once the object is inserted, it will become child of the table. Its - * lifetime will be bound to the layout, and whenever the layout dies the - * child will be deleted automatically. One should use - * elm_layout_table_remove() to make this layout forget about the object. - * - * If @p colspan or @p rowspan are bigger than 1, that object will occupy - * more space than a single cell. For instance, the following code: - * @code - * elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1); - * @endcode - * - * Would result in an object being added like the following picture: - * - * @image html layout_colspan.png - * @image latex layout_colspan.eps width=\textwidth - * - * @see elm_layout_table_unpack() - * @see elm_layout_table_clear() - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan); - -/** - * Unpack (remove) a child of the given part table. - * - * @param obj The layout object - * @param part The table part name to remove child. - * @param child_obj The object to remove from table. - * @return The object that was being used, or NULL if not found. - * - * The object will be unpacked from the table part and its lifetime - * will not be handled by the layout anymore. This is equivalent to - * elm_layout_content_unset() for table. - * - * @see elm_layout_table_pack() - * @see elm_layout_table_clear() - * - * @ingroup Layout - */ -EAPI Evas_Object *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj); - -/** - * Remove all the child objects of the given part table. - * - * @param obj The layout object - * @param part The table part name to remove child. - * @param clear If EINA_TRUE, then all objects will be deleted as - * well, otherwise they will just be removed and will be - * dangling on the canvas. - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * The objects will be removed from the table part and their lifetime will - * not be handled by the layout anymore. This is equivalent to - * elm_layout_table_unpack() for all table children. - * - * @see elm_layout_table_pack() - * @see elm_layout_table_unpack() - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear); - -/** - * Get the edje layout - * - * @param obj The layout object - * - * @return A Evas_Object with the edje layout settings loaded - * with function elm_layout_file_set - * - * This returns the edje object. It is not expected to be used to then - * swallow objects via edje_object_part_swallow() for example. Use - * elm_layout_content_set() instead so child object handling and sizing is - * done properly. - * - * @note This function should only be used if you really need to call some - * low level Edje function on this edje object. All the common stuff (setting - * text, emitting signals, hooking callbacks to signals, etc.) can be done - * with proper elementary functions. - * - * @see elm_layout_signal_callback_add() - * @see elm_layout_signal_emit() - * @see elm_layout_text_set() - * @see elm_layout_content_set() - * @see elm_layout_box_append() - * @see elm_layout_table_pack() - * @see elm_layout_data_get() - * - * @ingroup Layout - */ -EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj); - -/** - * Get the edje data from the given layout - * - * @param obj The layout object - * @param key The data key - * - * @return The edje data string - * - * This function fetches data specified inside the edje theme of this layout. - * This function return NULL if data is not found. - * - * In EDC this comes from a data block within the group block that @p - * obj was loaded from. E.g. - * - * @code - * collections { - * group { - * name: "a_group"; - * data { - * item: "key1" "value1"; - * item: "key2" "value2"; - * } - * } - * } - * @endcode - * - * @ingroup Layout - */ -EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char *key); - -/** - * Eval sizing - * - * @param obj The layout object - * - * Manually forces a sizing re-evaluation. This is useful when the minimum - * size required by the edje theme of this layout has changed. The change on - * the minimum size required by the edje theme is not immediately reported to - * the elementary layout, so one needs to call this function in order to tell - * the widget (layout) that it needs to reevaluate its own size. - * - * The minimum size of the theme is calculated based on minimum size of - * parts, the size of elements inside containers like box and table, etc. All - * of this can change due to state changes, and that's when this function - * should be called. - * - * Also note that a standard signal of "size,eval" "elm" emitted from the - * edje object will cause this to happen too. - * - * @ingroup Layout - */ -EAPI void elm_layout_sizing_eval(Evas_Object *obj); - -/** - * Sets a specific cursor for an edje part. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @param cursor cursor name to use, see Elementary_Cursor.h - * - * @return EINA_TRUE on success or EINA_FALSE on failure, that may be - * part not exists or it has "mouse_events: 0". - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor); - -/** - * Get the cursor to be shown when mouse is over an edje part - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @return the cursor name. - * - * @ingroup Layout - */ -EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name); - -/** - * Unsets a cursor previously set with elm_layout_part_cursor_set(). - * - * @param obj The layout object. - * @param part_name a part from loaded edje group, that had a cursor set - * with elm_layout_part_cursor_set(). - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name); - -/** - * Sets a specific cursor style for an edje part. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @param style the theme style to use (default, transparent, ...) - * - * @return EINA_TRUE on success or EINA_FALSE on failure, that may be - * part not exists or it did not had a cursor set. - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style); - -/** - * Gets a specific cursor style for an edje part. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * - * @return the theme style in use, defaults to "default". If the - * object does not have a cursor set, then NULL is returned. - * - * @ingroup Layout - */ -EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name); - -/** - * Sets if the cursor set should be searched on the theme or should use - * the provided by the engine, only. - * - * @note before you set if should look on theme you should define a - * cursor with elm_layout_part_cursor_set(). By default it will only - * look for cursors provided by the engine. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * @param engine_only if cursors should be just provided by the engine (EINA_TRUE) - * or should also search on widget's theme as well (EINA_FALSE) - * - * @return EINA_TRUE on success or EINA_FALSE on failure, that may be - * part not exists or it did not had a cursor set. - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only); - -/* -* Set accessibility to all texblock(text) parts in the layout object -* -* @param obj The layout object. -* @param can_access makes all textblock(text) parts in the layout @p obj possible -* to have accessibility. @c EINA_TRUE means textblock(text) parts can be accessible -* -* @return @c EINA_TRUE on success or @c EINA_FALSE on failure. If @p obj is not -* a proper layout object, @c EINA_FALSE is returned. -* -* @since 1.7 -* -* @ingroup Layout -*/ -EAPI Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access); - -/* -* Get accessibility state of texblock(text) parts in the layout object -* -* @param obj The layout object. -* -* @return @c EINA_TRUE, if all textblock(text) parts in the layout can be accessible -* @c EINA_FALSET if those cannot be accessible. If @p obj is not a proper layout -* object, @c EINA_FALSE is returned. -* -* @see elm_layout_edje_object_access_set() -* -* @since 1.7 -* -* @ingroup Layout -*/ -EAPI Eina_Bool elm_layout_edje_object_can_access_get(Evas_Object *obj); - -/** - * Gets a specific cursor engine_only for an edje part. - * - * @param obj The layout object. - * @param part_name a part from loaded edje group. - * - * @return whenever the cursor is just provided by engine or also from theme. - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name); - -/** - * Set the layout content. - * - * @param obj The layout object - * @param swallow The swallow part name in the edje file - * @param content The child that will be added in this layout object - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * Once the content object is set, a previously set one will be deleted. - * If you want to keep that old content object, use the - * elm_layout_content_unset() function. - * - * @note In an Edje theme, the part used as a content container is called - * @c SWALLOW. This is why the parameter name is called @p swallow, but it is - * expected to be a part name just like the second parameter of - * elm_layout_box_append(). - * - * @see elm_layout_box_append() - * @see elm_layout_content_get() - * @see elm_layout_content_unset() - * - * @see @ref secBox - * - * @ingroup Layout - */ -EAPI Eina_Bool elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content); - -/** - * Get the child object in the given content part. - * - * @param obj The layout object - * @param swallow The SWALLOW part to get its content - * - * @return The swallowed object or NULL if none or an error occurred - * - * @ingroup Layout - */ -EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow); - -/** - * Unset the layout content. - * - * @param obj The layout object - * @param swallow The swallow part name in the edje file - * @return The content that was being used - * - * Unparent and return the content object which was set for this part. - * - * @ingroup Layout - */ -EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow); - -/** - * Set the text of the given part - * - * @param obj The layout object - * @param part The TEXT part where to set the text - * @param text The text to set - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - */ -EAPI Eina_Bool elm_layout_text_set(Evas_Object *obj, const char *part, const char *text); - -/** - * Get the text set in the given part - * - * @param obj The layout object - * @param part The TEXT part to retrieve the text off - * - * @return The text set in @p part - */ -EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char *part); - -/** - * @def elm_layout_icon_set - * Convenience macro to set the icon object in a layout that follows the - * Elementary naming convention for its parts. - * - * @ingroup Layout - */ -#define elm_layout_icon_set(_ly, _obj) \ - do { \ - const char *sig; \ - elm_layout_content_set((_ly), "elm.swallow.icon", (_obj)); \ - if ((_obj)) sig = "elm,state,icon,visible"; \ - else sig = "elm,state,icon,hidden"; \ - elm_layout_signal_emit((_ly), sig, "elm"); \ - } while (0) - -/** - * @def elm_layout_icon_get - * Convenience macro to get the icon object from a layout that follows the - * Elementary naming convention for its parts. - * - * @ingroup Layout - */ -#define elm_layout_icon_get(_ly) \ - elm_layout_content_get((_ly), "elm.swallow.icon") - -/** - * @def elm_layout_end_set - * Convenience macro to set the end object in a layout that follows the - * Elementary naming convention for its parts. - * - * @ingroup Layout - */ -#define elm_layout_end_set(_ly, _obj) \ - do { \ - const char *sig; \ - elm_layout_content_set((_ly), "elm.swallow.end", (_obj)); \ - if ((_obj)) sig = "elm,state,end,visible"; \ - else sig = "elm,state,end,hidden"; \ - elm_layout_signal_emit((_ly), sig, "elm"); \ - } while (0) - -/** - * @def elm_layout_end_get - * Convenience macro to get the end object in a layout that follows the - * Elementary naming convention for its parts. - * - * @ingroup Layout - */ -#define elm_layout_end_get(_ly) \ - elm_layout_content_get((_ly), "elm.swallow.end") +#include +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_layout_common.h b/legacy/elementary/src/lib/elm_layout_common.h new file mode 100644 index 0000000000..80156c2b28 --- /dev/null +++ b/legacy/elementary/src/lib/elm_layout_common.h @@ -0,0 +1,52 @@ +/** + * @def elm_layout_icon_set + * Convenience macro to set the icon object in a layout that follows the + * Elementary naming convention for its parts. + * + * @ingroup Layout + */ +#define elm_layout_icon_set(_ly, _obj) \ + do { \ + const char *sig; \ + elm_layout_content_set((_ly), "elm.swallow.icon", (_obj)); \ + if ((_obj)) sig = "elm,state,icon,visible"; \ + else sig = "elm,state,icon,hidden"; \ + elm_layout_signal_emit((_ly), sig, "elm"); \ + } while (0) + +/** + * @def elm_layout_icon_get + * Convenience macro to get the icon object from a layout that follows the + * Elementary naming convention for its parts. + * + * @ingroup Layout + */ +#define elm_layout_icon_get(_ly) \ + elm_layout_content_get((_ly), "elm.swallow.icon") + +/** + * @def elm_layout_end_set + * Convenience macro to set the end object in a layout that follows the + * Elementary naming convention for its parts. + * + * @ingroup Layout + */ +#define elm_layout_end_set(_ly, _obj) \ + do { \ + const char *sig; \ + elm_layout_content_set((_ly), "elm.swallow.end", (_obj)); \ + if ((_obj)) sig = "elm,state,end,visible"; \ + else sig = "elm,state,end,hidden"; \ + elm_layout_signal_emit((_ly), sig, "elm"); \ + } while (0) + +/** + * @def elm_layout_end_get + * Convenience macro to get the end object in a layout that follows the + * Elementary naming convention for its parts. + * + * @ingroup Layout + */ +#define elm_layout_end_get(_ly) \ + elm_layout_content_get((_ly), "elm.swallow.end") + diff --git a/legacy/elementary/src/lib/elm_layout_eo.h b/legacy/elementary/src/lib/elm_layout_eo.h new file mode 100644 index 0000000000..d6b6b2c055 --- /dev/null +++ b/legacy/elementary/src/lib/elm_layout_eo.h @@ -0,0 +1,507 @@ +/** + * @ingroup Layout + * + * @{ + */ +#define ELM_OBJ_LAYOUT_CLASS elm_obj_layout_class_get() + + const Eo_Class *elm_obj_layout_class_get(void) EINA_CONST; + + extern EAPI Eo_Op ELM_OBJ_LAYOUT_BASE_ID; + + enum +{ + ELM_OBJ_LAYOUT_SUB_ID_FILE_SET, + ELM_OBJ_LAYOUT_SUB_ID_THEME_SET, + ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_EMIT, + ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_ADD, + ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_DEL, + ELM_OBJ_LAYOUT_SUB_ID_TEXT_SET, + ELM_OBJ_LAYOUT_SUB_ID_TEXT_GET, + ELM_OBJ_LAYOUT_SUB_ID_BOX_APPEND, + ELM_OBJ_LAYOUT_SUB_ID_BOX_PREPEND, + ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_BEFORE, + ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_AT, + ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE, + ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE_ALL, + ELM_OBJ_LAYOUT_SUB_ID_TABLE_PACK, + ELM_OBJ_LAYOUT_SUB_ID_TABLE_UNPACK, + ELM_OBJ_LAYOUT_SUB_ID_TABLE_CLEAR, + ELM_OBJ_LAYOUT_SUB_ID_EDJE_GET, + ELM_OBJ_LAYOUT_SUB_ID_DATA_GET, + ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL, + ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_SET, + ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_GET, + ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_UNSET, + ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_SET, + ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_GET, + ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_SET, + ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_GET, + ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_SET, + ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_GET, + ELM_OBJ_LAYOUT_SUB_ID_TEXT_ALIASES_GET, + ELM_OBJ_LAYOUT_SUB_ID_CONTENT_ALIASES_GET, + ELM_OBJ_LAYOUT_SUB_ID_SUB_OBJECT_ADD_ENABLE, + ELM_OBJ_LAYOUT_SUB_ID_THEME_ENABLE, + ELM_OBJ_LAYOUT_SUB_ID_FREEZE, + ELM_OBJ_LAYOUT_SUB_ID_THAW, + ELM_OBJ_LAYOUT_SUB_ID_LAST +}; + +#define ELM_OBJ_LAYOUT_ID(sub_id) (ELM_OBJ_LAYOUT_BASE_ID + sub_id) + + +/** + * @def elm_obj_layout_file_set + * @since 1.8 + * + * Set the file that will be used as layout + * + * @param[in] file + * @param[in] group + * @param[out] ret + * + * @see elm_layout_file_set + */ +#define elm_obj_layout_file_set(file, group, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_theme_set + * @since 1.8 + * + * Set the edje group from the elementary theme that will be used as layout + * + * @param[in] klass + * @param[in] group + * @param[in] style + * @param[out] ret + * + * @see elm_layout_theme_set + */ +#define elm_obj_layout_theme_set(klass, group, style, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_THEME_SET), EO_TYPECHECK(const char *, klass), EO_TYPECHECK(const char *, group), EO_TYPECHECK(const char *, style), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_signal_emit + * @since 1.8 + * + * Send a (Edje) signal to a given layout widget's underlying Edje + * + * @param[in] emission + * @param[in] source + * + * @see elm_layout_signal_emit + */ +#define elm_obj_layout_signal_emit(emission, source) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_EMIT), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source) + +/** + * @def elm_obj_layout_signal_callback_add + * @since 1.8 + * + * Add a callback for a (Edje) signal emitted by a layout widget's + * + * @param[in] emission + * @param[in] source + * @param[in] func + * @param[in] data + * + * @see elm_layout_signal_callback_add + */ +#define elm_obj_layout_signal_callback_add(emission, source, func, data) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_ADD), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void *, data) + +/** + * @def elm_obj_layout_signal_callback_del + * @since 1.8 + * + * Remove a signal-triggered callback from a given layout widget. + * + * @param[in] emission + * @param[in] source + * @param[in] func + * @param[out] ret + * + * @see elm_layout_signal_callback_del + */ +#define elm_obj_layout_signal_callback_del(emission, source, func, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIGNAL_CALLBACK_DEL), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void **, ret) + +/** + * @def elm_obj_layout_text_set + * @since 1.8 + * + * Set the text of the given part + * + * @param[in] part + * @param[in] text + * @param[out] ret + * + * @see elm_layout_text_set + */ +#define elm_obj_layout_text_set(part, text, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_SET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(const char *, text), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_text_get + * @since 1.8 + * + * Get the text set in the given part + * + * @param[in] part + * @param[out] ret + * + * @see elm_layout_text_get + */ +#define elm_obj_layout_text_get(part, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_layout_box_append + * @since 1.8 + * + * Append child to layout box part. + * + * @param[in] part + * @param[in] child + * @param[out] ret + * + * @see elm_layout_box_append + */ +#define elm_obj_layout_box_append(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_APPEND), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_box_prepend + * @since 1.8 + * + * Prepend child to layout box part. + * + * @param[in] part + * @param[in] child + * @param[out] ret + * + * @see elm_layout_box_prepend + */ +#define elm_obj_layout_box_prepend(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_PREPEND), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_box_insert_before + * @since 1.8 + * + * Insert child to layout box part before a reference object. + * + * @param[in] part + * @param[in] child + * @param[in] reference + * @param[out] ret + * + * @see elm_layout_box_insert_before + */ +#define elm_obj_layout_box_insert_before(part, child, reference, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_BEFORE), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(const Evas_Object *, reference), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_box_insert_at + * @since 1.8 + * + * Insert child to layout box part at a given position. + * + * @param[in] part + * @param[in] child + * @param[in] pos + * @param[out] ret + * + * @see elm_layout_box_insert_at + */ +#define elm_obj_layout_box_insert_at(part, child, pos, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_INSERT_AT), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned int, pos), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_box_remove + * @since 1.8 + * + * Remove a child of the given part box. + * + * @param[in] part + * @param[in] child + * @param[out] ret + * + * @see elm_layout_box_remove + */ +#define elm_obj_layout_box_remove(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object **, ret) + +/** + * @def elm_obj_layout_box_remove_all + * @since 1.8 + * + * Remove all children of the given part box. + * + * @param[in] part + * @param[in] clear + * @param[out] ret + * + * @see elm_layout_box_remove_all + */ +#define elm_obj_layout_box_remove_all(part, clear, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_BOX_REMOVE_ALL), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Eina_Bool, clear), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_table_pack + * @since 1.8 + * + * Insert child to layout table part. + * + * @param[in] part + * @param[in] child + * @param[in] col + * @param[in] row + * @param[in] colspan + * @param[in] rowspan + * @param[out] ret + * + * @see elm_layout_table_pack + */ +#define elm_obj_layout_table_pack(part, child, col, row, colspan, rowspan, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TABLE_PACK), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(unsigned short, col), EO_TYPECHECK(unsigned short, row), EO_TYPECHECK(unsigned short, colspan), EO_TYPECHECK(unsigned short, rowspan), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_table_unpack + * @since 1.8 + * + * Unpack (remove) a child of the given part table. + * + * @param[in] part + * @param[in] child + * @param[out] ret + * + * @see elm_layout_table_unpack + */ +#define elm_obj_layout_table_unpack(part, child, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TABLE_UNPACK), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Evas_Object **, ret) + +/** + * @def elm_obj_layout_table_clear + * @since 1.8 + * + * Remove all the child objects of the given part table. + * + * @param[in] part + * @param[in] clear + * @param[out] ret + * + * @see elm_layout_table_clear + */ +#define elm_obj_layout_table_clear(part, clear, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TABLE_CLEAR), EO_TYPECHECK(const char *, part), EO_TYPECHECK(Eina_Bool, clear), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_edje_get + * @since 1.8 + * + * Get the edje layout + * + * @param[out] ret + * + * @see elm_layout_edje_get + */ +#define elm_obj_layout_edje_get(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_EDJE_GET), EO_TYPECHECK(Evas_Object **, ret) + +/** + * @def elm_obj_layout_data_get + * @since 1.8 + * + * Get the edje data from the given layout + * + * @param[in] key + * @param[out] ret + * + * @see elm_layout_data_get + */ +#define elm_obj_layout_data_get(key, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_DATA_GET), EO_TYPECHECK(const char *, key), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_layout_sizing_eval + * @since 1.8 + * + * Eval sizing + * + * @see elm_layout_sizing_eval + */ +#define elm_obj_layout_sizing_eval() ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL) + +/** + * @def elm_obj_layout_part_cursor_set + * @since 1.8 + * + * Sets a specific cursor for an edje part. + * + * @param[in] part_name + * @param[in] cursor + * @param[out] ret + * + * @see elm_layout_part_cursor_set + */ +#define elm_obj_layout_part_cursor_set(part_name, cursor, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_SET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char *, cursor), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_part_cursor_get + * @since 1.8 + * + * Get the cursor to be shown when mouse is over an edje part + * + * @param[in] part_name + * @param[out] ret + * + * @see elm_layout_part_cursor_get + */ +#define elm_obj_layout_part_cursor_get(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_GET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_layout_part_cursor_unset + * @since 1.8 + * + * Unsets a cursor previously set with elm_layout_part_cursor_set(). + * + * @param[in] part_name + * @param[out] ret + * + * @see elm_layout_part_cursor_unset + */ +#define elm_obj_layout_part_cursor_unset(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_UNSET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_part_cursor_style_set + * @since 1.8 + * + * Sets a specific cursor style for an edje part. + * + * @param[in] part_name + * @param[in] style + * @param[out] ret + * + * @see elm_layout_part_cursor_style_set + */ +#define elm_obj_layout_part_cursor_style_set(part_name, style, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_SET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char *, style), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_part_cursor_style_get + * @since 1.8 + * + * Gets a specific cursor style for an edje part. + * + * @param[in] part_name + * @param[out] ret + * + * @see elm_layout_part_cursor_style_get + */ +#define elm_obj_layout_part_cursor_style_get(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_STYLE_GET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_layout_part_cursor_engine_only_set + * @since 1.8 + * + * Sets if the cursor set should be searched on the theme or should use + * + * @param[in] part_name + * @param[in] engine_only + * @param[out] ret + * + * @see elm_layout_part_cursor_engine_only_set + */ +#define elm_obj_layout_part_cursor_engine_only_set(part_name, engine_only, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_SET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(Eina_Bool, engine_only), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_part_cursor_engine_only_get + * @since 1.8 + * + * Gets a specific cursor engine_only for an edje part. + * + * @param[in] part_name + * @param[out] ret + * + * @see elm_layout_part_cursor_engine_only_get + */ +#define elm_obj_layout_part_cursor_engine_only_get(part_name, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_PART_CURSOR_ENGINE_ONLY_GET), EO_TYPECHECK(const char *, part_name), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_edje_object_can_access_set + * @since 1.8 + * + * Set accessibility to all texblock(text) parts in the layout object + * + * @param[in] can_access + * @param[out] ret + * + * @see elm_layout_edje_object_can_access_set + */ +#define elm_obj_layout_edje_object_can_access_set(can_access, ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_SET), EO_TYPECHECK(Eina_Bool, can_access), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_edje_object_can_access_get + * @since 1.8 + * + * Get accessibility state of texblock(text) parts in the layout object + * + * @param[out] ret + * + * @see elm_layout_edje_object_can_access_get + */ +#define elm_obj_layout_edje_object_can_access_get(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_EDJE_OBJECT_CAN_ACCESS_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_layout_smart_text_aliases_get + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[out] aliases + */ +#define elm_obj_layout_smart_text_aliases_get(aliases) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_ALIASES_GET), EO_TYPECHECK(const Elm_Layout_Part_Alias_Description **, aliases) + +/** + * @def elm_obj_layout_smart_content_aliases_get + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[out] aliases + */ +#define elm_obj_layout_smart_content_aliases_get(aliases) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_CONTENT_ALIASES_GET), EO_TYPECHECK(const Elm_Layout_Part_Alias_Description **, aliases) + +/** + * @def elm_obj_layout_sub_object_add_enable + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[in] enable + * + * @see elm_layout_sub_object_add_enable + */ +#define elm_obj_layout_sub_object_add_enable(enable) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SUB_OBJECT_ADD_ENABLE), EO_TYPECHECK(Eina_Bool *, enable) + +/** + * @def elm_obj_layout_theme_enable + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[in] enable + */ +#define elm_obj_layout_theme_enable(enable) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_THEME_ENABLE), EO_TYPECHECK(Eina_Bool *, enable) + +/** + * @def elm_obj_layout_freeze + * @since 1.8 + * + * @brief Freezes the Elementary layout object. + * + * @param[out] ret + * + * @see elm_layout_freeze + */ +#define elm_obj_layout_freeze(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_FREEZE), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_layout_thaw + * @since 1.8 + * + * @brief Thaws the Elementary object. + * + * @param[out] ret + * + * @see elm_layout_thaw + */ +#define elm_obj_layout_thaw(ret) ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_THAW), EO_TYPECHECK(int *, ret) + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_layout_legacy.h b/legacy/elementary/src/lib/elm_layout_legacy.h new file mode 100644 index 0000000000..d9a1feb9a7 --- /dev/null +++ b/legacy/elementary/src/lib/elm_layout_legacy.h @@ -0,0 +1,618 @@ +/** + * Add a new layout to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @see elm_layout_file_set() + * @see elm_layout_theme_set() + * + * @ingroup Layout + */ +EAPI Evas_Object *elm_layout_add(Evas_Object *parent); + +/** + * Set the file that will be used as layout + * + * @param obj The layout object + * @param file The path to file (edj) that will be used as layout + * @param group The group that the layout belongs in edje file + * + * @return (1 = success, 0 = error) + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group); + +/** + * @brief Freezes the Elementary layout object. + * + * @param obj A handle to an Elementary layout object. + * @return The frozen state or 0 on Error + * + * This function puts all changes on hold. Successive freezes will + * nest, requiring an equal number of thaws. + * + * @see elm_layout_thaw() + */ +EAPI int elm_layout_freeze(Evas_Object *obj); + +/** + * @brief Thaws the Elementary object. + * + * @param obj A handle to an Elementary layout object. + * @return The frozen state or 0 if the object is not frozen or on error. + * + * This function thaws the given Edje object and the Elementary sizing calc. + * + * @note: If sucessives freezes were done, an equal number of + * thaws will be required. + * + * @see elm_layout_freeze() + */ +EAPI int elm_layout_thaw(Evas_Object *obj); + +/** + * Set the edje group from the elementary theme that will be used as layout + * + * @param obj The layout object + * @param clas the class of the group + * @param group the group + * @param style the style to used + * + * @return (1 = success, 0 = error) + * + * Note that @a style will be the new style of @a obj too, as in an + * elm_object_style_set() call. + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style); + +/** + * Send a (Edje) signal to a given layout widget's underlying Edje + * object. + * + * @param obj The layout object handle + * @param emission The signal's name string + * @param source The signal's source string + * + * This function sends a signal to the underlying Edje object of @a + * obj. An Edje program on that Edje object's definition can respond + * to a signal by specifying matching 'signal' and 'source' fields. + * + * @ingroup Layout + */ +EAPI void elm_layout_signal_emit(Evas_Object *obj, const char *emission, const char *source); + +/** + * Add a callback for a (Edje) signal emitted by a layout widget's + * underlying Edje object. + * + * @param obj The layout object handle + * @param emission The signal's name string + * @param source The signal's source string + * @param func The callback function to be executed when the signal is + * emitted. + * @param data A pointer to data to pass in to the callback function. + * + * This function connects a callback function to a signal emitted by + * the underlying Edje object of @a obj. Globs are accepted in either + * the emission or source strings (see @c + * edje_object_signal_callback_add()). + * + * @ingroup Layout + */ +EAPI void elm_layout_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); + +/** + * Remove a signal-triggered callback from a given layout widget. + * + * @param obj The layout object handle + * @param emission The signal's name string + * @param source The signal's source string + * @param func The callback function being executed when the signal + * was emitted. + * @return The data pointer of the signal callback (passed on + * elm_layout_signal_callback_add()) or @c NULL, on errors. + * + * This function removes the @b last callback attached to a signal + * emitted by the undelying Edje object of @a obj, with parameters @a + * emission, @a source and @c func matching exactly those passed to a + * previous call to elm_layout_signal_callback_add(). The data pointer + * that was passed to this call will be returned. + * + * @ingroup Layout + */ +EAPI void *elm_layout_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func); + +/** + * Append child to layout box part. + * + * @param obj the layout object + * @param part the box part to which the object will be appended. + * @param child the child object to append to box. + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * Once the object is appended, it will become child of the layout. Its + * lifetime will be bound to the layout, whenever the layout dies the child + * will be deleted automatically. One should use elm_layout_box_remove() to + * make this layout forget about the object. + * + * @see elm_layout_box_prepend() + * @see elm_layout_box_insert_before() + * @see elm_layout_box_insert_at() + * @see elm_layout_box_remove() + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child); + +/** + * Prepend child to layout box part. + * + * @param obj the layout object + * @param part the box part to prepend. + * @param child the child object to prepend to box. + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * Once the object is prepended, it will become child of the layout. Its + * lifetime will be bound to the layout, whenever the layout dies the child + * will be deleted automatically. One should use elm_layout_box_remove() to + * make this layout forget about the object. + * + * @see elm_layout_box_append() + * @see elm_layout_box_insert_before() + * @see elm_layout_box_insert_at() + * @see elm_layout_box_remove() + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child); + +/** + * Insert child to layout box part before a reference object. + * + * @param obj the layout object + * @param part the box part to insert. + * @param child the child object to insert into box. + * @param reference another reference object to insert before in box. + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * Once the object is inserted, it will become child of the layout. Its + * lifetime will be bound to the layout, whenever the layout dies the child + * will be deleted automatically. One should use elm_layout_box_remove() to + * make this layout forget about the object. + * + * @see elm_layout_box_append() + * @see elm_layout_box_prepend() + * @see elm_layout_box_insert_before() + * @see elm_layout_box_remove() + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference); + +/** + * Insert child to layout box part at a given position. + * + * @param obj the layout object + * @param part the box part to insert. + * @param child the child object to insert into box. + * @param pos the numeric position >=0 to insert the child. + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * Once the object is inserted, it will become child of the layout. Its + * lifetime will be bound to the layout, whenever the layout dies the child + * will be deleted automatically. One should use elm_layout_box_remove() to + * make this layout forget about the object. + * + * @see elm_layout_box_append() + * @see elm_layout_box_prepend() + * @see elm_layout_box_insert_before() + * @see elm_layout_box_remove() + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos); + +/** + * Remove a child of the given part box. + * + * @param obj The layout object + * @param part The box part name to remove child. + * @param child The object to remove from box. + * @return The object that was being used, or NULL if not found. + * + * The object will be removed from the box part and its lifetime will + * not be handled by the layout anymore. This is equivalent to + * elm_layout_content_unset() for box. + * + * @see elm_layout_box_append() + * @see elm_layout_box_remove_all() + * + * @ingroup Layout + */ +EAPI Evas_Object *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child); + +/** + * Remove all children of the given part box. + * + * @param obj The layout object + * @param part The box part name to remove child. + * @param clear If EINA_TRUE, then all objects will be deleted as + * well, otherwise they will just be removed and will be + * dangling on the canvas. + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * The objects will be removed from the box part and their lifetime will + * not be handled by the layout anymore. This is equivalent to + * elm_layout_box_remove() for all box children. + * + * @see elm_layout_box_append() + * @see elm_layout_box_remove() + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear); + +/** + * Insert child to layout table part. + * + * @param obj the layout object + * @param part the box part to pack child. + * @param child_obj the child object to pack into table. + * @param col the column to which the child should be added. (>= 0) + * @param row the row to which the child should be added. (>= 0) + * @param colspan how many columns should be used to store this object. (>= + * 1) + * @param rowspan how many rows should be used to store this object. (>= 1) + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * Once the object is inserted, it will become child of the table. Its + * lifetime will be bound to the layout, and whenever the layout dies the + * child will be deleted automatically. One should use + * elm_layout_table_remove() to make this layout forget about the object. + * + * If @p colspan or @p rowspan are bigger than 1, that object will occupy + * more space than a single cell. For instance, the following code: + * @code + * elm_layout_table_pack(layout, "table_part", child, 0, 1, 3, 1); + * @endcode + * + * Would result in an object being added like the following picture: + * + * @image html layout_colspan.png + * @image latex layout_colspan.eps width=\textwidth + * + * @see elm_layout_table_unpack() + * @see elm_layout_table_clear() + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan); + +/** + * Unpack (remove) a child of the given part table. + * + * @param obj The layout object + * @param part The table part name to remove child. + * @param child_obj The object to remove from table. + * @return The object that was being used, or NULL if not found. + * + * The object will be unpacked from the table part and its lifetime + * will not be handled by the layout anymore. This is equivalent to + * elm_layout_content_unset() for table. + * + * @see elm_layout_table_pack() + * @see elm_layout_table_clear() + * + * @ingroup Layout + */ +EAPI Evas_Object *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj); + +/** + * Remove all the child objects of the given part table. + * + * @param obj The layout object + * @param part The table part name to remove child. + * @param clear If EINA_TRUE, then all objects will be deleted as + * well, otherwise they will just be removed and will be + * dangling on the canvas. + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * The objects will be removed from the table part and their lifetime will + * not be handled by the layout anymore. This is equivalent to + * elm_layout_table_unpack() for all table children. + * + * @see elm_layout_table_pack() + * @see elm_layout_table_unpack() + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear); + +/** + * Get the edje layout + * + * @param obj The layout object + * + * @return A Evas_Object with the edje layout settings loaded + * with function elm_layout_file_set + * + * This returns the edje object. It is not expected to be used to then + * swallow objects via edje_object_part_swallow() for example. Use + * elm_layout_content_set() instead so child object handling and sizing is + * done properly. + * + * @note This function should only be used if you really need to call some + * low level Edje function on this edje object. All the common stuff (setting + * text, emitting signals, hooking callbacks to signals, etc.) can be done + * with proper elementary functions. + * + * @see elm_layout_signal_callback_add() + * @see elm_layout_signal_emit() + * @see elm_layout_text_set() + * @see elm_layout_content_set() + * @see elm_layout_box_append() + * @see elm_layout_table_pack() + * @see elm_layout_data_get() + * + * @ingroup Layout + */ +EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj); + +/** + * Get the edje data from the given layout + * + * @param obj The layout object + * @param key The data key + * + * @return The edje data string + * + * This function fetches data specified inside the edje theme of this layout. + * This function return NULL if data is not found. + * + * In EDC this comes from a data block within the group block that @p + * obj was loaded from. E.g. + * + * @code + * collections { + * group { + * name: "a_group"; + * data { + * item: "key1" "value1"; + * item: "key2" "value2"; + * } + * } + * } + * @endcode + * + * @ingroup Layout + */ +EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char *key); + +/** + * Eval sizing + * + * @param obj The layout object + * + * Manually forces a sizing re-evaluation. This is useful when the minimum + * size required by the edje theme of this layout has changed. The change on + * the minimum size required by the edje theme is not immediately reported to + * the elementary layout, so one needs to call this function in order to tell + * the widget (layout) that it needs to reevaluate its own size. + * + * The minimum size of the theme is calculated based on minimum size of + * parts, the size of elements inside containers like box and table, etc. All + * of this can change due to state changes, and that's when this function + * should be called. + * + * Also note that a standard signal of "size,eval" "elm" emitted from the + * edje object will cause this to happen too. + * + * @ingroup Layout + */ +EAPI void elm_layout_sizing_eval(Evas_Object *obj); + +/** + * Sets a specific cursor for an edje part. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @param cursor cursor name to use, see Elementary_Cursor.h + * + * @return EINA_TRUE on success or EINA_FALSE on failure, that may be + * part not exists or it has "mouse_events: 0". + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor); + +/** + * Get the cursor to be shown when mouse is over an edje part + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @return the cursor name. + * + * @ingroup Layout + */ +EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name); + +/** + * Unsets a cursor previously set with elm_layout_part_cursor_set(). + * + * @param obj The layout object. + * @param part_name a part from loaded edje group, that had a cursor set + * with elm_layout_part_cursor_set(). + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name); + +/** + * Sets a specific cursor style for an edje part. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @param style the theme style to use (default, transparent, ...) + * + * @return EINA_TRUE on success or EINA_FALSE on failure, that may be + * part not exists or it did not had a cursor set. + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style); + +/** + * Gets a specific cursor style for an edje part. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * + * @return the theme style in use, defaults to "default". If the + * object does not have a cursor set, then NULL is returned. + * + * @ingroup Layout + */ +EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name); + +/** + * Sets if the cursor set should be searched on the theme or should use + * the provided by the engine, only. + * + * @note before you set if should look on theme you should define a + * cursor with elm_layout_part_cursor_set(). By default it will only + * look for cursors provided by the engine. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * @param engine_only if cursors should be just provided by the engine (EINA_TRUE) + * or should also search on widget's theme as well (EINA_FALSE) + * + * @return EINA_TRUE on success or EINA_FALSE on failure, that may be + * part not exists or it did not had a cursor set. + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only); + +/* +* Set accessibility to all texblock(text) parts in the layout object +* +* @param obj The layout object. +* @param can_access makes all textblock(text) parts in the layout @p obj possible +* to have accessibility. @c EINA_TRUE means textblock(text) parts can be accessible +* +* @return @c EINA_TRUE on success or @c EINA_FALSE on failure. If @p obj is not +* a proper layout object, @c EINA_FALSE is returned. +* +* @since 1.7 +* +* @ingroup Layout +*/ +EAPI Eina_Bool elm_layout_edje_object_can_access_set(Evas_Object *obj, Eina_Bool can_access); + +/* +* Get accessibility state of texblock(text) parts in the layout object +* +* @param obj The layout object. +* +* @return @c EINA_TRUE, if all textblock(text) parts in the layout can be accessible +* @c EINA_FALSET if those cannot be accessible. If @p obj is not a proper layout +* object, @c EINA_FALSE is returned. +* +* @see elm_layout_edje_object_access_set() +* +* @since 1.7 +* +* @ingroup Layout +*/ +EAPI Eina_Bool elm_layout_edje_object_can_access_get(Evas_Object *obj); + +/** + * Gets a specific cursor engine_only for an edje part. + * + * @param obj The layout object. + * @param part_name a part from loaded edje group. + * + * @return whenever the cursor is just provided by engine or also from theme. + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name); + +/** + * Set the layout content. + * + * @param obj The layout object + * @param swallow The swallow part name in the edje file + * @param content The child that will be added in this layout object + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * Once the content object is set, a previously set one will be deleted. + * If you want to keep that old content object, use the + * elm_layout_content_unset() function. + * + * @note In an Edje theme, the part used as a content container is called + * @c SWALLOW. This is why the parameter name is called @p swallow, but it is + * expected to be a part name just like the second parameter of + * elm_layout_box_append(). + * + * @see elm_layout_box_append() + * @see elm_layout_content_get() + * @see elm_layout_content_unset() + * + * @see @ref secBox + * + * @ingroup Layout + */ +EAPI Eina_Bool elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content); + +/** + * Get the child object in the given content part. + * + * @param obj The layout object + * @param swallow The SWALLOW part to get its content + * + * @return The swallowed object or NULL if none or an error occurred + * + * @ingroup Layout + */ +EAPI Evas_Object *elm_layout_content_get(const Evas_Object *obj, const char *swallow); + +/** + * Unset the layout content. + * + * @param obj The layout object + * @param swallow The swallow part name in the edje file + * @return The content that was being used + * + * Unparent and return the content object which was set for this part. + * + * @ingroup Layout + */ +EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow); + +/** + * Set the text of the given part + * + * @param obj The layout object + * @param part The TEXT part where to set the text + * @param text The text to set + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + */ +EAPI Eina_Bool elm_layout_text_set(Evas_Object *obj, const char *part, const char *text); + +/** + * Get the text set in the given part + * + * @param obj The layout object + * @param part The TEXT part to retrieve the text off + * + * @return The text set in @p part + */ +EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char *part); + diff --git a/legacy/elementary/src/lib/elm_list.h b/legacy/elementary/src/lib/elm_list.h index e5f5e4a197..774b5bbc68 100644 --- a/legacy/elementary/src/lib/elm_list.h +++ b/legacy/elementary/src/lib/elm_list.h @@ -86,1026 +86,13 @@ * @{ */ -#define ELM_OBJ_LIST_CLASS elm_obj_list_class_get() - - const Eo_Class *elm_obj_list_class_get(void) EINA_CONST; - - extern EAPI Eo_Op ELM_OBJ_LIST_BASE_ID; - - enum -{ - ELM_OBJ_LIST_SUB_ID_GO, - ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_SET, - ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_GET, - ELM_OBJ_LIST_SUB_ID_MODE_SET, - ELM_OBJ_LIST_SUB_ID_MODE_GET, - ELM_OBJ_LIST_SUB_ID_HORIZONTAL_SET, - ELM_OBJ_LIST_SUB_ID_HORIZONTAL_GET, - ELM_OBJ_LIST_SUB_ID_SELECT_MODE_SET, - ELM_OBJ_LIST_SUB_ID_SELECT_MODE_GET, - ELM_OBJ_LIST_SUB_ID_CLEAR, - ELM_OBJ_LIST_SUB_ID_ITEMS_GET, - ELM_OBJ_LIST_SUB_ID_SELECTED_ITEM_GET, - ELM_OBJ_LIST_SUB_ID_SELECTED_ITEMS_GET, - ELM_OBJ_LIST_SUB_ID_ITEM_APPEND, - ELM_OBJ_LIST_SUB_ID_ITEM_PREPEND, - ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_BEFORE, - ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_AFTER, - ELM_OBJ_LIST_SUB_ID_ITEM_SORTED_INSERT, - ELM_OBJ_LIST_SUB_ID_FIRST_ITEM_GET, - ELM_OBJ_LIST_SUB_ID_LAST_ITEM_GET, - ELM_OBJ_LIST_SUB_ID_LAST -}; - -#define ELM_OBJ_LIST_ID(sub_id) (ELM_OBJ_LIST_BASE_ID + sub_id) - - -/** - * @def elm_obj_list_go - * @since 1.8 - * - * Starts the list. - * - * - * @see elm_list_go - */ -#define elm_obj_list_go() ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_GO) - -/** - * @def elm_obj_list_multi_select_set - * @since 1.8 - * - * Enable or disable multiple items selection on the list object. - * - * @param[in] multi - * - * @see elm_list_multi_select_set - */ -#define elm_obj_list_multi_select_set(multi) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_SET), EO_TYPECHECK(Eina_Bool, multi) - -/** - * @def elm_obj_list_multi_select_get - * @since 1.8 - * - * Get a value whether multiple items selection is enabled or not. - * - * @param[out] ret - * - * @see elm_list_multi_select_get - */ -#define elm_obj_list_multi_select_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_list_mode_set - * @since 1.8 - * - * Set which mode to use for the list object. - * - * @param[in] mode - * - * @see elm_list_mode_set - */ -#define elm_obj_list_mode_set(mode) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_List_Mode, mode) - -/** - * @def elm_obj_list_mode_get - * @since 1.8 - * - * Get the mode the list is at. - * - * @param[out] ret - * - * @see elm_list_mode_get - */ -#define elm_obj_list_mode_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_List_Mode *, ret) - -/** - * @def elm_obj_list_horizontal_set - * @since 1.8 - * - * Enable or disable horizontal mode on the list object. - * - * @param[in] horizontal - * - * @see elm_list_horizontal_set - */ -#define elm_obj_list_horizontal_set(horizontal) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal) - -/** - * @def elm_obj_list_horizontal_get - * @since 1.8 - * - * Get a value whether horizontal mode is enabled or not. - * - * @param[out] ret - * - * @see elm_list_horizontal_get - */ -#define elm_obj_list_horizontal_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_list_select_mode_set - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[in] mode - * - * @see elm_list_select_mode_set - */ -#define elm_obj_list_select_mode_set(mode) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode) - -/** - * @def elm_obj_list_select_mode_get - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[out] ret - * - * @see elm_list_select_mode_get - */ -#define elm_obj_list_select_mode_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret) - -/** - * @def elm_obj_list_bounce_set - * @since 1.8 - * - * Set bouncing behaviour when the scrolled content reaches an edge. - * - * @param[in] h_bounce - * @param[in] v_bounce - * - * @see elm_list_bounce_set - */ -#define elm_obj_list_bounce_set(h_bounce, v_bounce) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_SET), EO_TYPECHECK(Eina_Bool, h_bounce), EO_TYPECHECK(Eina_Bool, v_bounce) - -/** - * @def elm_obj_list_bounce_get - * @since 1.8 - * - * Get the bouncing behaviour of the internal scroller. - * - * @param[out] h_bounce - * @param[out] v_bounce - * - * @see elm_list_bounce_get - */ -#define elm_obj_list_bounce_get(h_bounce, v_bounce) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_GET), EO_TYPECHECK(Eina_Bool *, h_bounce), EO_TYPECHECK(Eina_Bool *, v_bounce) - -/** - * @def elm_obj_list_scroller_policy_set - * @since 1.8 - * - * Set the scrollbar policy. - * - * @param[in] policy_h - * @param[in] policy_v - * - * @see elm_list_scroller_policy_set - */ -#define elm_obj_list_scroller_policy_set(policy_h, policy_v) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_SET), EO_TYPECHECK(Elm_Scroller_Policy, policy_h), EO_TYPECHECK(Elm_Scroller_Policy, policy_v) - -/** - * @def elm_obj_list_scroller_policy_get - * @since 1.8 - * - * Get the scrollbar policy. - * - * @param[out] policy_h - * @param[out] policy_v - * - * @see elm_list_scroller_policy_get - */ -#define elm_obj_list_scroller_policy_get(policy_h, policy_v) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_GET), EO_TYPECHECK(Elm_Scroller_Policy *, policy_h), EO_TYPECHECK(Elm_Scroller_Policy *, policy_v) - -/** - * @def elm_obj_list_clear - * @since 1.8 - * - * Remove all list's items. - * - * - * @see elm_list_clear - */ -#define elm_obj_list_clear() ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_CLEAR) - -/** - * @def elm_obj_list_items_get - * @since 1.8 - * - * Get a list of all the list items. - * - * @param[out] ret - * - * @see elm_list_items_get - */ -#define elm_obj_list_items_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret) - -/** - * @def elm_obj_list_selected_item_get - * @since 1.8 - * - * Get the selected item. - * - * @param[out] ret - * - * @see elm_list_selected_item_get - */ -#define elm_obj_list_selected_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_list_selected_items_get - * @since 1.8 - * - * Return a list of the currently selected list items. - * - * @param[out] ret - * - * @see elm_list_selected_items_get - */ -#define elm_obj_list_selected_items_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret) - -/** - * @def elm_obj_list_item_append - * @since 1.8 - * - * Append a new item to the list object. - * - * @param[in] label - * @param[in] icon - * @param[in] end - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_list_item_append - */ -#define elm_obj_list_item_append(label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_list_item_prepend - * @since 1.8 - * - * Prepend a new item to the list object. - * - * @param[in] label - * @param[in] icon - * @param[in] end - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_list_item_prepend - */ -#define elm_obj_list_item_prepend(label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_list_item_insert_before - * @since 1.8 - * - * Insert a new item into the list object before item before. - * - * @param[in] before - * @param[in] label - * @param[in] icon - * @param[in] end - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_list_item_insert_before - */ -#define elm_obj_list_item_insert_before(before, label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_list_item_insert_after - * @since 1.8 - * - * Insert a new item into the list object after item after. - * - * @param[in] after - * @param[in] label - * @param[in] icon - * @param[in] end - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_list_item_insert_after - */ -#define elm_obj_list_item_insert_after(after, label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_list_item_sorted_insert - * @since 1.8 - * - * Insert a new item into the sorted list object. - * - * @param[in] label - * @param[in] icon - * @param[in] end - * @param[in] func - * @param[in] data - * @param[in] cmp_func - * @param[out] ret - * - * @see elm_list_item_sorted_insert - */ -#define elm_obj_list_item_sorted_insert(label, icon, end, func, data, cmp_func, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_SORTED_INSERT), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Eina_Compare_Cb, cmp_func), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_list_first_item_get - * @since 1.8 - * - * Get the first item in the list - * - * @param[out] ret - * - * @see elm_list_first_item_get - */ -#define elm_obj_list_first_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_list_last_item_get - * @since 1.8 - * - * Get the last item in the list - * - * @param[out] ret - * - * @see elm_list_last_item_get - */ -#define elm_obj_list_last_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @enum Elm_List_Mode - * @typedef Elm_List_Mode - * - * Set list's resizing behavior, transverse axis scrolling and items - * cropping. See each mode's description for more details. - * - * @note Default value is #ELM_LIST_SCROLL. - * - * Values here @b don't work as bitmasks -- only one can be chosen at - * a time. - * - * @see elm_list_mode_set() - * @see elm_list_mode_get() - * - * @ingroup List - */ -typedef enum -{ - ELM_LIST_COMPRESS = 0, /**< The list @b won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zeroed dimensions. The list will respect the container's geometry and, if any of its items won't fit into its @b transverse axis, one won't be able to scroll it in that direction. */ - ELM_LIST_SCROLL, /**< Default value. This is the same as #ELM_LIST_COMPRESS, with the exception that if any of its items won't fit into its transverse axis, one @b will be able to scroll it in that direction. */ - ELM_LIST_LIMIT, /**< Sets a minimum size hint on the list object, so that containers may respect it (and resize itself to fit the child properly). More specifically, a @b minimum size hint will be set for its @b transverse axis, so that the @b largest item in that direction fits well. This is naturally bound by the list object's maximum size hints, set externally. */ - ELM_LIST_EXPAND, /**< Besides setting a minimum size on the transverse axis, just like on #ELM_LIST_LIMIT, the list will set a minimum size on the @b longitudinal axis, trying to reserve space to all its children to be visible at a time. . This is naturally bound by the list object's maximum size hints, set externally. */ - ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */ -} Elm_List_Mode; - -/** - * Add a new list widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new list widget handle or @c NULL, on errors. - * - * This function inserts a new list widget on the canvas. - * - * @ingroup List - */ -EAPI Evas_Object *elm_list_add(Evas_Object *parent); - -/** - * Starts the list. - * - * @param obj The list object - * - * @note Call before running show() on the list object. - * @warning If not called, it won't display the list properly. - * - * @code - * li = elm_list_add(win); - * elm_list_item_append(li, "First", NULL, NULL, NULL, NULL); - * elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL); - * elm_list_go(li); - * evas_object_show(li); - * @endcode - * - * @ingroup List - */ -EAPI void elm_list_go(Evas_Object *obj); - -/** - * Enable or disable multiple items selection on the list object. - * - * @param obj The list object - * @param multi @c EINA_TRUE to enable multi selection or @c EINA_FALSE to - * disable it. - * - * Disabled by default. If disabled, the user can select a single item of - * the list each time. Selected items are highlighted on list. - * If enabled, many items can be selected. - * - * If a selected item is selected again, it will be unselected. - * - * @see elm_list_multi_select_get() - * - * @ingroup List - */ -EAPI void elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi); - -/** - * Get a value whether multiple items selection is enabled or not. - * - * @see elm_list_multi_select_set() for details. - * - * @param obj The list object. - * @return @c EINA_TRUE means multiple items selection is enabled. - * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, - * @c EINA_FALSE is returned. - * - * @ingroup List - */ -EAPI Eina_Bool elm_list_multi_select_get(const Evas_Object *obj); - -/** - * Set which mode to use for the list object. - * - * @param obj The list object - * @param mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, - * #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND. - * - * Set list's resize behavior, transverse axis scroll and - * items cropping. See each mode's description for more details. - * - * @note Default value is #ELM_LIST_SCROLL. - * - * Only one mode at a time can be set. If a previous one was set, it - * will be changed by the new mode after this call. Bitmasks won't - * work here as well. - * - * @warning This function's behavior will clash with those of - * elm_scroller_content_min_limit(), so use either one of them, but - * not both. - * - * @see elm_list_mode_get() - * - * @ingroup List - */ -EAPI void elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode); - -/** - * Get the mode the list is at. - * - * @param obj The list object - * @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors. - * - * @note see elm_list_mode_set() for more information. - * - * @ingroup List - */ -EAPI Elm_List_Mode elm_list_mode_get(const Evas_Object *obj); - -/** - * Enable or disable horizontal mode on the list object. - * - * @param obj The list object. - * @param horizontal @c EINA_TRUE to enable horizontal or @c EINA_FALSE to - * disable it, i.e., to enable vertical mode. - * - * @note Vertical mode is set by default. - * - * On horizontal mode items are displayed on list from left to right, - * instead of from top to bottom. Also, the list will scroll horizontally. - * Each item will presents left icon on top and right icon, or end, at - * the bottom. - * - * @see elm_list_horizontal_get() - * - * @ingroup List - */ -EAPI void elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); - -/** - * Get a value whether horizontal mode is enabled or not. - * - * @param obj The list object. - * @return @c EINA_TRUE means horizontal mode selection is enabled. - * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, - * @c EINA_FALSE is returned. - * - * @see elm_list_horizontal_set() for details. - * - * @ingroup List - */ -EAPI Eina_Bool elm_list_horizontal_get(const Evas_Object *obj); - -/** - * Set the list select mode. - * - * @param obj The list object - * @param mode The select mode - * - * elm_list_select_mode_set() changes item select mode in the list widget. - * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and - * callback when first becoming selected. Any further clicks will - * do nothing, unless you set always select mode. - * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, - * every click will make the selected callbacks be called. - * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items - * entirely and they will neither appear selected nor call selected - * callback functions. - * - * @see elm_list_select_mode_get() - * - * @ingroup List - */ -EAPI void elm_list_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode); - -/** - * Get the list select mode. - * - * @param obj The list object - * @return The select mode - * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX) - * - * @see elm_list_select_mode_set() - * - * @ingroup List - */ -EAPI Elm_Object_Select_Mode elm_list_select_mode_get(const Evas_Object *obj); - -/** - * Append a new item to the list object. - * - * @param obj The list object. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and appended to the list, i.e., will - * be set as @b last item. - * - * Items created with this method can be deleted with elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @note Remember that the label parameter is copied inside the list. So if an - * application dynamically allocated the label, the application should free the - * label after this call. - * - * Simple example (with no function callback or data associated): - * @code - * li = elm_list_add(win); - * ic = elm_icon_add(win); - * elm_image_file_set(ic, "path/to/image", NULL); - * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE); - * elm_list_item_append(li, "label", ic, NULL, NULL, NULL); - * elm_list_go(li); - * evas_object_show(li); - * @endcode - * - * @see elm_list_select_mode_set() - * @see elm_object_item_del() - * @see elm_object_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); - -/** - * Prepend a new item to the list object. - * - * @param obj The list object. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and prepended to the list, i.e., will - * be set as @b first item. - * - * Items created with this method can be deleted with elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @note Remember that the label parameter is copied inside the list. So if an - * application dynamically allocated the label, the application should free the - * label after this call. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_select_mode_set() - * @see elm_object_item_del() - * @see elm_object_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); - -/** - * Insert a new item into the list object before item @p before. - * - * @param obj The list object. - * @param before The list item to insert before. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the list. Its position in - * this list will be just before item @p before. - * - * Items created with this method can be deleted with elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @note Remember that the label parameter is copied inside the list. So if an - * application dynamically allocated the label, the application should free the - * label after this call. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_select_mode_set() - * @see elm_object_item_del() - * @see elm_object_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); - -/** - * Insert a new item into the list object after item @p after. - * - * @param obj The list object. - * @param after The list item to insert after. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the list. Its position in - * this list will be just after item @p after. - * - * Items created with this method can be deleted with elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @note Remember that the label parameter is copied inside the list. So if an - * application dynamically allocated the label, the application should free the - * label after this call. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_select_mode_set() - * @see elm_object_item_del() - * @see elm_object_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); - -/** - * Insert a new item into the sorted list object. - * - * @param obj The list object. - * @param label The label of the list item. - * @param icon The icon object to use for the left side of the item. An - * icon can be any Evas object, but usually it is an icon created - * with elm_icon_add(). - * @param end The icon object to use for the right side of the item. An - * icon can be any Evas object. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @param cmp_func The comparing function to be used to sort list - * items by #Elm_Object_Item item handles. This function will - * receive two items and compare them, returning a non-negative integer - * if the second item should be place after the first, or negative value - * if should be placed before. - * - * @return The created item or @c NULL upon failure. - * - * @note This function inserts values into a list object assuming it was - * sorted and the result will be sorted. - * - * A new item will be created and added to the list. Its position in - * this list will be found comparing the new item with previously inserted - * items using function @p cmp_func. - * - * Items created with this method can be deleted with elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If always select is enabled it will call this function every time - * user clicks over an item (already selected or not). - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * @note Remember that the label parameter is copied inside the list. So if an - * application dynamically allocated the label, the application should free the - * label after this call. - * - * @see elm_list_item_append() for a simple code example. - * @see elm_list_select_mode_set() - * @see elm_object_item_del() - * @see elm_object_item_del_cb_set() - * @see elm_list_clear() - * @see elm_icon_add() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func); - -/** - * Remove all list's items. - * - * @param obj The list object - * - * @see elm_object_item_del() - * @see elm_list_item_append() - * - * @ingroup List - */ -EAPI void elm_list_clear(Evas_Object *obj); - -/** - * Get a list of all the list items. - * - * @param obj The list object - * @return An @c Eina_List of list items, #Elm_Object_Item, - * or @c NULL on failure. - * - * @see elm_list_item_append() - * @see elm_object_item_del() - * @see elm_list_clear() - * - * @ingroup List - */ -EAPI const Eina_List *elm_list_items_get(const Evas_Object *obj); - -/** - * Get the selected item. - * - * @param obj The list object. - * @return The selected list item. - * - * The selected item can be unselected with function - * elm_list_item_selected_set(). - * - * The selected item always will be highlighted on list. - * - * @see elm_list_selected_items_get() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_selected_item_get(const Evas_Object *obj); - -/** - * Return a list of the currently selected list items. - * - * @param obj The list object. - * @return An @c Eina_List of list items, #Elm_Object_Item, - * or @c NULL on failure. - * - * Multiple items can be selected if multi select is enabled. It can be - * done with elm_list_multi_select_set(). - * - * @see elm_list_selected_item_get() - * @see elm_list_multi_select_set() - * - * @ingroup List - */ -EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object *obj); - -/** - * Set the selected state of an item. - * - * @param it The list item - * @param selected The selected state - * - * This sets the selected state of the given item @p it. - * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. - * - * If a new item is selected the previously selected will be unselected, - * unless multiple selection is enabled with elm_list_multi_select_set(). - * Previously selected item can be get with function - * elm_list_selected_item_get(). - * - * Selected items will be highlighted. - * - * @see elm_list_item_selected_get() - * @see elm_list_selected_item_get() - * @see elm_list_multi_select_set() - * - * @ingroup List - */ -EAPI void elm_list_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); - -/* - * Get whether the @p item is selected or not. - * - * @param it The list item. - * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates - * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_list_selected_item_set() for details. - * @see elm_list_item_selected_get() - * - * @ingroup List - */ -EAPI Eina_Bool elm_list_item_selected_get(const Elm_Object_Item *it); - -/** - * Set or unset item as a separator. - * - * @param it The list item. - * @param setting @c EINA_TRUE to set item @p it as separator or - * @c EINA_FALSE to unset, i.e., item will be used as a regular item. - * - * Items aren't set as separator by default. - * - * If set as separator it will display separator theme, so won't display - * icons or label. - * - * @see elm_list_item_separator_get() - * - * @ingroup List - */ -EAPI void elm_list_item_separator_set(Elm_Object_Item *it, Eina_Bool setting); - -/** - * Get a value whether item is a separator or not. - * - * @see elm_list_item_separator_set() for details. - * - * @param it The list item. - * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE - * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. - * - * @ingroup List - */ -EAPI Eina_Bool elm_list_item_separator_get(const Elm_Object_Item *it); - -/** - * Show @p item in the list view. - * - * @param it The list item to be shown. - * - * It won't animate list until item is visible. If such behavior is wanted, - * use elm_list_bring_in() instead. - * - * @ingroup List - */ -EAPI void elm_list_item_show(Elm_Object_Item *it); - -/** - * Bring in the given item to list view. - * - * @param it The item. - * - * This causes list to jump to the given item @p item and show it - * (by scrolling), if it is not fully visible. - * - * This may use animation to do so and take a period of time. - * - * If animation isn't wanted, elm_list_item_show() can be used. - * - * @ingroup List - */ -EAPI void elm_list_item_bring_in(Elm_Object_Item *it); - -/** - * Get the real Evas(Edje) object created to implement the view of a given - * list @p item. - * - * @param it The list item - * @return The base Edje object associated with @p it. - * - * Base object is the @c Evas_Object that represents that item. - * - * @ingroup List - */ -EAPI Evas_Object *elm_list_item_object_get(const Elm_Object_Item *it); - -/** - * Get the item before @p it in list. - * - * @param it The list item. - * @return The item before @p it, or @c NULL if none or on failure. - * - * @note If it is the first item, @c NULL will be returned. - * - * @see elm_list_item_append() - * @see elm_list_items_get() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_item_prev(const Elm_Object_Item *it); - -/** - * Get the item after @p it in list. - * - * @param it The list item. - * @return The item after @p it, or @c NULL if none or on failure. - * - * @note If it is the last item, @c NULL will be returned. - * - * @see elm_list_item_append() - * @see elm_list_items_get() - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_item_next(const Elm_Object_Item *it); - -/** - * Get the first item in the list - * - * This returns the first item in the list. - * - * @param obj The list object - * @return The first item, or NULL if none - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_first_item_get(const Evas_Object *obj); - -/** - * Get the last item in the list - * - * This returns the last item in the list. - * - * @return The last item, or NULL if none - * - * @ingroup List - */ -EAPI Elm_Object_Item *elm_list_last_item_get(const Evas_Object *obj); +#include +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_list_common.h b/legacy/elementary/src/lib/elm_list_common.h new file mode 100644 index 0000000000..7da3999f5a --- /dev/null +++ b/legacy/elementary/src/lib/elm_list_common.h @@ -0,0 +1,166 @@ +/** + * @enum Elm_List_Mode + * @typedef Elm_List_Mode + * + * Set list's resizing behavior, transverse axis scrolling and items + * cropping. See each mode's description for more details. + * + * @note Default value is #ELM_LIST_SCROLL. + * + * Values here @b don't work as bitmasks -- only one can be chosen at + * a time. + * + * @see elm_list_mode_set() + * @see elm_list_mode_get() + * + * @ingroup List + */ +typedef enum +{ + ELM_LIST_COMPRESS = 0, /**< The list @b won't set any of its size hints to inform how a possible container should resize it. Then, if it's not created as a "resize object", it might end with zeroed dimensions. The list will respect the container's geometry and, if any of its items won't fit into its @b transverse axis, one won't be able to scroll it in that direction. */ + ELM_LIST_SCROLL, /**< Default value. This is the same as #ELM_LIST_COMPRESS, with the exception that if any of its items won't fit into its transverse axis, one @b will be able to scroll it in that direction. */ + ELM_LIST_LIMIT, /**< Sets a minimum size hint on the list object, so that containers may respect it (and resize itself to fit the child properly). More specifically, a @b minimum size hint will be set for its @b transverse axis, so that the @b largest item in that direction fits well. This is naturally bound by the list object's maximum size hints, set externally. */ + ELM_LIST_EXPAND, /**< Besides setting a minimum size on the transverse axis, just like on #ELM_LIST_LIMIT, the list will set a minimum size on the @b longitudinal axis, trying to reserve space to all its children to be visible at a time. . This is naturally bound by the list object's maximum size hints, set externally. */ + ELM_LIST_LAST /**< Indicates error if returned by elm_list_mode_get() */ +} Elm_List_Mode; + +/** + * Set the selected state of an item. + * + * @param it The list item + * @param selected The selected state + * + * This sets the selected state of the given item @p it. + * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. + * + * If a new item is selected the previously selected will be unselected, + * unless multiple selection is enabled with elm_list_multi_select_set(). + * Previously selected item can be get with function + * elm_list_selected_item_get(). + * + * Selected items will be highlighted. + * + * @see elm_list_item_selected_get() + * @see elm_list_selected_item_get() + * @see elm_list_multi_select_set() + * + * @ingroup List + */ +EAPI void elm_list_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); + +/* + * Get whether the @p item is selected or not. + * + * @param it The list item. + * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates + * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_list_selected_item_set() for details. + * @see elm_list_item_selected_get() + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_item_selected_get(const Elm_Object_Item *it); + +/** + * Set or unset item as a separator. + * + * @param it The list item. + * @param setting @c EINA_TRUE to set item @p it as separator or + * @c EINA_FALSE to unset, i.e., item will be used as a regular item. + * + * Items aren't set as separator by default. + * + * If set as separator it will display separator theme, so won't display + * icons or label. + * + * @see elm_list_item_separator_get() + * + * @ingroup List + */ +EAPI void elm_list_item_separator_set(Elm_Object_Item *it, Eina_Bool setting); + +/** + * Get a value whether item is a separator or not. + * + * @see elm_list_item_separator_set() for details. + * + * @param it The list item. + * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE + * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_item_separator_get(const Elm_Object_Item *it); + +/** + * Show @p item in the list view. + * + * @param it The list item to be shown. + * + * It won't animate list until item is visible. If such behavior is wanted, + * use elm_list_bring_in() instead. + * + * @ingroup List + */ +EAPI void elm_list_item_show(Elm_Object_Item *it); + +/** + * Bring in the given item to list view. + * + * @param it The item. + * + * This causes list to jump to the given item @p item and show it + * (by scrolling), if it is not fully visible. + * + * This may use animation to do so and take a period of time. + * + * If animation isn't wanted, elm_list_item_show() can be used. + * + * @ingroup List + */ +EAPI void elm_list_item_bring_in(Elm_Object_Item *it); + +/** + * Get the real Evas(Edje) object created to implement the view of a given + * list @p item. + * + * @param it The list item + * @return The base Edje object associated with @p it. + * + * Base object is the @c Evas_Object that represents that item. + * + * @ingroup List + */ +EAPI Evas_Object *elm_list_item_object_get(const Elm_Object_Item *it); + +/** + * Get the item before @p it in list. + * + * @param it The list item. + * @return The item before @p it, or @c NULL if none or on failure. + * + * @note If it is the first item, @c NULL will be returned. + * + * @see elm_list_item_append() + * @see elm_list_items_get() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_item_prev(const Elm_Object_Item *it); + +/** + * Get the item after @p it in list. + * + * @param it The list item. + * @return The item after @p it, or @c NULL if none or on failure. + * + * @note If it is the last item, @c NULL will be returned. + * + * @see elm_list_item_append() + * @see elm_list_items_get() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_item_next(const Elm_Object_Item *it); + diff --git a/legacy/elementary/src/lib/elm_list_eo.h b/legacy/elementary/src/lib/elm_list_eo.h new file mode 100644 index 0000000000..26217bb61f --- /dev/null +++ b/legacy/elementary/src/lib/elm_list_eo.h @@ -0,0 +1,360 @@ +/** + * @ingroup List + * + * @{ + */ +#define ELM_OBJ_LIST_CLASS elm_obj_list_class_get() + + const Eo_Class *elm_obj_list_class_get(void) EINA_CONST; + + extern EAPI Eo_Op ELM_OBJ_LIST_BASE_ID; + + enum +{ + ELM_OBJ_LIST_SUB_ID_GO, + ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_SET, + ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_GET, + ELM_OBJ_LIST_SUB_ID_MODE_SET, + ELM_OBJ_LIST_SUB_ID_MODE_GET, + ELM_OBJ_LIST_SUB_ID_HORIZONTAL_SET, + ELM_OBJ_LIST_SUB_ID_HORIZONTAL_GET, + ELM_OBJ_LIST_SUB_ID_SELECT_MODE_SET, + ELM_OBJ_LIST_SUB_ID_SELECT_MODE_GET, + ELM_OBJ_LIST_SUB_ID_CLEAR, + ELM_OBJ_LIST_SUB_ID_ITEMS_GET, + ELM_OBJ_LIST_SUB_ID_SELECTED_ITEM_GET, + ELM_OBJ_LIST_SUB_ID_SELECTED_ITEMS_GET, + ELM_OBJ_LIST_SUB_ID_ITEM_APPEND, + ELM_OBJ_LIST_SUB_ID_ITEM_PREPEND, + ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_BEFORE, + ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_AFTER, + ELM_OBJ_LIST_SUB_ID_ITEM_SORTED_INSERT, + ELM_OBJ_LIST_SUB_ID_FIRST_ITEM_GET, + ELM_OBJ_LIST_SUB_ID_LAST_ITEM_GET, + ELM_OBJ_LIST_SUB_ID_LAST +}; + +#define ELM_OBJ_LIST_ID(sub_id) (ELM_OBJ_LIST_BASE_ID + sub_id) + + +/** + * @def elm_obj_list_go + * @since 1.8 + * + * Starts the list. + * + * + * @see elm_list_go + */ +#define elm_obj_list_go() ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_GO) + +/** + * @def elm_obj_list_multi_select_set + * @since 1.8 + * + * Enable or disable multiple items selection on the list object. + * + * @param[in] multi + * + * @see elm_list_multi_select_set + */ +#define elm_obj_list_multi_select_set(multi) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_SET), EO_TYPECHECK(Eina_Bool, multi) + +/** + * @def elm_obj_list_multi_select_get + * @since 1.8 + * + * Get a value whether multiple items selection is enabled or not. + * + * @param[out] ret + * + * @see elm_list_multi_select_get + */ +#define elm_obj_list_multi_select_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MULTI_SELECT_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_list_mode_set + * @since 1.8 + * + * Set which mode to use for the list object. + * + * @param[in] mode + * + * @see elm_list_mode_set + */ +#define elm_obj_list_mode_set(mode) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_SET), EO_TYPECHECK(Elm_List_Mode, mode) + +/** + * @def elm_obj_list_mode_get + * @since 1.8 + * + * Get the mode the list is at. + * + * @param[out] ret + * + * @see elm_list_mode_get + */ +#define elm_obj_list_mode_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_MODE_GET), EO_TYPECHECK(Elm_List_Mode *, ret) + +/** + * @def elm_obj_list_horizontal_set + * @since 1.8 + * + * Enable or disable horizontal mode on the list object. + * + * @param[in] horizontal + * + * @see elm_list_horizontal_set + */ +#define elm_obj_list_horizontal_set(horizontal) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal) + +/** + * @def elm_obj_list_horizontal_get + * @since 1.8 + * + * Get a value whether horizontal mode is enabled or not. + * + * @param[out] ret + * + * @see elm_list_horizontal_get + */ +#define elm_obj_list_horizontal_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_list_select_mode_set + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[in] mode + * + * @see elm_list_select_mode_set + */ +#define elm_obj_list_select_mode_set(mode) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode) + +/** + * @def elm_obj_list_select_mode_get + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[out] ret + * + * @see elm_list_select_mode_get + */ +#define elm_obj_list_select_mode_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret) + +/** + * @def elm_obj_list_bounce_set + * @since 1.8 + * + * Set bouncing behaviour when the scrolled content reaches an edge. + * + * @param[in] h_bounce + * @param[in] v_bounce + * + * @see elm_list_bounce_set + */ +#define elm_obj_list_bounce_set(h_bounce, v_bounce) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_SET), EO_TYPECHECK(Eina_Bool, h_bounce), EO_TYPECHECK(Eina_Bool, v_bounce) + +/** + * @def elm_obj_list_bounce_get + * @since 1.8 + * + * Get the bouncing behaviour of the internal scroller. + * + * @param[out] h_bounce + * @param[out] v_bounce + * + * @see elm_list_bounce_get + */ +#define elm_obj_list_bounce_get(h_bounce, v_bounce) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_BOUNCE_GET), EO_TYPECHECK(Eina_Bool *, h_bounce), EO_TYPECHECK(Eina_Bool *, v_bounce) + +/** + * @def elm_obj_list_scroller_policy_set + * @since 1.8 + * + * Set the scrollbar policy. + * + * @param[in] policy_h + * @param[in] policy_v + * + * @see elm_list_scroller_policy_set + */ +#define elm_obj_list_scroller_policy_set(policy_h, policy_v) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_SET), EO_TYPECHECK(Elm_Scroller_Policy, policy_h), EO_TYPECHECK(Elm_Scroller_Policy, policy_v) + +/** + * @def elm_obj_list_scroller_policy_get + * @since 1.8 + * + * Get the scrollbar policy. + * + * @param[out] policy_h + * @param[out] policy_v + * + * @see elm_list_scroller_policy_get + */ +#define elm_obj_list_scroller_policy_get(policy_h, policy_v) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SCROLLER_POLICY_GET), EO_TYPECHECK(Elm_Scroller_Policy *, policy_h), EO_TYPECHECK(Elm_Scroller_Policy *, policy_v) + +/** + * @def elm_obj_list_clear + * @since 1.8 + * + * Remove all list's items. + * + * + * @see elm_list_clear + */ +#define elm_obj_list_clear() ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_CLEAR) + +/** + * @def elm_obj_list_items_get + * @since 1.8 + * + * Get a list of all the list items. + * + * @param[out] ret + * + * @see elm_list_items_get + */ +#define elm_obj_list_items_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret) + +/** + * @def elm_obj_list_selected_item_get + * @since 1.8 + * + * Get the selected item. + * + * @param[out] ret + * + * @see elm_list_selected_item_get + */ +#define elm_obj_list_selected_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_list_selected_items_get + * @since 1.8 + * + * Return a list of the currently selected list items. + * + * @param[out] ret + * + * @see elm_list_selected_items_get + */ +#define elm_obj_list_selected_items_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_SELECTED_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret) + +/** + * @def elm_obj_list_item_append + * @since 1.8 + * + * Append a new item to the list object. + * + * @param[in] label + * @param[in] icon + * @param[in] end + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_list_item_append + */ +#define elm_obj_list_item_append(label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_list_item_prepend + * @since 1.8 + * + * Prepend a new item to the list object. + * + * @param[in] label + * @param[in] icon + * @param[in] end + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_list_item_prepend + */ +#define elm_obj_list_item_prepend(label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_list_item_insert_before + * @since 1.8 + * + * Insert a new item into the list object before item before. + * + * @param[in] before + * @param[in] label + * @param[in] icon + * @param[in] end + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_list_item_insert_before + */ +#define elm_obj_list_item_insert_before(before, label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_list_item_insert_after + * @since 1.8 + * + * Insert a new item into the list object after item after. + * + * @param[in] after + * @param[in] label + * @param[in] icon + * @param[in] end + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_list_item_insert_after + */ +#define elm_obj_list_item_insert_after(after, label, icon, end, func, data, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_list_item_sorted_insert + * @since 1.8 + * + * Insert a new item into the sorted list object. + * + * @param[in] label + * @param[in] icon + * @param[in] end + * @param[in] func + * @param[in] data + * @param[in] cmp_func + * @param[out] ret + * + * @see elm_list_item_sorted_insert + */ +#define elm_obj_list_item_sorted_insert(label, icon, end, func, data, cmp_func, ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_ITEM_SORTED_INSERT), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Object *, end), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Eina_Compare_Cb, cmp_func), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_list_first_item_get + * @since 1.8 + * + * Get the first item in the list + * + * @param[out] ret + * + * @see elm_list_first_item_get + */ +#define elm_obj_list_first_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_list_last_item_get + * @since 1.8 + * + * Get the last item in the list + * + * @param[out] ret + * + * @see elm_list_last_item_get + */ +#define elm_obj_list_last_item_get(ret) ELM_OBJ_LIST_ID(ELM_OBJ_LIST_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_list_legacy.h b/legacy/elementary/src/lib/elm_list_legacy.h new file mode 100644 index 0000000000..a9afa841ca --- /dev/null +++ b/legacy/elementary/src/lib/elm_list_legacy.h @@ -0,0 +1,502 @@ +/** + * Add a new list widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new list widget handle or @c NULL, on errors. + * + * This function inserts a new list widget on the canvas. + * + * @ingroup List + */ +EAPI Evas_Object *elm_list_add(Evas_Object *parent); + +/** + * Starts the list. + * + * @param obj The list object + * + * @note Call before running show() on the list object. + * @warning If not called, it won't display the list properly. + * + * @code + * li = elm_list_add(win); + * elm_list_item_append(li, "First", NULL, NULL, NULL, NULL); + * elm_list_item_append(li, "Second", NULL, NULL, NULL, NULL); + * elm_list_go(li); + * evas_object_show(li); + * @endcode + * + * @ingroup List + */ +EAPI void elm_list_go(Evas_Object *obj); + +/** + * Enable or disable multiple items selection on the list object. + * + * @param obj The list object + * @param multi @c EINA_TRUE to enable multi selection or @c EINA_FALSE to + * disable it. + * + * Disabled by default. If disabled, the user can select a single item of + * the list each time. Selected items are highlighted on list. + * If enabled, many items can be selected. + * + * If a selected item is selected again, it will be unselected. + * + * @see elm_list_multi_select_get() + * + * @ingroup List + */ +EAPI void elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi); + +/** + * Get a value whether multiple items selection is enabled or not. + * + * @see elm_list_multi_select_set() for details. + * + * @param obj The list object. + * @return @c EINA_TRUE means multiple items selection is enabled. + * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, + * @c EINA_FALSE is returned. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_multi_select_get(const Evas_Object *obj); + +/** + * Set which mode to use for the list object. + * + * @param obj The list object + * @param mode One of #Elm_List_Mode: #ELM_LIST_COMPRESS, + * #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND. + * + * Set list's resize behavior, transverse axis scroll and + * items cropping. See each mode's description for more details. + * + * @note Default value is #ELM_LIST_SCROLL. + * + * Only one mode at a time can be set. If a previous one was set, it + * will be changed by the new mode after this call. Bitmasks won't + * work here as well. + * + * @warning This function's behavior will clash with those of + * elm_scroller_content_min_limit(), so use either one of them, but + * not both. + * + * @see elm_list_mode_get() + * + * @ingroup List + */ +EAPI void elm_list_mode_set(Evas_Object *obj, Elm_List_Mode mode); + +/** + * Get the mode the list is at. + * + * @param obj The list object + * @return One of #Elm_List_Mode: #ELM_LIST_COMPRESS, #ELM_LIST_SCROLL, #ELM_LIST_LIMIT, #ELM_LIST_EXPAND or #ELM_LIST_LAST on errors. + * + * @note see elm_list_mode_set() for more information. + * + * @ingroup List + */ +EAPI Elm_List_Mode elm_list_mode_get(const Evas_Object *obj); + +/** + * Enable or disable horizontal mode on the list object. + * + * @param obj The list object. + * @param horizontal @c EINA_TRUE to enable horizontal or @c EINA_FALSE to + * disable it, i.e., to enable vertical mode. + * + * @note Vertical mode is set by default. + * + * On horizontal mode items are displayed on list from left to right, + * instead of from top to bottom. Also, the list will scroll horizontally. + * Each item will presents left icon on top and right icon, or end, at + * the bottom. + * + * @see elm_list_horizontal_get() + * + * @ingroup List + */ +EAPI void elm_list_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); + +/** + * Get a value whether horizontal mode is enabled or not. + * + * @param obj The list object. + * @return @c EINA_TRUE means horizontal mode selection is enabled. + * @c EINA_FALSE indicates it's disabled. If @p obj is @c NULL, + * @c EINA_FALSE is returned. + * + * @see elm_list_horizontal_set() for details. + * + * @ingroup List + */ +EAPI Eina_Bool elm_list_horizontal_get(const Evas_Object *obj); + +/** + * Set the list select mode. + * + * @param obj The list object + * @param mode The select mode + * + * elm_list_select_mode_set() changes item select mode in the list widget. + * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and + * callback when first becoming selected. Any further clicks will + * do nothing, unless you set always select mode. + * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, + * every click will make the selected callbacks be called. + * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items + * entirely and they will neither appear selected nor call selected + * callback functions. + * + * @see elm_list_select_mode_get() + * + * @ingroup List + */ +EAPI void elm_list_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode); + +/** + * Get the list select mode. + * + * @param obj The list object + * @return The select mode + * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX) + * + * @see elm_list_select_mode_set() + * + * @ingroup List + */ +EAPI Elm_Object_Select_Mode elm_list_select_mode_get(const Evas_Object *obj); + +/** + * Append a new item to the list object. + * + * @param obj The list object. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and appended to the list, i.e., will + * be set as @b last item. + * + * Items created with this method can be deleted with elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @note Remember that the label parameter is copied inside the list. So if an + * application dynamically allocated the label, the application should free the + * label after this call. + * + * Simple example (with no function callback or data associated): + * @code + * li = elm_list_add(win); + * ic = elm_icon_add(win); + * elm_image_file_set(ic, "path/to/image", NULL); + * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE); + * elm_list_item_append(li, "label", ic, NULL, NULL, NULL); + * elm_list_go(li); + * evas_object_show(li); + * @endcode + * + * @see elm_list_select_mode_set() + * @see elm_object_item_del() + * @see elm_object_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); + +/** + * Prepend a new item to the list object. + * + * @param obj The list object. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and prepended to the list, i.e., will + * be set as @b first item. + * + * Items created with this method can be deleted with elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @note Remember that the label parameter is copied inside the list. So if an + * application dynamically allocated the label, the application should free the + * label after this call. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_select_mode_set() + * @see elm_object_item_del() + * @see elm_object_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); + +/** + * Insert a new item into the list object before item @p before. + * + * @param obj The list object. + * @param before The list item to insert before. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the list. Its position in + * this list will be just before item @p before. + * + * Items created with this method can be deleted with elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @note Remember that the label parameter is copied inside the list. So if an + * application dynamically allocated the label, the application should free the + * label after this call. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_select_mode_set() + * @see elm_object_item_del() + * @see elm_object_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); + +/** + * Insert a new item into the list object after item @p after. + * + * @param obj The list object. + * @param after The list item to insert after. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the list. Its position in + * this list will be just after item @p after. + * + * Items created with this method can be deleted with elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @note Remember that the label parameter is copied inside the list. So if an + * application dynamically allocated the label, the application should free the + * label after this call. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_select_mode_set() + * @see elm_object_item_del() + * @see elm_object_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data); + +/** + * Insert a new item into the sorted list object. + * + * @param obj The list object. + * @param label The label of the list item. + * @param icon The icon object to use for the left side of the item. An + * icon can be any Evas object, but usually it is an icon created + * with elm_icon_add(). + * @param end The icon object to use for the right side of the item. An + * icon can be any Evas object. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @param cmp_func The comparing function to be used to sort list + * items by #Elm_Object_Item item handles. This function will + * receive two items and compare them, returning a non-negative integer + * if the second item should be place after the first, or negative value + * if should be placed before. + * + * @return The created item or @c NULL upon failure. + * + * @note This function inserts values into a list object assuming it was + * sorted and the result will be sorted. + * + * A new item will be created and added to the list. Its position in + * this list will be found comparing the new item with previously inserted + * items using function @p cmp_func. + * + * Items created with this method can be deleted with elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If always select is enabled it will call this function every time + * user clicks over an item (already selected or not). + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * @note Remember that the label parameter is copied inside the list. So if an + * application dynamically allocated the label, the application should free the + * label after this call. + * + * @see elm_list_item_append() for a simple code example. + * @see elm_list_select_mode_set() + * @see elm_object_item_del() + * @see elm_object_item_del_cb_set() + * @see elm_list_clear() + * @see elm_icon_add() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func); + +/** + * Remove all list's items. + * + * @param obj The list object + * + * @see elm_object_item_del() + * @see elm_list_item_append() + * + * @ingroup List + */ +EAPI void elm_list_clear(Evas_Object *obj); + +/** + * Get a list of all the list items. + * + * @param obj The list object + * @return An @c Eina_List of list items, #Elm_Object_Item, + * or @c NULL on failure. + * + * @see elm_list_item_append() + * @see elm_object_item_del() + * @see elm_list_clear() + * + * @ingroup List + */ +EAPI const Eina_List *elm_list_items_get(const Evas_Object *obj); + +/** + * Get the selected item. + * + * @param obj The list object. + * @return The selected list item. + * + * The selected item can be unselected with function + * elm_list_item_selected_set(). + * + * The selected item always will be highlighted on list. + * + * @see elm_list_selected_items_get() + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_selected_item_get(const Evas_Object *obj); + +/** + * Return a list of the currently selected list items. + * + * @param obj The list object. + * @return An @c Eina_List of list items, #Elm_Object_Item, + * or @c NULL on failure. + * + * Multiple items can be selected if multi select is enabled. It can be + * done with elm_list_multi_select_set(). + * + * @see elm_list_selected_item_get() + * @see elm_list_multi_select_set() + * + * @ingroup List + */ +EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object *obj); + +/** + * Get the first item in the list + * + * This returns the first item in the list. + * + * @param obj The list object + * @return The first item, or NULL if none + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_first_item_get(const Evas_Object *obj); + +/** + * Get the last item in the list + * + * This returns the last item in the list. + * + * @return The last item, or NULL if none + * + * @ingroup List + */ +EAPI Elm_Object_Item *elm_list_last_item_get(const Evas_Object *obj); diff --git a/legacy/elementary/src/lib/elm_mapbuf.h b/legacy/elementary/src/lib/elm_mapbuf.h index 69758314ab..2bc77aa0dd 100644 --- a/legacy/elementary/src/lib/elm_mapbuf.h +++ b/legacy/elementary/src/lib/elm_mapbuf.h @@ -31,274 +31,17 @@ * @ref mapbuf_example */ -#define ELM_OBJ_MAPBUF_CLASS elm_obj_mapbuf_class_get() - -const Eo_Class *elm_obj_mapbuf_class_get(void) EINA_CONST; - -extern EAPI Eo_Op ELM_OBJ_MAPBUF_BASE_ID; - -enum -{ - ELM_OBJ_MAPBUF_SUB_ID_ENABLED_SET, - ELM_OBJ_MAPBUF_SUB_ID_ENABLED_GET, - ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_SET, - ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_GET, - ELM_OBJ_MAPBUF_SUB_ID_ALPHA_SET, - ELM_OBJ_MAPBUF_SUB_ID_ALPHA_GET, - ELM_OBJ_MAPBUF_SUB_ID_AUTO_SET, - ELM_OBJ_MAPBUF_SUB_ID_AUTO_GET, - ELM_OBJ_MAPBUF_SUB_ID_LAST -}; - -#define ELM_OBJ_MAPBUF_ID(sub_id) (ELM_OBJ_MAPBUF_BASE_ID + sub_id) - - -/** - * @def elm_obj_mapbuf_enabled_set - * @since 1.8 - * - * Enable or disable the map. - * - * @param[in] enabled - * - * @see elm_mapbuf_enabled_set - */ -#define elm_obj_mapbuf_enabled_set(enabled) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled) - -/** - * @def elm_obj_mapbuf_enabled_get - * @since 1.8 - * - * Get a value whether map is enabled or not. - * - * @param[out] ret - * - * @see elm_mapbuf_enabled_get - */ -#define elm_obj_mapbuf_enabled_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_mapbuf_smooth_set - * @since 1.8 - * - * Enable or disable smooth map rendering. - * - * @param[in] smooth - * - * @see elm_mapbuf_smooth_set - */ -#define elm_obj_mapbuf_smooth_set(smooth) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_SET), EO_TYPECHECK(Eina_Bool, smooth) - -/** - * @def elm_obj_mapbuf_smooth_get - * @since 1.8 - * - * Get a value whether smooth map rendering is enabled or not. - * - * @param[out] ret - * - * @see elm_mapbuf_smooth_get - */ -#define elm_obj_mapbuf_smooth_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_mapbuf_alpha_set - * @since 1.8 - * - * Set or unset alpha flag for map rendering. - * - * @param[in] alpha - * - * @see elm_mapbuf_alpha_set - */ -#define elm_obj_mapbuf_alpha_set(alpha) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_SET), EO_TYPECHECK(Eina_Bool, alpha) - -/** - * @def elm_obj_mapbuf_alpha_get - * @since 1.8 - * - * Get a value whether alpha blending is enabled or not. - * - * @param[out] ret - * - * @see elm_mapbuf_alpha_get - */ -#define elm_obj_mapbuf_alpha_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_mapbuf_auto_set - * @since 1.8 - * - * Set or unset automatic flag for map rendering. - * - * @param[in] on - * - * @see elm_mapbuf_auto_set - */ -#define elm_obj_mapbuf_auto_set(on) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_SET), EO_TYPECHECK(Eina_Bool, on) - -/** - * @def elm_obj_mapbuf_auto_get - * @since 1.8 - * - * Get a value automatic map mode is enabled ore not. - * - * @param[out] ret - * - * @see elm_mapbuf_auto_get - */ -#define elm_obj_mapbuf_auto_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_GET), EO_TYPECHECK(Eina_Bool *, ret) /** * @addtogroup Mapbuf * @{ */ -/** - * Add a new mapbuf widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return A new mapbuf widget handle or @c NULL, on errors. - * - * This function inserts a new mapbuf widget on the canvas. - * - * @ingroup Mapbuf - */ -EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent); - -/** - * Enable or disable the map. - * - * @param obj The mapbuf object. - * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it. - * - * This enables the map that is set or disables it. On enable, the object - * geometry will be saved, and the new geometry will change (position and - * size) to reflect the map geometry set. - * - * Also, when enabled, alpha and smooth states will be used, so if the - * content isn't solid, alpha should be enabled, for example, otherwise - * a black rectangle will fill the content. - * - * When disabled, the stored map will be freed and geometry prior to - * enabling the map will be restored. - * - * It's disabled by default. - * - * @see elm_mapbuf_alpha_set() - * @see elm_mapbuf_smooth_set() - * - * @ingroup Mapbuf - */ -EAPI void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled); - -/** - * Get a value whether map is enabled or not. - * - * @param obj The mapbuf object. - * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates - * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_mapbuf_enabled_set() for details. - * - * @ingroup Mapbuf - */ -EAPI Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj); - -/** - * Enable or disable smooth map rendering. - * - * @param obj The mapbuf object. - * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE - * to disable it. - * - * This sets smoothing for map rendering. If the object is a type that has - * its own smoothing settings, then both the smooth settings for this object - * and the map must be turned off. - * - * By default smooth maps are enabled. - * - * @ingroup Mapbuf - */ -EAPI void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth); - -/** - * Get a value whether smooth map rendering is enabled or not. - * - * @param obj The mapbuf object. - * @return @c EINA_TRUE means smooth map rendering is enabled. @c EINA_FALSE - * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_mapbuf_smooth_set() for details. - * - * @ingroup Mapbuf - */ -EAPI Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj); - -/** - * Set or unset alpha flag for map rendering. - * - * @param obj The mapbuf object. - * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE - * to disable it. - * - * This sets alpha flag for map rendering. If the object is a type that has - * its own alpha settings, then this will take precedence. Only image objects - * have this currently. It stops alpha blending of the map area, and is - * useful if you know the object and/or all sub-objects is 100% solid. - * - * Alpha is enabled by default. - * - * @ingroup Mapbuf - */ -EAPI void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha); - -/** - * Get a value whether alpha blending is enabled or not. - * - * @param obj The mapbuf object. - * @return @c EINA_TRUE means alpha blending is enabled. @c EINA_FALSE - * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_mapbuf_alpha_set() for details. - * - * @ingroup Mapbuf - */ -EAPI Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj); - -/** - * Set or unset auto flag for map rendering. - * - * @param obj The mapbuf object. - * @param on @c EINA_TRUE to enable auto mode or @c EINA_FALSE - * to disable it. - * - * When a ampbuf object has "auto mode" enabled, then it will enable and - * disable map mode based on current visibility. Mapbuf will track if you show - * or hide it AND if the object is inside the canvas viewport or not when it - * is moved or resized. Note that if you turn automode off, then map mode - * will be in a disabled state at this point. When you turn it on for the - * first time, the current state will be evaluated base on current properties - * of the mapbuf object. - * - * Auto mode is disabled by default. - * - * @ingroup Mapbuf - */ -EAPI void elm_mapbuf_auto_set(Evas_Object *obj, Eina_Bool on); - -/** - * Get a value whether auto mode is enabled or not. - * - * @param obj The mapbuf object. - * @return @c EINA_TRUE means autso mode is enabled. @c EINA_FALSE - * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_mapbuf_auto_set() for details. - * - * @ingroup Mapbuf - */ -EAPI Eina_Bool elm_mapbuf_auto_get(const Evas_Object *obj); +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_mapbuf_eo.h b/legacy/elementary/src/lib/elm_mapbuf_eo.h new file mode 100644 index 0000000000..9602e57213 --- /dev/null +++ b/legacy/elementary/src/lib/elm_mapbuf_eo.h @@ -0,0 +1,126 @@ +/** + * @ingroup Mapbuf + * + * @{ + */ +#define ELM_OBJ_MAPBUF_CLASS elm_obj_mapbuf_class_get() + +const Eo_Class *elm_obj_mapbuf_class_get(void) EINA_CONST; + +extern EAPI Eo_Op ELM_OBJ_MAPBUF_BASE_ID; + +enum +{ + ELM_OBJ_MAPBUF_SUB_ID_ENABLED_SET, + ELM_OBJ_MAPBUF_SUB_ID_ENABLED_GET, + ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_SET, + ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_GET, + ELM_OBJ_MAPBUF_SUB_ID_ALPHA_SET, + ELM_OBJ_MAPBUF_SUB_ID_ALPHA_GET, + ELM_OBJ_MAPBUF_SUB_ID_AUTO_SET, + ELM_OBJ_MAPBUF_SUB_ID_AUTO_GET, + ELM_OBJ_MAPBUF_SUB_ID_LAST +}; + +#define ELM_OBJ_MAPBUF_ID(sub_id) (ELM_OBJ_MAPBUF_BASE_ID + sub_id) + + +/** + * @def elm_obj_mapbuf_enabled_set + * @since 1.8 + * + * Enable or disable the map. + * + * @param[in] enabled + * + * @see elm_mapbuf_enabled_set + */ +#define elm_obj_mapbuf_enabled_set(enabled) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled) + +/** + * @def elm_obj_mapbuf_enabled_get + * @since 1.8 + * + * Get a value whether map is enabled or not. + * + * @param[out] ret + * + * @see elm_mapbuf_enabled_get + */ +#define elm_obj_mapbuf_enabled_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_mapbuf_smooth_set + * @since 1.8 + * + * Enable or disable smooth map rendering. + * + * @param[in] smooth + * + * @see elm_mapbuf_smooth_set + */ +#define elm_obj_mapbuf_smooth_set(smooth) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_SET), EO_TYPECHECK(Eina_Bool, smooth) + +/** + * @def elm_obj_mapbuf_smooth_get + * @since 1.8 + * + * Get a value whether smooth map rendering is enabled or not. + * + * @param[out] ret + * + * @see elm_mapbuf_smooth_get + */ +#define elm_obj_mapbuf_smooth_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_SMOOTH_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_mapbuf_alpha_set + * @since 1.8 + * + * Set or unset alpha flag for map rendering. + * + * @param[in] alpha + * + * @see elm_mapbuf_alpha_set + */ +#define elm_obj_mapbuf_alpha_set(alpha) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_SET), EO_TYPECHECK(Eina_Bool, alpha) + +/** + * @def elm_obj_mapbuf_alpha_get + * @since 1.8 + * + * Get a value whether alpha blending is enabled or not. + * + * @param[out] ret + * + * @see elm_mapbuf_alpha_get + */ +#define elm_obj_mapbuf_alpha_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_ALPHA_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_mapbuf_auto_set + * @since 1.8 + * + * Set or unset automatic flag for map rendering. + * + * @param[in] on + * + * @see elm_mapbuf_auto_set + */ +#define elm_obj_mapbuf_auto_set(on) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_SET), EO_TYPECHECK(Eina_Bool, on) + +/** + * @def elm_obj_mapbuf_auto_get + * @since 1.8 + * + * Get a value automatic map mode is enabled ore not. + * + * @param[out] ret + * + * @see elm_mapbuf_auto_get + */ +#define elm_obj_mapbuf_auto_get(ret) ELM_OBJ_MAPBUF_ID(ELM_OBJ_MAPBUF_SUB_ID_AUTO_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_mapbuf_legacy.h b/legacy/elementary/src/lib/elm_mapbuf_legacy.h new file mode 100644 index 0000000000..3f62f22175 --- /dev/null +++ b/legacy/elementary/src/lib/elm_mapbuf_legacy.h @@ -0,0 +1,147 @@ +/** + * Add a new mapbuf widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return A new mapbuf widget handle or @c NULL, on errors. + * + * This function inserts a new mapbuf widget on the canvas. + * + * @ingroup Mapbuf + */ +EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent); + +/** + * Enable or disable the map. + * + * @param obj The mapbuf object. + * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it. + * + * This enables the map that is set or disables it. On enable, the object + * geometry will be saved, and the new geometry will change (position and + * size) to reflect the map geometry set. + * + * Also, when enabled, alpha and smooth states will be used, so if the + * content isn't solid, alpha should be enabled, for example, otherwise + * a black rectangle will fill the content. + * + * When disabled, the stored map will be freed and geometry prior to + * enabling the map will be restored. + * + * It's disabled by default. + * + * @see elm_mapbuf_alpha_set() + * @see elm_mapbuf_smooth_set() + * + * @ingroup Mapbuf + */ +EAPI void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled); + +/** + * Get a value whether map is enabled or not. + * + * @param obj The mapbuf object. + * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates + * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_mapbuf_enabled_set() for details. + * + * @ingroup Mapbuf + */ +EAPI Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj); + +/** + * Enable or disable smooth map rendering. + * + * @param obj The mapbuf object. + * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE + * to disable it. + * + * This sets smoothing for map rendering. If the object is a type that has + * its own smoothing settings, then both the smooth settings for this object + * and the map must be turned off. + * + * By default smooth maps are enabled. + * + * @ingroup Mapbuf + */ +EAPI void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth); + +/** + * Get a value whether smooth map rendering is enabled or not. + * + * @param obj The mapbuf object. + * @return @c EINA_TRUE means smooth map rendering is enabled. @c EINA_FALSE + * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_mapbuf_smooth_set() for details. + * + * @ingroup Mapbuf + */ +EAPI Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj); + +/** + * Set or unset alpha flag for map rendering. + * + * @param obj The mapbuf object. + * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE + * to disable it. + * + * This sets alpha flag for map rendering. If the object is a type that has + * its own alpha settings, then this will take precedence. Only image objects + * have this currently. It stops alpha blending of the map area, and is + * useful if you know the object and/or all sub-objects is 100% solid. + * + * Alpha is enabled by default. + * + * @ingroup Mapbuf + */ +EAPI void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha); + +/** + * Get a value whether alpha blending is enabled or not. + * + * @param obj The mapbuf object. + * @return @c EINA_TRUE means alpha blending is enabled. @c EINA_FALSE + * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_mapbuf_alpha_set() for details. + * + * @ingroup Mapbuf + */ +EAPI Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj); + +/** + * Set or unset auto flag for map rendering. + * + * @param obj The mapbuf object. + * @param on @c EINA_TRUE to enable auto mode or @c EINA_FALSE + * to disable it. + * + * When a ampbuf object has "auto mode" enabled, then it will enable and + * disable map mode based on current visibility. Mapbuf will track if you show + * or hide it AND if the object is inside the canvas viewport or not when it + * is moved or resized. Note that if you turn automode off, then map mode + * will be in a disabled state at this point. When you turn it on for the + * first time, the current state will be evaluated base on current properties + * of the mapbuf object. + * + * Auto mode is disabled by default. + * + * @ingroup Mapbuf + */ +EAPI void elm_mapbuf_auto_set(Evas_Object *obj, Eina_Bool on); + +/** + * Get a value whether auto mode is enabled or not. + * + * @param obj The mapbuf object. + * @return @c EINA_TRUE means autso mode is enabled. @c EINA_FALSE + * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_mapbuf_auto_set() for details. + * + * @ingroup Mapbuf + */ +EAPI Eina_Bool elm_mapbuf_auto_get(const Evas_Object *obj); + diff --git a/legacy/elementary/src/lib/elm_notify.h b/legacy/elementary/src/lib/elm_notify.h index 6842d123e6..170198f483 100644 --- a/legacy/elementary/src/lib/elm_notify.h +++ b/legacy/elementary/src/lib/elm_notify.h @@ -32,223 +32,13 @@ * @{ */ -#define ELM_NOTIFY_ALIGN_FILL -1.0 /**< Use with elm_notify_align_set() @since 1.8 */ - -#define ELM_OBJ_NOTIFY_CLASS elm_obj_notify_class_get() - -const Eo_Class *elm_obj_notify_class_get(void) EINA_CONST; - -extern EAPI Eo_Op ELM_OBJ_NOTIFY_BASE_ID; - -enum -{ - ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_SET, - ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_GET, - ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_SET, - ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_GET, - ELM_OBJ_NOTIFY_SUB_ID_ALIGN_SET, - ELM_OBJ_NOTIFY_SUB_ID_ALIGN_GET, - ELM_OBJ_NOTIFY_SUB_ID_LAST -}; - -#define ELM_OBJ_NOTIFY_ID(sub_id) (ELM_OBJ_NOTIFY_BASE_ID + sub_id) - -/** - * @def elm_obj_notify_timeout_set - * @since 1.8 - * - * @brief Set the time interval after which the notify window is going to be - * - * @param[in] timeout - * - * @see elm_notify_timeout_set - */ -#define elm_obj_notify_timeout_set(timeout) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_SET), EO_TYPECHECK(double, timeout) - -/** - * @def elm_obj_notify_timeout_get - * @since 1.8 - * - * @brief Return the timeout value (in seconds) - * - * @param[out] ret - * - * @see elm_notify_timeout_get - */ -#define elm_obj_notify_timeout_get(ret) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_GET), EO_TYPECHECK(double *, ret) - -/** - * @def elm_obj_notify_allow_events_set - * @since 1.8 - * - * @brief Sets whether events should be passed to by a click outside - * - * @param[in] allow - * - * @see elm_notify_allow_events_set - */ -#define elm_obj_notify_allow_events_set(allow) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_SET), EO_TYPECHECK(Eina_Bool, allow) - -/** - * @def elm_obj_notify_allow_events_get - * @since 1.8 - * - * @brief Return true if events are allowed below the notify object - * - * @param[out] ret - * - * @see elm_notify_allow_events_get - */ -#define elm_obj_notify_allow_events_get(ret) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_notify_align_set - * @since 1.8 - * - * @brief Set the alignment of the notify object - * - * @param[in] horizontal - * @param[in] vertical - * - * @see elm_notify_align_set - */ -#define elm_obj_notify_align_set(horizontal, vertical) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, horizontal), EO_TYPECHECK(double, vertical) - -/** - * @def elm_obj_notify_align_get - * @since 1.8 - * - * @brief Return the alignment of the notify object - * - * @param[out] horizontal - * @param[out] vertical - * - * @see elm_notify_align_get - */ -#define elm_obj_notify_align_get(horizontal, vertical) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, horizontal), EO_TYPECHECK(double *, vertical) - -/** - * @brief Add a new notify to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Notify - */ -EAPI Evas_Object *elm_notify_add(Evas_Object *parent); - -/** - * @brief Set the notify parent - * - * @param obj The notify object - * @param parent The new parent - * - * Once the parent object is set, a previously set one will be disconnected - * and replaced. - * - * @ingroup Notify - */ -EAPI void elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent); - -/** - * @brief Get the notify parent - * - * @param obj The notify object - * @return The parent - * - * @see elm_notify_parent_set() - * - * @ingroup Notify - */ -EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj); - -/** - * @brief Set the time interval after which the notify window is going to be - * hidden. - * - * @param obj The notify object - * @param timeout The timeout in seconds - * - * This function sets a timeout and starts the timer controlling when the - * notify is hidden. Since calling evas_object_show() on a notify restarts - * the timer controlling when the notify is hidden, setting this before the - * notify is shown will in effect mean starting the timer when the notify is - * shown. - * - * @note Set a value <= 0.0 to disable a running timer. - * - * @note If the value > 0.0 and the notify is previously visible, the - * timer will be started with this value, canceling any running timer. - * - * @ingroup Notify - */ -EAPI void elm_notify_timeout_set(Evas_Object *obj, double timeout); - -/** - * @brief Return the timeout value (in seconds) - * @param obj the notify object - * - * @see elm_notify_timeout_set() - * - * @ingroup Notify - */ -EAPI double elm_notify_timeout_get(const Evas_Object *obj); - -/** - * @brief Sets whether events should be passed to by a click outside - * its area. - * - * @param obj The notify object - * @param allow EINA_TRUE If events are allowed, otherwise not - * - * When true if the user clicks outside the window the events will be caught - * by the others widgets, else the events are blocked. - * - * @note The default value is EINA_TRUE. - * - * @ingroup Notify - */ -EAPI void elm_notify_allow_events_set(Evas_Object *obj, Eina_Bool allow); - -/** - * @brief Return true if events are allowed below the notify object - * @param obj the notify object - * - * @see elm_notify_allow_events_set() - * - * @ingroup Notify - */ -EAPI Eina_Bool elm_notify_allow_events_get(const Evas_Object *obj); - -/** - * @brief Set the alignment of the notify object - * - * @param obj The notify object - * @param horizontal The horizontal alignment of the notification - * @param vertical The vertical alignment of the notification - * - * Sets the alignment in which the notify will appear in its parent. - * - * @note To fill the notify box in the parent area, please pass the - * @c ELM_NOTIFY_ALIGN_FILL to @p horizontal, @p vertical. - * - * @since 1.8 - * @ingroup Notify - */ -EAPI void elm_notify_align_set(Evas_Object *obj, double horizontal, double vertical); - -/** - * @brief Get the alignment of the notify object - * @param obj The notify object - * @param horizontal The horizontal alignment of the notification - * @param vertical The vertical alignment of the notification - * - * @see elm_notify_align_set() - * - * @since 1.8 - * @ingroup Notify - */ -EAPI void elm_notify_align_get(const Evas_Object *obj, double *horizontal, double *vertical); +#include +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_notify_common.h b/legacy/elementary/src/lib/elm_notify_common.h new file mode 100644 index 0000000000..0d3b435c4b --- /dev/null +++ b/legacy/elementary/src/lib/elm_notify_common.h @@ -0,0 +1 @@ +#define ELM_NOTIFY_ALIGN_FILL -1.0 /**< Use with elm_notify_align_set() @since 1.8 */ diff --git a/legacy/elementary/src/lib/elm_notify_eo.h b/legacy/elementary/src/lib/elm_notify_eo.h new file mode 100644 index 0000000000..d0f83896e5 --- /dev/null +++ b/legacy/elementary/src/lib/elm_notify_eo.h @@ -0,0 +1,102 @@ +/** + * @ingroup Notify + * + * @{ + */ +#define ELM_OBJ_NOTIFY_CLASS elm_obj_notify_class_get() + +const Eo_Class *elm_obj_notify_class_get(void) EINA_CONST; + +extern EAPI Eo_Op ELM_OBJ_NOTIFY_BASE_ID; + +enum +{ + ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_SET, + ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_GET, + ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_SET, + ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_GET, + ELM_OBJ_NOTIFY_SUB_ID_ALIGN_SET, + ELM_OBJ_NOTIFY_SUB_ID_ALIGN_GET, + ELM_OBJ_NOTIFY_SUB_ID_LAST +}; + +#define ELM_OBJ_NOTIFY_ID(sub_id) (ELM_OBJ_NOTIFY_BASE_ID + sub_id) + +/** + * @def elm_obj_notify_timeout_set + * @since 1.8 + * + * @brief Set the time interval after which the notify window is going to be + * + * @param[in] timeout + * + * @see elm_notify_timeout_set + */ +#define elm_obj_notify_timeout_set(timeout) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_SET), EO_TYPECHECK(double, timeout) + +/** + * @def elm_obj_notify_timeout_get + * @since 1.8 + * + * @brief Return the timeout value (in seconds) + * + * @param[out] ret + * + * @see elm_notify_timeout_get + */ +#define elm_obj_notify_timeout_get(ret) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_TIMEOUT_GET), EO_TYPECHECK(double *, ret) + +/** + * @def elm_obj_notify_allow_events_set + * @since 1.8 + * + * @brief Sets whether events should be passed to by a click outside + * + * @param[in] allow + * + * @see elm_notify_allow_events_set + */ +#define elm_obj_notify_allow_events_set(allow) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_SET), EO_TYPECHECK(Eina_Bool, allow) + +/** + * @def elm_obj_notify_allow_events_get + * @since 1.8 + * + * @brief Return true if events are allowed below the notify object + * + * @param[out] ret + * + * @see elm_notify_allow_events_get + */ +#define elm_obj_notify_allow_events_get(ret) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALLOW_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_notify_align_set + * @since 1.8 + * + * @brief Set the alignment of the notify object + * + * @param[in] horizontal + * @param[in] vertical + * + * @see elm_notify_align_set + */ +#define elm_obj_notify_align_set(horizontal, vertical) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, horizontal), EO_TYPECHECK(double, vertical) + +/** + * @def elm_obj_notify_align_get + * @since 1.8 + * + * @brief Return the alignment of the notify object + * + * @param[out] horizontal + * @param[out] vertical + * + * @see elm_notify_align_get + */ +#define elm_obj_notify_align_get(horizontal, vertical) ELM_OBJ_NOTIFY_ID(ELM_OBJ_NOTIFY_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, horizontal), EO_TYPECHECK(double *, vertical) + + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_notify_legacy.h b/legacy/elementary/src/lib/elm_notify_legacy.h new file mode 100644 index 0000000000..594718a6c3 --- /dev/null +++ b/legacy/elementary/src/lib/elm_notify_legacy.h @@ -0,0 +1,123 @@ +/** + * @brief Add a new notify to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Notify + */ +EAPI Evas_Object *elm_notify_add(Evas_Object *parent); + +/** + * @brief Set the notify parent + * + * @param obj The notify object + * @param parent The new parent + * + * Once the parent object is set, a previously set one will be disconnected + * and replaced. + * + * @ingroup Notify + */ +EAPI void elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent); + +/** + * @brief Get the notify parent + * + * @param obj The notify object + * @return The parent + * + * @see elm_notify_parent_set() + * + * @ingroup Notify + */ +EAPI Evas_Object *elm_notify_parent_get(const Evas_Object *obj); + +/** + * @brief Set the time interval after which the notify window is going to be + * hidden. + * + * @param obj The notify object + * @param timeout The timeout in seconds + * + * This function sets a timeout and starts the timer controlling when the + * notify is hidden. Since calling evas_object_show() on a notify restarts + * the timer controlling when the notify is hidden, setting this before the + * notify is shown will in effect mean starting the timer when the notify is + * shown. + * + * @note Set a value <= 0.0 to disable a running timer. + * + * @note If the value > 0.0 and the notify is previously visible, the + * timer will be started with this value, canceling any running timer. + * + * @ingroup Notify + */ +EAPI void elm_notify_timeout_set(Evas_Object *obj, double timeout); + +/** + * @brief Return the timeout value (in seconds) + * @param obj the notify object + * + * @see elm_notify_timeout_set() + * + * @ingroup Notify + */ +EAPI double elm_notify_timeout_get(const Evas_Object *obj); + +/** + * @brief Sets whether events should be passed to by a click outside + * its area. + * + * @param obj The notify object + * @param allow EINA_TRUE If events are allowed, otherwise not + * + * When true if the user clicks outside the window the events will be caught + * by the others widgets, else the events are blocked. + * + * @note The default value is EINA_TRUE. + * + * @ingroup Notify + */ +EAPI void elm_notify_allow_events_set(Evas_Object *obj, Eina_Bool allow); + +/** + * @brief Return true if events are allowed below the notify object + * @param obj the notify object + * + * @see elm_notify_allow_events_set() + * + * @ingroup Notify + */ +EAPI Eina_Bool elm_notify_allow_events_get(const Evas_Object *obj); + +/** + * @brief Set the alignment of the notify object + * + * @param obj The notify object + * @param horizontal The horizontal alignment of the notification + * @param vertical The vertical alignment of the notification + * + * Sets the alignment in which the notify will appear in its parent. + * + * @note To fill the notify box in the parent area, please pass the + * @c ELM_NOTIFY_ALIGN_FILL to @p horizontal, @p vertical. + * + * @since 1.8 + * @ingroup Notify + */ +EAPI void elm_notify_align_set(Evas_Object *obj, double horizontal, double vertical); + +/** + * @brief Get the alignment of the notify object + * @param obj The notify object + * @param horizontal The horizontal alignment of the notification + * @param vertical The vertical alignment of the notification + * + * @see elm_notify_align_set() + * + * @since 1.8 + * @ingroup Notify + */ +EAPI void elm_notify_align_get(const Evas_Object *obj, double *horizontal, double *vertical); + diff --git a/legacy/elementary/src/lib/elm_photo.h b/legacy/elementary/src/lib/elm_photo.h index 7c8a64b31a..db928f07ab 100644 --- a/legacy/elementary/src/lib/elm_photo.h +++ b/legacy/elementary/src/lib/elm_photo.h @@ -24,269 +24,12 @@ * @{ */ -#define ELM_OBJ_PHOTO_CLASS elm_obj_photo_class_get() - -const Eo_Class *elm_obj_photo_class_get(void) EINA_CONST; - -extern EAPI Eo_Op ELM_OBJ_PHOTO_BASE_ID; - -enum -{ - ELM_OBJ_PHOTO_SUB_ID_FILE_SET, - ELM_OBJ_PHOTO_SUB_ID_SIZE_SET, - ELM_OBJ_PHOTO_SUB_ID_SIZE_GET, - ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_SET, - ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_GET, - ELM_OBJ_PHOTO_SUB_ID_EDITABLE_SET, - ELM_OBJ_PHOTO_SUB_ID_EDITABLE_GET, - ELM_OBJ_PHOTO_SUB_ID_THUMB_SET, - ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_SET, - ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_GET, - ELM_OBJ_PHOTO_SUB_ID_LAST -}; - -#define ELM_OBJ_PHOTO_ID(sub_id) (ELM_OBJ_PHOTO_BASE_ID + sub_id) - - -/** - * @def elm_obj_photo_add - * @since 1.8 - * - * Add a new photo to the parent - * - * @param[out] ret - * - * @see elm_photo_add - */ -#define elm_obj_photo_add(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_ADD), EO_TYPECHECK(Evas_Object **, ret) - -/** - * @def elm_obj_photo_file_set - * @since 1.8 - * - * Set the file that will be used as the photo widget's image. - * - * @param[in] file - * @param[out] ret - * - * @see elm_photo_file_set - */ -#define elm_obj_photo_file_set(file, ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_photo_size_set - * @since 1.8 - * - * Set the size that will be used on the photo - * - * @param[in] size - * - * @see elm_photo_size_set - */ -#define elm_obj_photo_size_set(size) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_SIZE_SET), EO_TYPECHECK(int, size) - -/** - * @def elm_obj_photo_size_get - * @since 1.8 - * - * Get the size that will be used on the photo - * - * @param[out] ret - * - * @note There is no elm_photo_size_get - * - * @see elm_photo_size_set - * @see elm_obj_photo_size_set - */ -#define elm_obj_photo_size_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_SIZE_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_photo_fill_inside_set - * @since 1.8 - * - * Set if the photo should be completely visible or not. - * - * @param[in] fill - * - * @see elm_photo_fill_inside_set - */ -#define elm_obj_photo_fill_inside_set(fill) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_SET), EO_TYPECHECK(Eina_Bool, fill) - -/** - * @def elm_obj_photo_fill_inside_get - * @since 1.8 - * - * Get if the photo should be completely visible or not. - * - * @param[out] ret - * - * @note There is no elm_photo_fill_inside_get - * - * @see elm_photo_fill_inside_set - * @see elm_obj_photo_fill_inside_set - */ -#define elm_obj_photo_fill_inside_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_photo_editable_set - * @since 1.8 - * - * Set editability of the photo. - * - * @param[in] set - * - * @see elm_photo_editable_set - */ -#define elm_obj_photo_editable_set(set) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_EDITABLE_SET), EO_TYPECHECK(Eina_Bool, set) - -/** - * @def elm_obj_photo_editable_get - * @since 1.8 - * - * Get editability of the photo. - * - * @param[out] ret - * - * @note There is no elm_photo_editable_get - * - * @see elm_photo_editable_set - * @see elm_obj_photo_editable_set - */ -#define elm_obj_photo_editable_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_EDITABLE_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_photo_thumb_set - * @since 1.8 - * - * Set the file that will be used as thumbnail in the photo. - * - * @param[in] file - * @param[in] group - * - * @see elm_photo_thumb_set - */ -#define elm_obj_photo_thumb_set(file, group) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_THUMB_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group) - -/** - * @def elm_obj_photo_aspect_fixed_set - * @since 1.8 - * - * Set whether the original aspect ratio of the photo should be kept on resize. - * - * @param[in] fixed - * - * @see elm_photo_aspect_fixed_set - */ -#define elm_obj_photo_aspect_fixed_set(fixed) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_SET), EO_TYPECHECK(Eina_Bool, fixed) - -/** - * @def elm_obj_photo_aspect_fixed_get - * @since 1.8 - * - * Get if the object keeps the original aspect ratio. - * - * @param[out] ret - * - * @see elm_photo_aspect_fixed_get - */ -#define elm_obj_photo_aspect_fixed_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * Add a new photo to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Photo - */ -EAPI Evas_Object *elm_photo_add(Evas_Object *parent); - -/** - * Set the file that will be used as the photo widget's image. - * - * @param obj The photo object - * @param file The path to file that will be used as @a obj's image. - * - * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise - * - * @note Use @c NULL on @a file to set the photo widget back to it's - * initial state, which indicates "no photo". - * - * @ingroup Photo - */ -EAPI Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file); - -/** - * Set the file that will be used as thumbnail in the photo. - * - * @param obj The photo object. - * @param file The path to file that will be used as thumbnail. - * @param group The key used in case of an EET file. - * - * @ingroup Photo - */ -EAPI void elm_photo_thumb_set(const Evas_Object *obj, const char *file, const char *group); - -/** - * Set the size that will be used on the photo - * - * @param obj The photo object - * @param size The size of the photo - * - * @ingroup Photo - */ -EAPI void elm_photo_size_set(Evas_Object *obj, int size); - -/** - * Set if the photo should be completely visible or not. - * - * @param obj The photo object - * @param fill if true the photo will be completely visible - * - * @ingroup Photo - */ -EAPI void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill); - -/** - * Set editability of the photo. - * - * An editable photo can be dragged to or from, and can be cut or - * pasted too. Note that pasting an image or dropping an item on - * the image will delete the existing content. - * - * @param obj The photo object. - * @param set To set of clear editability. - */ -EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set); - -/** - * Set whether the original aspect ratio of the photo should be kept on resize. - * - * @param obj The photo object. - * @param fixed @c EINA_TRUE if the photo should fix the aspect, - * @c EINA_FALSE otherwise. - * - * The original aspect ratio (width / height) of the photo is usually - * distorted to match the object's size. Enabling this option will fix - * this original aspect, and the way that the photo is fit into - * the object's area - * - * @see elm_photo_aspect_fixed_get() - * - * @ingroup Photo - */ -EAPI void elm_photo_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed); - -/** - * Get if the object keeps the original aspect ratio. - * - * @param obj The photo object. - * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE - * otherwise. - * - * @ingroup Photo - */ -EAPI Eina_Bool elm_photo_aspect_fixed_get(const Evas_Object *obj); +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_photo_eo.h b/legacy/elementary/src/lib/elm_photo_eo.h new file mode 100644 index 0000000000..35e9c6136b --- /dev/null +++ b/legacy/elementary/src/lib/elm_photo_eo.h @@ -0,0 +1,176 @@ +/** + * @ingroup Photo + * + * @{ + */ +#define ELM_OBJ_PHOTO_CLASS elm_obj_photo_class_get() + +const Eo_Class *elm_obj_photo_class_get(void) EINA_CONST; + +extern EAPI Eo_Op ELM_OBJ_PHOTO_BASE_ID; + +enum +{ + ELM_OBJ_PHOTO_SUB_ID_FILE_SET, + ELM_OBJ_PHOTO_SUB_ID_SIZE_SET, + ELM_OBJ_PHOTO_SUB_ID_SIZE_GET, + ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_SET, + ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_GET, + ELM_OBJ_PHOTO_SUB_ID_EDITABLE_SET, + ELM_OBJ_PHOTO_SUB_ID_EDITABLE_GET, + ELM_OBJ_PHOTO_SUB_ID_THUMB_SET, + ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_SET, + ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_GET, + ELM_OBJ_PHOTO_SUB_ID_LAST +}; + +#define ELM_OBJ_PHOTO_ID(sub_id) (ELM_OBJ_PHOTO_BASE_ID + sub_id) + + +/** + * @def elm_obj_photo_add + * @since 1.8 + * + * Add a new photo to the parent + * + * @param[out] ret + * + * @see elm_photo_add + */ +#define elm_obj_photo_add(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_ADD), EO_TYPECHECK(Evas_Object **, ret) + +/** + * @def elm_obj_photo_file_set + * @since 1.8 + * + * Set the file that will be used as the photo widget's image. + * + * @param[in] file + * @param[out] ret + * + * @see elm_photo_file_set + */ +#define elm_obj_photo_file_set(file, ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_photo_size_set + * @since 1.8 + * + * Set the size that will be used on the photo + * + * @param[in] size + * + * @see elm_photo_size_set + */ +#define elm_obj_photo_size_set(size) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_SIZE_SET), EO_TYPECHECK(int, size) + +/** + * @def elm_obj_photo_size_get + * @since 1.8 + * + * Get the size that will be used on the photo + * + * @param[out] ret + * + * @note There is no elm_photo_size_get + * + * @see elm_photo_size_set + * @see elm_obj_photo_size_set + */ +#define elm_obj_photo_size_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_SIZE_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_photo_fill_inside_set + * @since 1.8 + * + * Set if the photo should be completely visible or not. + * + * @param[in] fill + * + * @see elm_photo_fill_inside_set + */ +#define elm_obj_photo_fill_inside_set(fill) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_SET), EO_TYPECHECK(Eina_Bool, fill) + +/** + * @def elm_obj_photo_fill_inside_get + * @since 1.8 + * + * Get if the photo should be completely visible or not. + * + * @param[out] ret + * + * @note There is no elm_photo_fill_inside_get + * + * @see elm_photo_fill_inside_set + * @see elm_obj_photo_fill_inside_set + */ +#define elm_obj_photo_fill_inside_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_FILL_INSIDE_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_photo_editable_set + * @since 1.8 + * + * Set editability of the photo. + * + * @param[in] set + * + * @see elm_photo_editable_set + */ +#define elm_obj_photo_editable_set(set) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_EDITABLE_SET), EO_TYPECHECK(Eina_Bool, set) + +/** + * @def elm_obj_photo_editable_get + * @since 1.8 + * + * Get editability of the photo. + * + * @param[out] ret + * + * @note There is no elm_photo_editable_get + * + * @see elm_photo_editable_set + * @see elm_obj_photo_editable_set + */ +#define elm_obj_photo_editable_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_EDITABLE_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_photo_thumb_set + * @since 1.8 + * + * Set the file that will be used as thumbnail in the photo. + * + * @param[in] file + * @param[in] group + * + * @see elm_photo_thumb_set + */ +#define elm_obj_photo_thumb_set(file, group) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_THUMB_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group) + +/** + * @def elm_obj_photo_aspect_fixed_set + * @since 1.8 + * + * Set whether the original aspect ratio of the photo should be kept on resize. + * + * @param[in] fixed + * + * @see elm_photo_aspect_fixed_set + */ +#define elm_obj_photo_aspect_fixed_set(fixed) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_SET), EO_TYPECHECK(Eina_Bool, fixed) + +/** + * @def elm_obj_photo_aspect_fixed_get + * @since 1.8 + * + * Get if the object keeps the original aspect ratio. + * + * @param[out] ret + * + * @see elm_photo_aspect_fixed_get + */ +#define elm_obj_photo_aspect_fixed_get(ret) ELM_OBJ_PHOTO_ID(ELM_OBJ_PHOTO_SUB_ID_ASPECT_FIXED_GET), EO_TYPECHECK(Eina_Bool *, ret) + + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_photo_legacy.h b/legacy/elementary/src/lib/elm_photo_legacy.h new file mode 100644 index 0000000000..034178eda5 --- /dev/null +++ b/legacy/elementary/src/lib/elm_photo_legacy.h @@ -0,0 +1,98 @@ +/** + * Add a new photo to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Photo + */ +EAPI Evas_Object *elm_photo_add(Evas_Object *parent); + +/** + * Set the file that will be used as the photo widget's image. + * + * @param obj The photo object + * @param file The path to file that will be used as @a obj's image. + * + * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise + * + * @note Use @c NULL on @a file to set the photo widget back to it's + * initial state, which indicates "no photo". + * + * @ingroup Photo + */ +EAPI Eina_Bool elm_photo_file_set(Evas_Object *obj, const char *file); + +/** + * Set the file that will be used as thumbnail in the photo. + * + * @param obj The photo object. + * @param file The path to file that will be used as thumbnail. + * @param group The key used in case of an EET file. + * + * @ingroup Photo + */ +EAPI void elm_photo_thumb_set(const Evas_Object *obj, const char *file, const char *group); + +/** + * Set the size that will be used on the photo + * + * @param obj The photo object + * @param size The size of the photo + * + * @ingroup Photo + */ +EAPI void elm_photo_size_set(Evas_Object *obj, int size); + +/** + * Set if the photo should be completely visible or not. + * + * @param obj The photo object + * @param fill if true the photo will be completely visible + * + * @ingroup Photo + */ +EAPI void elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill); + +/** + * Set editability of the photo. + * + * An editable photo can be dragged to or from, and can be cut or + * pasted too. Note that pasting an image or dropping an item on + * the image will delete the existing content. + * + * @param obj The photo object. + * @param set To set of clear editability. + */ +EAPI void elm_photo_editable_set(Evas_Object *obj, Eina_Bool set); + +/** + * Set whether the original aspect ratio of the photo should be kept on resize. + * + * @param obj The photo object. + * @param fixed @c EINA_TRUE if the photo should fix the aspect, + * @c EINA_FALSE otherwise. + * + * The original aspect ratio (width / height) of the photo is usually + * distorted to match the object's size. Enabling this option will fix + * this original aspect, and the way that the photo is fit into + * the object's area + * + * @see elm_photo_aspect_fixed_get() + * + * @ingroup Photo + */ +EAPI void elm_photo_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed); + +/** + * Get if the object keeps the original aspect ratio. + * + * @param obj The photo object. + * @return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE + * otherwise. + * + * @ingroup Photo + */ +EAPI Eina_Bool elm_photo_aspect_fixed_get(const Evas_Object *obj); + + diff --git a/legacy/elementary/src/lib/elm_prefs_eo.h b/legacy/elementary/src/lib/elm_prefs_eo.h index 72ebcc3895..7605f3bf18 100644 --- a/legacy/elementary/src/lib/elm_prefs_eo.h +++ b/legacy/elementary/src/lib/elm_prefs_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Prefs + * + * @{ + */ #define ELM_OBJ_PREFS_CLASS elm_obj_prefs_class_get() const Eo_Class *elm_obj_prefs_class_get(void) EINA_CONST; @@ -347,3 +352,6 @@ enum EO_TYPECHECK(const char *,name), \ EO_TYPECHECK(Evas_Object **, ret) //FIXME: ret == EObject? +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_prefs_legacy.h b/legacy/elementary/src/lib/elm_prefs_legacy.h index 9638e4fb61..d0d3d47730 100644 --- a/legacy/elementary/src/lib/elm_prefs_legacy.h +++ b/legacy/elementary/src/lib/elm_prefs_legacy.h @@ -1,3 +1,8 @@ +/** + * @ingroup Prefs + * + * @{ + */ EAPI Eina_Bool elm_prefs_page_widget_common_add(Evas_Object *prefs, Evas_Object *obj); /** @@ -366,3 +371,6 @@ EAPI Eina_Bool elm_prefs_item_swallow(Evas_Object *obj, */ EAPI Evas_Object *elm_prefs_item_unswallow(Evas_Object *obj, const char *name); +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_scroller.h b/legacy/elementary/src/lib/elm_scroller.h index 6d2be4265d..0ab73df801 100644 --- a/legacy/elementary/src/lib/elm_scroller.h +++ b/legacy/elementary/src/lib/elm_scroller.h @@ -61,605 +61,13 @@ * @{ */ -#define ELM_OBJ_SCROLLER_CLASS elm_obj_scroller_class_get() - -const Eo_Class *elm_obj_scroller_class_get(void) EINA_CONST; - -extern EAPI Eo_Op ELM_OBJ_SCROLLER_BASE_ID; - -enum -{ - ELM_OBJ_SCROLLER_SUB_ID_CUSTOM_WIDGET_BASE_THEME_SET, - ELM_OBJ_SCROLLER_SUB_ID_REGION_GET, - ELM_OBJ_SCROLLER_SUB_ID_CHILD_SIZE_GET, - ELM_OBJ_SCROLLER_SUB_ID_PAGE_RELATIVE_SET, - ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_SET, - ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_GET, - ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_SET, - ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_GET, - ELM_OBJ_SCROLLER_SUB_ID_LAST -}; - -#define ELM_OBJ_SCROLLER_ID(sub_id) (ELM_OBJ_SCROLLER_BASE_ID + sub_id) - - -/** - * @def elm_obj_scroller_custom_widget_base_theme_set - * @since 1.8 - * - * @brief Set custom theme elements for the scroller - * - * @param[in] klass - * @param[in] group - * - * @see elm_scroller_custom_widget_base_theme_set - */ -#define elm_obj_scroller_custom_widget_base_theme_set(klass, group) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_CUSTOM_WIDGET_BASE_THEME_SET), EO_TYPECHECK(const char *, klass), EO_TYPECHECK(const char *, group) - -/** - * @def elm_obj_scroller_region_get - * @since 1.8 - * - * @brief Get the currently visible content region - * - * @param[out] x - * @param[out] y - * @param[out] w - * @param[out] h - * - * @see elm_scroller_region_get - */ -#define elm_obj_scroller_region_get(x, y, w, h) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_REGION_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) - -/** - * @def elm_obj_scroller_child_size_get - * @since 1.8 - * - * @brief Get the size of the content object - * - * @param[out] w - * @param[out] h - * - * @see elm_scroller_child_size_get - */ -#define elm_obj_scroller_child_size_get(w, h) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_CHILD_SIZE_GET), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) - -/** - * @def elm_obj_scroller_page_relative_set - * @since 1.8 - * - * @brief Set scroll page size relative to viewport size. - * - * @param[in] h_pagerel - * @param[in] v_pagerel - * - * @see elm_scroller_page_relative_set - */ -#define elm_obj_scroller_page_relative_set(h_pagerel, v_pagerel) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PAGE_RELATIVE_SET), EO_TYPECHECK(double, h_pagerel), EO_TYPECHECK(double, v_pagerel) - -/** - * @def elm_obj_scroller_page_scroll_limit_set - * @since 1.8 - * - * @brief Set the maxium of the movable page at a flicking. - * - * @param[in] page_limit_h - * @param[in] page_limit_v - * - * @see elm_scroller_page_scroll_limit_set - */ -#define elm_obj_scroller_page_scroll_limit_set(page_limit_h, page_limit_v) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_SET), EO_TYPECHECK(int, page_limit_h), EO_TYPECHECK(int, page_limit_v) - -/** - * @def elm_obj_scroller_page_scroll_limit_get - * @since 1.8 - * - * @brief Get the maxium of the movable page at a flicking. - * - * @param[in] page_limit_h - * @param[in] page_limit_v - * - * @see elm_scroller_page_scroll_limit_get - */ -#define elm_obj_scroller_page_scroll_limit_get(page_limit_h, page_limit_v) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_GET), EO_TYPECHECK(int *, page_limit_h), EO_TYPECHECK(int *, page_limit_v) - -/** - * @def elm_obj_scroller_propagate_events_set - * @since 1.8 - * - * @brief Set event propagation on a scroller - * - * @param[in] propagation - * - * @see elm_scroller_propagate_events_set - */ -#define elm_obj_scroller_propagate_events_set(propagation) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_SET), EO_TYPECHECK(Eina_Bool, propagation) - -/** - * @def elm_obj_scroller_propagate_events_get - * @since 1.8 - * - * @brief Get event propagation for a scroller - * - * @param[out] ret - * - * @see elm_scroller_propagate_events_get - */ -#define elm_obj_scroller_propagate_events_get(ret) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @brief Type that controls when scrollbars should appear. - * - * @see elm_scroller_policy_set() - */ -typedef enum -{ - ELM_SCROLLER_POLICY_AUTO = 0, /**< Show scrollbars as needed */ - ELM_SCROLLER_POLICY_ON, /**< Always show scrollbars */ - ELM_SCROLLER_POLICY_OFF, /**< Never show scrollbars */ - ELM_SCROLLER_POLICY_LAST -} Elm_Scroller_Policy; - -/** - * @brief Type that controls how the content is scrolled. - * - * @see elm_scroller_single_direction_set() - */ -typedef enum -{ - ELM_SCROLLER_SINGLE_DIRECTION_NONE = 0, /**< Scroll every direction */ - ELM_SCROLLER_SINGLE_DIRECTION_SOFT, /**< Scroll single direction if the direction is certain*/ - ELM_SCROLLER_SINGLE_DIRECTION_HARD, /**< Scroll only single direction */ - ELM_SCROLLER_SINGLE_DIRECTION_LAST -} Elm_Scroller_Single_Direction; - -/** - * @brief Add a new scroller to the parent - * - * @param parent The parent object - * @return The new object or NULL if it cannot be created - * - * @ingroup Scroller - */ -EAPI Evas_Object *elm_scroller_add(Evas_Object *parent); - -/** - * @brief Make the scroller minimum size limited to the minimum size of the content - * - * @param obj The scroller object - * @param w Enable limiting minimum size horizontally - * @param h Enable limiting minimum size vertically - * - * By default the scroller will be as small as its design allows, - * irrespective of its content. This will make the scroller minimum size the - * right size horizontally and/or vertically to perfectly fit its content in - * that direction. - * - * @ingroup Scroller - */ -EAPI void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h); - -/** - * @brief Show a specific virtual region within the scroller content object - * - * @param obj The scroller object - * @param x X coordinate of the region - * @param y Y coordinate of the region - * @param w Width of the region - * @param h Height of the region - * - * This will ensure all (or part if it does not fit) of the designated - * region in the virtual content object (0, 0 starting at the top-left of the - * virtual content object) is shown within the scroller. - * - * @ingroup Scroller - */ -EAPI void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); - -/** - * @brief Set the scrollbar visibility policy - * - * @param obj The scroller object - * @param policy_h Horizontal scrollbar policy - * @param policy_v Vertical scrollbar policy - * - * This sets the scrollbar visibility policy for the given scroller. - * ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is - * needed, and otherwise kept hidden. ELM_SCROLLER_POLICY_ON turns it on all - * the time, and ELM_SCROLLER_POLICY_OFF always keeps it off. This applies - * respectively for the horizontal and vertical scrollbars. - * - * @ingroup Scroller - */ -EAPI void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v); - -/** - * @brief Gets scrollbar visibility policy - * - * @param obj The scroller object - * @param policy_h Horizontal scrollbar policy - * @param policy_v Vertical scrollbar policy - * - * @see elm_scroller_policy_set() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v); - -/** - * @brief Set the type of single direction scroll - * - * @param obj The scroller object - * @param single_dir The type of single direction - * - * @see elm_scroller_single_direction_get() - * - * @since 1.8 - * - * @ingroup Scroller - */ -EAPI void elm_scroller_single_direction_set(Evas_Object *obj, Elm_Scroller_Single_Direction single_dir); - -/** - * @brief Get the type of single direction scroll - * - * @param obj The scroller object - * @return the type of single direction - * - * @see elm_scroller_single_direction_get() - * - * @since 1.8 - * - * @ingroup Scroller - */ -EAPI Elm_Scroller_Single_Direction elm_scroller_single_direction_get(const Evas_Object *obj); - -/** - * @brief Get the currently visible content region - * - * @param obj The scroller object - * @param x X coordinate of the region - * @param y Y coordinate of the region - * @param w Width of the region - * @param h Height of the region - * - * This gets the current region in the content object that is visible through - * the scroller. The region co-ordinates are returned in the @p x, @p y, @p - * w, @p h values pointed to. - * - * @note All coordinates are relative to the content. - * - * @see elm_scroller_region_show() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); - -/** - * @brief Get the size of the content object - * - * @param obj The scroller object - * @param w Width of the content object. - * @param h Height of the content object. - * - * This gets the size of the content object of the scroller. - * - * @ingroup Scroller - */ -EAPI void elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); - -/** - * @brief Set bouncing behavior - * - * @param obj The scroller object - * @param h_bounce Allow bounce horizontally - * @param v_bounce Allow bounce vertically - * - * When scrolling, the scroller may "bounce" when reaching an edge of the - * content object. This is a visual way to indicate the end has been reached. - * This is enabled by default for both axis. This API will set if it is enabled - * for the given axis with the boolean parameters for each axis. - * - * @ingroup Scroller - */ -EAPI void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); - -/** - * @brief Get the bounce behaviour - * - * @param obj The Scroller object - * @param h_bounce Will the scroller bounce horizontally or not - * @param v_bounce Will the scroller bounce vertically or not - * - * @see elm_scroller_bounce_set() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); - -/** - * @brief Set scroll page size relative to viewport size. - * - * @param obj The scroller object - * @param h_pagerel The horizontal page relative size - * @param v_pagerel The vertical page relative size - * - * The scroller is capable of limiting scrolling by the user to "pages". That - * is to jump by and only show a "whole page" at a time as if the continuous - * area of the scroller content is split into page sized pieces. This sets - * the size of a page relative to the viewport of the scroller. 1.0 is "1 - * viewport" is size (horizontally or vertically). 0.0 turns it off in that - * axis. This is mutually exclusive with page size - * (see elm_scroller_page_size_set() for more information). Likewise 0.5 - * is "half a viewport". Sane usable values are normally between 0.0 and 1.0 - * including 1.0. If you only want 1 axis to be page "limited", use 0.0 for - * the other axis. - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel); - -/** - * Get a given scroller widget's scrolling page size, relative to - * its viewport size. - * - * @param obj The scroller object - * @param h_pagerel Pointer to a variable where to store the - * horizontal page (relative) size - * @param v_pagerel Pointer to a variable where to store the - * vertical page (relative) size - * - * @see elm_scroller_page_relative_set() for more details - * - * @since 1.7 - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel); - -/** - * @brief Set scroll page size. - * - * @param obj The scroller object - * @param h_pagesize The horizontal page size - * @param v_pagesize The vertical page size - * - * This sets the page size to an absolute fixed value, with 0 turning it off - * for that axis. - * - * @see elm_scroller_page_relative_set() - * @see elm_scroller_page_size_get() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize); - -/** - * @brief Retrieve a scroller widget's current page size. - * - * @param obj The scroller object - * @param h_pagesize Where to store its horizontal page size - * @param v_pagesize Where to store its vertical page size - * - * @see elm_scroller_page_size_set() for more details - * @see elm_scroller_page_relative_set() - * - * @since 1.7 - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_size_get(const Evas_Object *obj, Evas_Coord *h_pagesize, Evas_Coord *v_pagesize); - -/** - * @brief Set the maxium of the movable page at a flicking. - * - * @param obj The scroller object - * @param page_limit_h The maxium of the movable horizontal page - * @param page_limit_v The maxium of the movable vertical page - * - * The value of maxium movable page should be more than 1. - * - * @see elm_scroller_page_scroll_limit_get() - * - * @since 1.8 - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_scroll_limit_set(const Evas_Object *obj, Evas_Coord page_limit_h, Evas_Coord page_limit_v); - -/** - * @brief Get the maxium of the movable page at a flicking. - * - * @param obj The scroller object - * @param page_limit_h The maxium of the movable horizontal page - * @param page_limit_v The maxium of the movable vertical page - * - * @see elm_scroller_page_scroll_limit_set() - * - * @since 1.8 - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_scroll_limit_get(const Evas_Object *obj, Evas_Coord *page_limit_h, Evas_Coord *page_limit_v); - -/** - * @brief Get scroll current page number. - * - * @param obj The scroller object - * @param h_pagenumber The horizontal page number - * @param v_pagenumber The vertical page number - * - * The page number starts from 0. 0 is the first page. - * Current page means the page which meets the top-left of the viewport. - * If there are two or more pages in the viewport, it returns the number of the page - * which meets the top-left of the viewport. - * - * @see elm_scroller_last_page_get() - * @see elm_scroller_page_show() - * @see elm_scroller_page_bring_in() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); - -/** - * @brief Get scroll last page number. - * - * @param obj The scroller object - * @param h_pagenumber The horizontal page number - * @param v_pagenumber The vertical page number - * - * The page number starts from 0. 0 is the first page. - * This returns the last page number among the pages. - * - * @see elm_scroller_current_page_get() - * @see elm_scroller_page_show() - * @see elm_scroller_page_bring_in() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); - -/** - * Show a specific virtual region within the scroller content object by page number. - * - * @param obj The scroller object - * @param h_pagenumber The horizontal page number - * @param v_pagenumber The vertical page number - * - * 0, 0 of the indicated page is located at the top-left of the viewport. - * This will jump to the page directly without animation. - * - * Example of usage: - * - * @code - * sc = elm_scroller_add(win); - * elm_object_content_set(sc, content); - * elm_scroller_page_relative_set(sc, 1, 0); - * elm_scroller_current_page_get(sc, &h_page, &v_page); - * elm_scroller_page_show(sc, h_page + 1, v_page); - * @endcode - * - * @see elm_scroller_page_bring_in() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber); - -/** - * Show a specific virtual region within the scroller content object by page number. - * - * @param obj The scroller object - * @param h_pagenumber The horizontal page number - * @param v_pagenumber The vertical page number - * - * 0, 0 of the indicated page is located at the top-left of the viewport. - * This will slide to the page with animation. - * - * Example of usage: - * - * @code - * sc = elm_scroller_add(win); - * elm_object_content_set(sc, content); - * elm_scroller_page_relative_set(sc, 1, 0); - * elm_scroller_last_page_get(sc, &h_page, &v_page); - * elm_scroller_page_bring_in(sc, h_page, v_page); - * @endcode - * - * @see elm_scroller_page_show() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber); - -/** - * @brief Show a specific virtual region within the scroller content object. - * - * @param obj The scroller object - * @param x X coordinate of the region - * @param y Y coordinate of the region - * @param w Width of the region - * @param h Height of the region - * - * This will ensure all (or part if it does not fit) of the designated - * region in the virtual content object (0, 0 starting at the top-left of the - * virtual content object) is shown within the scroller. Unlike - * elm_scroller_region_show(), this allow the scroller to "smoothly slide" - * to this location (if configuration in general calls for transitions). It - * may not jump immediately to the new location and make take a while and - * show other content along the way. - * - * @see elm_scroller_region_show() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); - -/** - * @brief Set event propagation on a scroller - * - * @param obj The scroller object - * @param propagation If propagation is enabled or not - * - * This enables or disables event propagation from the scroller - * content to the scroller and its parent. By default event - * propagation is @b enabled. - * - * @ingroup Scroller - */ -EAPI void elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation); - -/** - * @brief Get event propagation for a scroller - * - * @param obj The scroller object - * @return The propagation state - * - * This gets the event propagation for a scroller. - * - * @see elm_scroller_propagate_events_set() - * - * @ingroup Scroller - */ -EAPI Eina_Bool elm_scroller_propagate_events_get(const Evas_Object *obj); - -/** - * @brief Set scrolling gravity on a scroller - * - * @param obj The scroller object - * @param x The scrolling horizontal gravity - * @param y The scrolling vertical gravity - * - * The gravity, defines how the scroller will adjust its view - * when the size of the scroller contents increase. - * - * The scroller will adjust the view to glue itself as follows. - * - * x=0.0, for showing the left most region of the content. - * x=1.0, for showing the right most region of the content. - * y=0.0, for showing the bottom most region of the content. - * y=1.0, for showing the top most region of the content. - * - * Default values for x and y are 0.0 - * - * @ingroup Scroller - */ -EAPI void elm_scroller_gravity_set(Evas_Object *obj, double x, double y); - -/** - * @brief Get scrolling gravity values for a scroller - * - * @param obj The scroller object - * @param x The scrolling horizontal gravity - * @param y The scrolling vertical gravity - * - * This gets gravity values for a scroller. - * - * @see elm_scroller_gravity_set() - * - * @ingroup Scroller - */ -EAPI void elm_scroller_gravity_get(const Evas_Object *obj, double *x, double *y); +#include +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_scroller_common.h b/legacy/elementary/src/lib/elm_scroller_common.h new file mode 100644 index 0000000000..b5c998de68 --- /dev/null +++ b/legacy/elementary/src/lib/elm_scroller_common.h @@ -0,0 +1,27 @@ +/** + * @brief Type that controls when scrollbars should appear. + * + * @see elm_scroller_policy_set() + */ +typedef enum +{ + ELM_SCROLLER_POLICY_AUTO = 0, /**< Show scrollbars as needed */ + ELM_SCROLLER_POLICY_ON, /**< Always show scrollbars */ + ELM_SCROLLER_POLICY_OFF, /**< Never show scrollbars */ + ELM_SCROLLER_POLICY_LAST +} Elm_Scroller_Policy; + +/** + * @brief Type that controls how the content is scrolled. + * + * @see elm_scroller_single_direction_set() + */ +typedef enum +{ + ELM_SCROLLER_SINGLE_DIRECTION_NONE = 0, /**< Scroll every direction */ + ELM_SCROLLER_SINGLE_DIRECTION_SOFT, /**< Scroll single direction if the direction is certain*/ + ELM_SCROLLER_SINGLE_DIRECTION_HARD, /**< Scroll only single direction */ + ELM_SCROLLER_SINGLE_DIRECTION_LAST +} Elm_Scroller_Single_Direction; + + diff --git a/legacy/elementary/src/lib/elm_scroller_eo.h b/legacy/elementary/src/lib/elm_scroller_eo.h new file mode 100644 index 0000000000..18e84fc289 --- /dev/null +++ b/legacy/elementary/src/lib/elm_scroller_eo.h @@ -0,0 +1,135 @@ +/** + * @ingroup Scroller + * + * @{ + */ +#define ELM_OBJ_SCROLLER_CLASS elm_obj_scroller_class_get() + +const Eo_Class *elm_obj_scroller_class_get(void) EINA_CONST; + +extern EAPI Eo_Op ELM_OBJ_SCROLLER_BASE_ID; + +enum +{ + ELM_OBJ_SCROLLER_SUB_ID_CUSTOM_WIDGET_BASE_THEME_SET, + ELM_OBJ_SCROLLER_SUB_ID_REGION_GET, + ELM_OBJ_SCROLLER_SUB_ID_CHILD_SIZE_GET, + ELM_OBJ_SCROLLER_SUB_ID_PAGE_RELATIVE_SET, + ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_SET, + ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_GET, + ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_SET, + ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_GET, + ELM_OBJ_SCROLLER_SUB_ID_LAST +}; + +#define ELM_OBJ_SCROLLER_ID(sub_id) (ELM_OBJ_SCROLLER_BASE_ID + sub_id) + + +/** + * @def elm_obj_scroller_custom_widget_base_theme_set + * @since 1.8 + * + * @brief Set custom theme elements for the scroller + * + * @param[in] klass + * @param[in] group + * + * @see elm_scroller_custom_widget_base_theme_set + */ +#define elm_obj_scroller_custom_widget_base_theme_set(klass, group) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_CUSTOM_WIDGET_BASE_THEME_SET), EO_TYPECHECK(const char *, klass), EO_TYPECHECK(const char *, group) + +/** + * @def elm_obj_scroller_region_get + * @since 1.8 + * + * @brief Get the currently visible content region + * + * @param[out] x + * @param[out] y + * @param[out] w + * @param[out] h + * + * @see elm_scroller_region_get + */ +#define elm_obj_scroller_region_get(x, y, w, h) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_REGION_GET), EO_TYPECHECK(Evas_Coord *, x), EO_TYPECHECK(Evas_Coord *, y), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) + +/** + * @def elm_obj_scroller_child_size_get + * @since 1.8 + * + * @brief Get the size of the content object + * + * @param[out] w + * @param[out] h + * + * @see elm_scroller_child_size_get + */ +#define elm_obj_scroller_child_size_get(w, h) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_CHILD_SIZE_GET), EO_TYPECHECK(Evas_Coord *, w), EO_TYPECHECK(Evas_Coord *, h) + +/** + * @def elm_obj_scroller_page_relative_set + * @since 1.8 + * + * @brief Set scroll page size relative to viewport size. + * + * @param[in] h_pagerel + * @param[in] v_pagerel + * + * @see elm_scroller_page_relative_set + */ +#define elm_obj_scroller_page_relative_set(h_pagerel, v_pagerel) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PAGE_RELATIVE_SET), EO_TYPECHECK(double, h_pagerel), EO_TYPECHECK(double, v_pagerel) + +/** + * @def elm_obj_scroller_page_scroll_limit_set + * @since 1.8 + * + * @brief Set the maxium of the movable page at a flicking. + * + * @param[in] page_limit_h + * @param[in] page_limit_v + * + * @see elm_scroller_page_scroll_limit_set + */ +#define elm_obj_scroller_page_scroll_limit_set(page_limit_h, page_limit_v) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_SET), EO_TYPECHECK(int, page_limit_h), EO_TYPECHECK(int, page_limit_v) + +/** + * @def elm_obj_scroller_page_scroll_limit_get + * @since 1.8 + * + * @brief Get the maxium of the movable page at a flicking. + * + * @param[in] page_limit_h + * @param[in] page_limit_v + * + * @see elm_scroller_page_scroll_limit_get + */ +#define elm_obj_scroller_page_scroll_limit_get(page_limit_h, page_limit_v) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PAGE_SCROLL_LIMIT_GET), EO_TYPECHECK(int *, page_limit_h), EO_TYPECHECK(int *, page_limit_v) + +/** + * @def elm_obj_scroller_propagate_events_set + * @since 1.8 + * + * @brief Set event propagation on a scroller + * + * @param[in] propagation + * + * @see elm_scroller_propagate_events_set + */ +#define elm_obj_scroller_propagate_events_set(propagation) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_SET), EO_TYPECHECK(Eina_Bool, propagation) + +/** + * @def elm_obj_scroller_propagate_events_get + * @since 1.8 + * + * @brief Get event propagation for a scroller + * + * @param[out] ret + * + * @see elm_scroller_propagate_events_get + */ +#define elm_obj_scroller_propagate_events_get(ret) ELM_OBJ_SCROLLER_ID(ELM_OBJ_SCROLLER_SUB_ID_PROPAGATE_EVENTS_GET), EO_TYPECHECK(Eina_Bool *, ret) + + +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_scroller_legacy.h b/legacy/elementary/src/lib/elm_scroller_legacy.h new file mode 100644 index 0000000000..7af9ee7403 --- /dev/null +++ b/legacy/elementary/src/lib/elm_scroller_legacy.h @@ -0,0 +1,448 @@ +/** + * @brief Add a new scroller to the parent + * + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup Scroller + */ +EAPI Evas_Object *elm_scroller_add(Evas_Object *parent); + +/** + * @brief Make the scroller minimum size limited to the minimum size of the content + * + * @param obj The scroller object + * @param w Enable limiting minimum size horizontally + * @param h Enable limiting minimum size vertically + * + * By default the scroller will be as small as its design allows, + * irrespective of its content. This will make the scroller minimum size the + * right size horizontally and/or vertically to perfectly fit its content in + * that direction. + * + * @ingroup Scroller + */ +EAPI void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h); + +/** + * @brief Show a specific virtual region within the scroller content object + * + * @param obj The scroller object + * @param x X coordinate of the region + * @param y Y coordinate of the region + * @param w Width of the region + * @param h Height of the region + * + * This will ensure all (or part if it does not fit) of the designated + * region in the virtual content object (0, 0 starting at the top-left of the + * virtual content object) is shown within the scroller. + * + * @ingroup Scroller + */ +EAPI void elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + +/** + * @brief Set the scrollbar visibility policy + * + * @param obj The scroller object + * @param policy_h Horizontal scrollbar policy + * @param policy_v Vertical scrollbar policy + * + * This sets the scrollbar visibility policy for the given scroller. + * ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is + * needed, and otherwise kept hidden. ELM_SCROLLER_POLICY_ON turns it on all + * the time, and ELM_SCROLLER_POLICY_OFF always keeps it off. This applies + * respectively for the horizontal and vertical scrollbars. + * + * @ingroup Scroller + */ +EAPI void elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v); + +/** + * @brief Gets scrollbar visibility policy + * + * @param obj The scroller object + * @param policy_h Horizontal scrollbar policy + * @param policy_v Vertical scrollbar policy + * + * @see elm_scroller_policy_set() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v); + +/** + * @brief Set the type of single direction scroll + * + * @param obj The scroller object + * @param single_dir The type of single direction + * + * @see elm_scroller_single_direction_get() + * + * @since 1.8 + * + * @ingroup Scroller + */ +EAPI void elm_scroller_single_direction_set(Evas_Object *obj, Elm_Scroller_Single_Direction single_dir); + +/** + * @brief Get the type of single direction scroll + * + * @param obj The scroller object + * @return the type of single direction + * + * @see elm_scroller_single_direction_get() + * + * @since 1.8 + * + * @ingroup Scroller + */ +EAPI Elm_Scroller_Single_Direction elm_scroller_single_direction_get(const Evas_Object *obj); + +/** + * @brief Get the currently visible content region + * + * @param obj The scroller object + * @param x X coordinate of the region + * @param y Y coordinate of the region + * @param w Width of the region + * @param h Height of the region + * + * This gets the current region in the content object that is visible through + * the scroller. The region co-ordinates are returned in the @p x, @p y, @p + * w, @p h values pointed to. + * + * @note All coordinates are relative to the content. + * + * @see elm_scroller_region_show() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); + +/** + * @brief Get the size of the content object + * + * @param obj The scroller object + * @param w Width of the content object. + * @param h Height of the content object. + * + * This gets the size of the content object of the scroller. + * + * @ingroup Scroller + */ +EAPI void elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); + +/** + * @brief Set bouncing behavior + * + * @param obj The scroller object + * @param h_bounce Allow bounce horizontally + * @param v_bounce Allow bounce vertically + * + * When scrolling, the scroller may "bounce" when reaching an edge of the + * content object. This is a visual way to indicate the end has been reached. + * This is enabled by default for both axis. This API will set if it is enabled + * for the given axis with the boolean parameters for each axis. + * + * @ingroup Scroller + */ +EAPI void elm_scroller_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); + +/** + * @brief Get the bounce behaviour + * + * @param obj The Scroller object + * @param h_bounce Will the scroller bounce horizontally or not + * @param v_bounce Will the scroller bounce vertically or not + * + * @see elm_scroller_bounce_set() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); + +/** + * @brief Set scroll page size relative to viewport size. + * + * @param obj The scroller object + * @param h_pagerel The horizontal page relative size + * @param v_pagerel The vertical page relative size + * + * The scroller is capable of limiting scrolling by the user to "pages". That + * is to jump by and only show a "whole page" at a time as if the continuous + * area of the scroller content is split into page sized pieces. This sets + * the size of a page relative to the viewport of the scroller. 1.0 is "1 + * viewport" is size (horizontally or vertically). 0.0 turns it off in that + * axis. This is mutually exclusive with page size + * (see elm_scroller_page_size_set() for more information). Likewise 0.5 + * is "half a viewport". Sane usable values are normally between 0.0 and 1.0 + * including 1.0. If you only want 1 axis to be page "limited", use 0.0 for + * the other axis. + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel); + +/** + * Get a given scroller widget's scrolling page size, relative to + * its viewport size. + * + * @param obj The scroller object + * @param h_pagerel Pointer to a variable where to store the + * horizontal page (relative) size + * @param v_pagerel Pointer to a variable where to store the + * vertical page (relative) size + * + * @see elm_scroller_page_relative_set() for more details + * + * @since 1.7 + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel); + +/** + * @brief Set scroll page size. + * + * @param obj The scroller object + * @param h_pagesize The horizontal page size + * @param v_pagesize The vertical page size + * + * This sets the page size to an absolute fixed value, with 0 turning it off + * for that axis. + * + * @see elm_scroller_page_relative_set() + * @see elm_scroller_page_size_get() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize); + +/** + * @brief Retrieve a scroller widget's current page size. + * + * @param obj The scroller object + * @param h_pagesize Where to store its horizontal page size + * @param v_pagesize Where to store its vertical page size + * + * @see elm_scroller_page_size_set() for more details + * @see elm_scroller_page_relative_set() + * + * @since 1.7 + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_size_get(const Evas_Object *obj, Evas_Coord *h_pagesize, Evas_Coord *v_pagesize); + +/** + * @brief Set the maxium of the movable page at a flicking. + * + * @param obj The scroller object + * @param page_limit_h The maxium of the movable horizontal page + * @param page_limit_v The maxium of the movable vertical page + * + * The value of maxium movable page should be more than 1. + * + * @see elm_scroller_page_scroll_limit_get() + * + * @since 1.8 + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_scroll_limit_set(const Evas_Object *obj, Evas_Coord page_limit_h, Evas_Coord page_limit_v); + +/** + * @brief Get the maxium of the movable page at a flicking. + * + * @param obj The scroller object + * @param page_limit_h The maxium of the movable horizontal page + * @param page_limit_v The maxium of the movable vertical page + * + * @see elm_scroller_page_scroll_limit_set() + * + * @since 1.8 + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_scroll_limit_get(const Evas_Object *obj, Evas_Coord *page_limit_h, Evas_Coord *page_limit_v); + +/** + * @brief Get scroll current page number. + * + * @param obj The scroller object + * @param h_pagenumber The horizontal page number + * @param v_pagenumber The vertical page number + * + * The page number starts from 0. 0 is the first page. + * Current page means the page which meets the top-left of the viewport. + * If there are two or more pages in the viewport, it returns the number of the page + * which meets the top-left of the viewport. + * + * @see elm_scroller_last_page_get() + * @see elm_scroller_page_show() + * @see elm_scroller_page_bring_in() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); + +/** + * @brief Get scroll last page number. + * + * @param obj The scroller object + * @param h_pagenumber The horizontal page number + * @param v_pagenumber The vertical page number + * + * The page number starts from 0. 0 is the first page. + * This returns the last page number among the pages. + * + * @see elm_scroller_current_page_get() + * @see elm_scroller_page_show() + * @see elm_scroller_page_bring_in() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber); + +/** + * Show a specific virtual region within the scroller content object by page number. + * + * @param obj The scroller object + * @param h_pagenumber The horizontal page number + * @param v_pagenumber The vertical page number + * + * 0, 0 of the indicated page is located at the top-left of the viewport. + * This will jump to the page directly without animation. + * + * Example of usage: + * + * @code + * sc = elm_scroller_add(win); + * elm_object_content_set(sc, content); + * elm_scroller_page_relative_set(sc, 1, 0); + * elm_scroller_current_page_get(sc, &h_page, &v_page); + * elm_scroller_page_show(sc, h_page + 1, v_page); + * @endcode + * + * @see elm_scroller_page_bring_in() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_show(Evas_Object *obj, int h_pagenumber, int v_pagenumber); + +/** + * Show a specific virtual region within the scroller content object by page number. + * + * @param obj The scroller object + * @param h_pagenumber The horizontal page number + * @param v_pagenumber The vertical page number + * + * 0, 0 of the indicated page is located at the top-left of the viewport. + * This will slide to the page with animation. + * + * Example of usage: + * + * @code + * sc = elm_scroller_add(win); + * elm_object_content_set(sc, content); + * elm_scroller_page_relative_set(sc, 1, 0); + * elm_scroller_last_page_get(sc, &h_page, &v_page); + * elm_scroller_page_bring_in(sc, h_page, v_page); + * @endcode + * + * @see elm_scroller_page_show() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_page_bring_in(Evas_Object *obj, int h_pagenumber, int v_pagenumber); + +/** + * @brief Show a specific virtual region within the scroller content object. + * + * @param obj The scroller object + * @param x X coordinate of the region + * @param y Y coordinate of the region + * @param w Width of the region + * @param h Height of the region + * + * This will ensure all (or part if it does not fit) of the designated + * region in the virtual content object (0, 0 starting at the top-left of the + * virtual content object) is shown within the scroller. Unlike + * elm_scroller_region_show(), this allow the scroller to "smoothly slide" + * to this location (if configuration in general calls for transitions). It + * may not jump immediately to the new location and make take a while and + * show other content along the way. + * + * @see elm_scroller_region_show() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + +/** + * @brief Set event propagation on a scroller + * + * @param obj The scroller object + * @param propagation If propagation is enabled or not + * + * This enables or disables event propagation from the scroller + * content to the scroller and its parent. By default event + * propagation is @b enabled. + * + * @ingroup Scroller + */ +EAPI void elm_scroller_propagate_events_set(Evas_Object *obj, Eina_Bool propagation); + +/** + * @brief Get event propagation for a scroller + * + * @param obj The scroller object + * @return The propagation state + * + * This gets the event propagation for a scroller. + * + * @see elm_scroller_propagate_events_set() + * + * @ingroup Scroller + */ +EAPI Eina_Bool elm_scroller_propagate_events_get(const Evas_Object *obj); + +/** + * @brief Set scrolling gravity on a scroller + * + * @param obj The scroller object + * @param x The scrolling horizontal gravity + * @param y The scrolling vertical gravity + * + * The gravity, defines how the scroller will adjust its view + * when the size of the scroller contents increase. + * + * The scroller will adjust the view to glue itself as follows. + * + * x=0.0, for showing the left most region of the content. + * x=1.0, for showing the right most region of the content. + * y=0.0, for showing the bottom most region of the content. + * y=1.0, for showing the top most region of the content. + * + * Default values for x and y are 0.0 + * + * @ingroup Scroller + */ +EAPI void elm_scroller_gravity_set(Evas_Object *obj, double x, double y); + +/** + * @brief Get scrolling gravity values for a scroller + * + * @param obj The scroller object + * @param x The scrolling horizontal gravity + * @param y The scrolling vertical gravity + * + * This gets gravity values for a scroller. + * + * @see elm_scroller_gravity_set() + * + * @ingroup Scroller + */ +EAPI void elm_scroller_gravity_get(const Evas_Object *obj, double *x, double *y); + diff --git a/legacy/elementary/src/lib/elm_systray_eo.h b/legacy/elementary/src/lib/elm_systray_eo.h index 18998f96f2..d95cffaa45 100644 --- a/legacy/elementary/src/lib/elm_systray_eo.h +++ b/legacy/elementary/src/lib/elm_systray_eo.h @@ -1,3 +1,8 @@ +/** + * @ingroup Systray + * + * @{ + */ #define ELM_OBJ_SYSTRAY_CLASS elm_obj_systray_class_get() const Eo_Class *elm_obj_systray_class_get(void) EINA_CONST; @@ -284,3 +289,6 @@ enum #define elm_obj_systray_register(ret) \ ELM_OBJ_SYSTRAY_ID(ELM_OBJ_SYSTRAY_SUB_ID_REGISTER), \ EO_TYPECHECK(Eina_Bool *, ret) +/** + * @} + */ diff --git a/legacy/elementary/src/lib/elm_toolbar.h b/legacy/elementary/src/lib/elm_toolbar.h index 7f1d132281..8bc7d6dc91 100644 --- a/legacy/elementary/src/lib/elm_toolbar.h +++ b/legacy/elementary/src/lib/elm_toolbar.h @@ -54,1399 +54,13 @@ * @{ */ -/** - * @enum Elm_Toolbar_Shrink_Mode - * @typedef Elm_Toolbar_Shrink_Mode - * - * Set toolbar's items display behavior, it can be scrollable, - * show a menu with exceeding items, or simply hide them. - * - * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value - * from elm config. - * - * Values don't work as bitmask, only one can be chosen. - * - * @see elm_toolbar_shrink_mode_set() - * @see elm_toolbar_shrink_mode_get() - * - * @ingroup Toolbar - */ -typedef enum -{ - ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimum size to fit all the items. */ - ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */ - ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */ - ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */ - ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the toolbar. */ - ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */ -} Elm_Toolbar_Shrink_Mode; - -/** - * Defines where to position the item in the toolbar. - * - * @ingroup Toolbar - */ -typedef enum -{ - ELM_TOOLBAR_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */ - ELM_TOOLBAR_ITEM_SCROLLTO_IN = (1 << 0), /**< to the nearest viewport */ - ELM_TOOLBAR_ITEM_SCROLLTO_FIRST = (1 << 1), /**< to the first of viewport */ - ELM_TOOLBAR_ITEM_SCROLLTO_MIDDLE = (1 << 2), /**< to the middle of viewport */ - ELM_TOOLBAR_ITEM_SCROLLTO_LAST = (1 << 3) /**< to the last of viewport */ -} Elm_Toolbar_Item_Scrollto_Type; - -typedef struct _Elm_Toolbar_Item_State Elm_Toolbar_Item_State; /**< State of a Elm_Toolbar_Item. Can be created with elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del(). */ - -/** - * Add a new toolbar widget to the given parent Elementary - * (container) object. - * - * @param parent The parent object. - * @return a new toolbar widget handle or @c NULL, on errors. - * - * This function inserts a new toolbar widget on the canvas. - * - * @ingroup Toolbar - */ -EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent); - -/** - * Set the icon size, in pixels, to be used by toolbar items. - * - * @param obj The toolbar object - * @param icon_size The icon size in pixels - * - * @note Default value is @c 32. It reads value from elm config. - * - * @see elm_toolbar_icon_size_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size); - -/** - * Get the icon size, in pixels, to be used by toolbar items. - * - * @param obj The toolbar object. - * @return The icon size in pixels. - * - * @see elm_toolbar_icon_size_set() for details. - * - * @ingroup Toolbar - */ -EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj); - -/** - * Sets icon lookup order, for toolbar items' icons. - * - * @param obj The toolbar object. - * @param order The icon lookup order. - * - * Icons added before calling this function will not be affected. - * The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO. - * - * @see elm_toolbar_icon_order_lookup_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order); - -/** - * Gets the icon lookup order. - * - * @param obj The toolbar object. - * @return The icon lookup order. - * - * @see elm_toolbar_icon_order_lookup_set() for details. - * - * @ingroup Toolbar - */ -EAPI Elm_Icon_Lookup_Order elm_toolbar_icon_order_lookup_get(const Evas_Object *obj); - -/** - * Append item to the toolbar. - * - * @param obj The toolbar object. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and appended to the toolbar, i.e., will - * be set as @b last item. - * - * Items created with this method can be deleted with - * elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @note This function does not accept relative icon path. - * - * @see elm_toolbar_item_icon_set() - * @see elm_object_item_del() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); - -/** - * Prepend item to the toolbar. - * - * @param obj The toolbar object. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and prepended to the toolbar, i.e., will - * be set as @b first item. - * - * Items created with this method can be deleted with - * elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @note This function does not accept relative icon path. - * - * @see elm_toolbar_item_icon_set() - * @see elm_object_item_del() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); - -/** - * Insert a new item into the toolbar object before item @p before. - * - * @param obj The toolbar object. - * @param before The toolbar item to insert before. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the toolbar. Its position in - * this toolbar will be just before item @p before. - * - * Items created with this method can be deleted with - * elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @note This function does not accept relative icon path. - * - * @see elm_toolbar_item_icon_set() - * @see elm_object_item_del() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); - -/** - * Insert a new item into the toolbar object after item @p after. - * - * @param obj The toolbar object. - * @param after The toolbar item to insert after. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the item. - * @param func The function to call when the item is clicked. - * @param data The data to associate with the item for related callbacks. - * @return The created item or @c NULL upon failure. - * - * A new item will be created and added to the toolbar. Its position in - * this toolbar will be just after item @p after. - * - * Items created with this method can be deleted with - * elm_object_item_del(). - * - * Associated @p data can be properly freed when item is deleted if a - * callback function is set with elm_object_item_del_cb_set(). - * - * If a function is passed as argument, it will be called every time this item - * is selected, i.e., the user clicks over an unselected item. - * If such function isn't needed, just passing - * @c NULL as @p func is enough. The same should be done for @p data. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @note This function does not accept relative icon path. - * - * @see elm_toolbar_item_icon_set() - * @see elm_object_item_del() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); - -/** - * Get the first item in the given toolbar widget's list of - * items. - * - * @param obj The toolbar object - * @return The first item or @c NULL, if it has no items (and on - * errors) - * - * @see elm_toolbar_item_append() - * @see elm_toolbar_last_item_get() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_first_item_get(const Evas_Object *obj); - -/** - * Get the last item in the given toolbar widget's list of - * items. - * - * @param obj The toolbar object - * @return The last item or @c NULL, if it has no items (and on - * errors) - * - * @see elm_toolbar_item_prepend() - * @see elm_toolbar_first_item_get() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_last_item_get(const Evas_Object *obj); - -/** - * Get the item after @p item in toolbar. - * - * @param it The toolbar item. - * @return The item after @p item, or @c NULL if none or on failure. - * - * @note If it is the last item, @c NULL will be returned. - * - * @see elm_toolbar_item_append() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_item_next_get(const Elm_Object_Item *it); - -/** - * Get the item before @p item in toolbar. - * - * @param it The toolbar item. - * @return The item before @p item, or @c NULL if none or on failure. - * - * @note If it is the first item, @c NULL will be returned. - * - * @see elm_toolbar_item_prepend() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_item_prev_get(const Elm_Object_Item *it); - -/** - * Set the priority of a toolbar item. - * - * @param it The toolbar item. - * @param priority The item priority. The default is zero. - * - * This is used only when the toolbar shrink mode is set - * to #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE. - * When space is less than required, items with low priority - * will be removed from the toolbar and added to a dynamically-created menu, - * while items with higher priority will remain on the toolbar, - * with the same order they were added. - * - * @see elm_toolbar_item_priority_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_priority_set(Elm_Object_Item *it, int priority); - -/** - * Get the priority of a toolbar item. - * - * @param it The toolbar item. - * @return The @p item priority, or @c 0 on failure. - * - * @see elm_toolbar_item_priority_set() for details. - * - * @ingroup Toolbar - */ -EAPI int elm_toolbar_item_priority_get(const Elm_Object_Item *it); - -/** - * Returns a pointer to a toolbar item by its label. - * - * @param obj The toolbar object. - * @param label The label of the item to find. - * - * @return The pointer to the toolbar item matching @p label or @c NULL - * on failure. - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label); - -/** - * Get whether the @p item is selected or not. - * - * @param it The toolbar item. - * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates - * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_toolbar_selected_item_set() for details. - * @see elm_toolbar_item_selected_get() - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Object_Item *it); - -/** - * Set the selected state of an item. - * - * @param it The toolbar item - * @param selected The selected state - * - * This sets the selected state of the given item @p it. - * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. - * - * If a new item is selected the previously selected will be unselected. - * Previously selected item can be get with function - * elm_toolbar_selected_item_get(). - * - * Selected items will be highlighted. - * - * @see elm_toolbar_item_selected_get() - * @see elm_toolbar_selected_item_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); - -/** - * Get the selected item. - * - * @param obj The toolbar object. - * @return The selected toolbar item. - * - * The selected item can be unselected with function - * elm_toolbar_item_selected_set(). - * - * The selected item always will be highlighted on toolbar. - * - * @see elm_toolbar_selected_items_get() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_selected_item_get(const Evas_Object *obj); - -/** - * Get the more item which is auto-generated by toolbar. - * - * @param obj The toolbar object. - * @return The toolbar more item. - * - * Toolbar generates 'more' item when there is no more space to fit items in - * and toolbar is in ELM_TOOLBAR_SHRINK_MENU or ELM_TOOLBAR_SHRINK_EXPAND mode. - * The more item can be manipulated by elm_object_item_text_set() and - * elm_object_item_content_set. - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Item *elm_toolbar_more_item_get(const Evas_Object *obj); - -/** - * Set the icon associated with @p item. - * - * @param it The toolbar item. - * @param icon A string with icon name or the absolute path of an image file. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * @note This function does not accept relative icon path. - * - * @see elm_toolbar_icon_order_lookup_set() - * @see elm_toolbar_icon_order_lookup_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon); - -/** - * Get the string used to set the icon of @p item. - * - * @param it The toolbar item. - * @return The string associated with the icon object. - * - * @see elm_toolbar_item_icon_set() for details. - * - * @ingroup Toolbar - */ -EAPI const char *elm_toolbar_item_icon_get(const Elm_Object_Item *it); - -/** - * Get the real Evas(Edje) object created to implement the view of a given - * toolbar @p item. - * - * @param it The toolbar item. - * @return The base Edje object associated with @p it. - * - * @ingroup Toolbar - */ -EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it); - -/** - * Get the icon object of @p item. - * - * @param it The toolbar item. - * @return The icon object - * - * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(), - * or elm_toolbar_item_icon_memfile_set() for details. - * - * @ingroup Toolbar - */ -EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it); - -/** - * Set the icon associated with @p item to an image in a binary buffer. - * - * @param it The toolbar item. - * @param img The binary data that will be used as an image - * @param size The size of binary data @p img - * @param format Optional format of @p img to pass to the image loader - * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file) - * - * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) - * - * @note The icon image set by this function can be changed by - * elm_toolbar_item_icon_set(). - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_item_icon_memfile_set(Elm_Object_Item *it, const void *img, size_t size, const char *format, const char *key); - -/** - * Set the icon associated with @p item to an image in a binary buffer. - * - * @param it The toolbar item. - * @param file The file that contains the image - * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file) - * - * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) - * - * @note The icon image set by this function can be changed by - * elm_toolbar_item_icon_set(). - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key); - -/** - * Set or unset item as a separator. - * - * @param it The toolbar item. - * @param separator @c EINA_TRUE to set item @p item as separator or - * @c EINA_FALSE to unset, i.e., item will be used as a regular item. - * - * Items aren't set as separator by default. - * - * If set as separator it will display separator theme, so won't display - * icons or label. - * - * @see elm_toolbar_item_separator_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator); - -/** - * Get a value whether item is a separator or not. - * - * @param it The toolbar item. - * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE - * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. - * - * @see elm_toolbar_item_separator_set() for details. - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it); - -/** - * Set the item displaying mode of a given toolbar widget @p obj. - * - * @param obj The toolbar object handle - * @param shrink_mode Toolbar's items display behavior - * - * The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but - * it will enforce a minimum size, so that all the items will fit - * inside it. It won't scroll and won't show the items that don't fit - * under #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under - * #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to - * aggregate items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU - * mode. - * - * @warning This function's behavior will clash with those of - * elm_scroller_policy_set(), so use either one of them, but not both. - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_shrink_mode_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode); - -/** - * Get the shrink mode of toolbar @p obj. - * - * @param obj The toolbar object. - * @return Toolbar's items display behavior. - * - * @see elm_toolbar_shrink_mode_set() for details. - * - * @ingroup Toolbar - */ -EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get(const Evas_Object *obj); - -/** - * Set the item's transverse expansion of a given toolbar widget @p obj. - * - * @param obj The toolbar object. - * @param transverse_expanded The transverse expansion of the item. - * (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE) - * - * This will expand the transverse length of the item according the transverse length of the toolbar. - * The default is what the transverse length of the item is set according its min value. - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_transverse_expanded_set(Evas_Object *obj, Eina_Bool transverse_expanded); - -/** - * Get the transverse expansion of toolbar @p obj. - * - * @param obj The toolbar object. - * @return The transverse expansion of the item. - * (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE) - * - * @see elm_toolbar_transverse_expand_set() for details. - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_transverse_expanded_get(const Evas_Object *obj); - -/** - * Enable/disable homogeneous mode. - * - * @param obj The toolbar object - * @param homogeneous Assume the items within the toolbar are of the - * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE. - * - * This will enable the homogeneous mode where items are of the same size. - * @see elm_toolbar_homogeneous_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous); - -/** - * Get whether the homogeneous mode is enabled. - * - * @param obj The toolbar object. - * @return Assume the items within the toolbar are of the same height - * and width (EINA_TRUE = on, EINA_FALSE = off). - * - * @see elm_toolbar_homogeneous_set() - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj); - -/** - * Set the parent object of the toolbar items' menus. - * - * @param obj The toolbar object. - * @param parent The parent of the menu objects. - * - * Each item can be set as item menu, with elm_toolbar_item_menu_set(). - * - * For more details about setting the parent for toolbar menus, see - * elm_menu_parent_set(). - * - * @see elm_menu_parent_set() for details. - * @see elm_toolbar_item_menu_set() for details. - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent); - -/** - * Get the parent object of the toolbar items' menus. - * - * @param obj The toolbar object. - * @return The parent of the menu objects. - * - * @see elm_toolbar_menu_parent_set() for details. - * - * @ingroup Toolbar - */ -EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj); - -/** - * Set the alignment of the items. - * - * @param obj The toolbar object. - * @param align The new alignment, a float between 0.0 - * and 1.0 . - * - * Alignment of toolbar items, from 0.0 to indicates to align - * left, to 1.0 , to align to right. 0.5 centralize - * items. - * - * Centered items by default. - * - * @see elm_toolbar_align_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_align_set(Evas_Object *obj, double align); - -/** - * Get the alignment of the items. - * - * @param obj The toolbar object. - * @return toolbar items alignment, a float between 0.0 and - * 1.0 . - * - * @see elm_toolbar_align_set() for details. - * - * @ingroup Toolbar - */ -EAPI double elm_toolbar_align_get(const Evas_Object *obj); - -/** - * Set whether the toolbar item opens a menu. - * - * @param it The toolbar item. - * @param menu If @c EINA_TRUE, @p item will opens a menu when selected. - * - * A toolbar item can be set to be a menu, using this function. - * - * Once it is set to be a menu, it can be manipulated through the - * menu-like function elm_toolbar_menu_parent_set() and the other - * elm_menu functions, using the Evas_Object @c menu returned by - * elm_toolbar_item_menu_get(). - * - * So, items to be displayed in this item's menu should be added with - * elm_menu_item_add(). - * - * The following code exemplifies the most basic usage: - * @code - * tb = elm_toolbar_add(win) - * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL); - * elm_toolbar_item_menu_set(item, EINA_TRUE); - * elm_toolbar_menu_parent_set(tb, win); - * menu = elm_toolbar_item_menu_get(item); - * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL); - * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL, - * NULL); - * @endcode - * - * @see elm_toolbar_item_menu_get() - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu); - -/** - * Get toolbar item's menu. - * - * @param it The toolbar item. - * @return Item's menu object or @c NULL on failure. - * - * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(), - * this function will set it. - * - * @see elm_toolbar_item_menu_set() for details. - * - * @ingroup Toolbar - */ -EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it); - -/** - * Add a new state to @p item. - * - * @param it The toolbar item. - * @param icon A string with icon name or the absolute path of an image file. - * @param label The label of the new state. - * @param func The function to call when the item is clicked when this - * state is selected. - * @param data The data to associate with the state. - * @return The toolbar item state, or @c NULL upon failure. - * - * Toolbar will load icon image from fdo or current theme. - * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. - * If an absolute path is provided it will load it direct from a file. - * - * States created with this function can be removed with - * elm_toolbar_item_state_del(). - * - * @see elm_toolbar_item_state_del() - * @see elm_toolbar_item_state_sel() - * @see elm_toolbar_item_state_get() - * - * @ingroup Toolbar - */ -EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_add(Elm_Object_Item *it, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); - -/** - * Delete a previously added state to @p item. - * - * @param it The toolbar item. - * @param state The state to be deleted. - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. - * - * @see elm_toolbar_item_state_add() - */ -EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state); - -/** - * Set @p state as the current state of @p it. - * - * @param it The toolbar item. - * @param state The state to use. - * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. - * - * If @p state is @c NULL, it won't select any state and the default item's - * icon and label will be used. It's the same behaviour than - * elm_toolbar_item_state_unset(). - * - * @see elm_toolbar_item_state_unset() - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state); - -/** - * Unset the state of @p it. - * - * @param it The toolbar item. - * - * The default icon and label from this item will be displayed. - * - * @see elm_toolbar_item_state_set() for more details. - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it); - -/** - * Get the current state of @p it. - * - * @param it The toolbar item. - * @return The selected state or @c NULL if none is selected or on failure. - * - * @see elm_toolbar_item_state_set() for details. - * @see elm_toolbar_item_state_unset() - * @see elm_toolbar_item_state_add() - * - * @ingroup Toolbar - */ -EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it); - -/** - * Get the state after selected state in toolbar's @p item. - * - * @param it The toolbar item to change state. - * @return The state after current state, or @c NULL on failure. - * - * If last state is selected, this function will return first state. - * - * @see elm_toolbar_item_state_set() - * @see elm_toolbar_item_state_add() - * - * @ingroup Toolbar - */ -EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it); - -/** - * Get the state before selected state in toolbar's @p item. - * - * @param it The toolbar item to change state. - * @return The state before current state, or @c NULL on failure. - * - * If first state is selected, this function will return last state. - * - * @see elm_toolbar_item_state_set() - * @see elm_toolbar_item_state_add() - * - * @ingroup Toolbar - */ -EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it); - -/** - * Change a toolbar's orientation - * @param obj The toolbar object - * @param horizontal If @c EINA_TRUE, the toolbar is horizontal - * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar. - * @ingroup Toolbar - */ -EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); - -/** - * Get a toolbar's orientation - * @param obj The toolbar object - * @return If @c EINA_TRUE, the toolbar is horizontal - * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical. - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj); - -/** - * Get the number of items in a toolbar - * @param obj The toolbar object - * @return The number of items in @p obj toolbar - * @ingroup Toolbar - */ -EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj); - -/** - * Set the standard priority of visible items in a toolbar - * @param obj The toolbar object - * @param priority The standard_priority of visible items - * - * If the priority of the item is up to standard priority, it is shown in basic panel. - * The other items are located in more menu or panel. The more menu or panel can be shown when the more item is clicked. - * - * @see elm_toolbar_standard_priority_get() - * - * @since 1.7 - * @ingroup Toolbar - */ -EAPI void elm_toolbar_standard_priority_set(Evas_Object *obj, int priority); - -/** - * Get the standard_priority of visible items in a toolbar - * @param obj The toolbar object - * @return The standard priority of items in @p obj toolbar - * - * @see elm_toolbar_standard_priority_set() - * - * @since 1.7 - * @ingroup Toolbar - */ -EAPI int elm_toolbar_standard_priority_get(const Evas_Object *obj); - -/** - * Set the toolbar select mode. - * - * @param obj The toolbar object - * @param mode The select mode - * - * elm_toolbar_select_mode_set() changes item select mode in the toolbar widget. - * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and - * callback when first becoming selected. Any further clicks will - * do nothing, unless you set always select mode. - * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, - * every click will make the selected callbacks be called. - * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items - * entirely and they will neither appear selected nor call selected - * callback functions. - * - * @see elm_toolbar_select_mode_get() - * - * @ingroup Toolbar - */ -EAPI void -elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode); - -/** - * Get the toolbar select mode. - * - * @param obj The toolbar object - * @return The select mode - * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX) - * - * @see elm_toolbar_select_mode_set() - * - * @ingroup Toolbar - */ -EAPI Elm_Object_Select_Mode -elm_toolbar_select_mode_get(const Evas_Object *obj); - -#define ELM_OBJ_TOOLBAR_CLASS elm_obj_toolbar_class_get() - -const Eo_Class *elm_obj_toolbar_class_get(void) EINA_CONST; - -extern EAPI Eo_Op ELM_OBJ_TOOLBAR_BASE_ID; - -enum -{ - ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_SET, - ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_GET, - ELM_OBJ_TOOLBAR_SUB_ID_ITEM_APPEND, - ELM_OBJ_TOOLBAR_SUB_ID_ITEM_PREPEND, - ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_BEFORE, - ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_AFTER, - ELM_OBJ_TOOLBAR_SUB_ID_FIRST_ITEM_GET, - ELM_OBJ_TOOLBAR_SUB_ID_LAST_ITEM_GET, - ELM_OBJ_TOOLBAR_SUB_ID_ITEM_FIND_BY_LABEL, - ELM_OBJ_TOOLBAR_SUB_ID_SELECTED_ITEM_GET, - ELM_OBJ_TOOLBAR_SUB_ID_MORE_ITEM_GET, - ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_SET, - ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_GET, - ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_SET, - ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_GET, - ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_SET, - ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_GET, - ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_SET, - ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_GET, - ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_SET, - ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_GET, - ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_SET, - ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_GET, - ELM_OBJ_TOOLBAR_SUB_ID_ITEMS_COUNT, - ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_SET, - ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_GET, - ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_SET, - ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_GET, - ELM_OBJ_TOOLBAR_SUB_ID_LAST -}; - -#define ELM_OBJ_TOOLBAR_ID(sub_id) (ELM_OBJ_TOOLBAR_BASE_ID + sub_id) - - -/** - * @def elm_obj_toolbar_icon_size_set - * @since 1.8 - * - * Set the icon size, in pixels, to be used by toolbar items. - * - * @param[in] icon_size - * - * @see elm_toolbar_icon_size_set - */ -#define elm_obj_toolbar_icon_size_set(icon_size) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_SET), EO_TYPECHECK(int, icon_size) - -/** - * @def elm_obj_toolbar_icon_size_get - * @since 1.8 - * - * Get the icon size, in pixels, to be used by toolbar items. - * - * @param[out] ret - * - * @see elm_toolbar_icon_size_get - */ -#define elm_obj_toolbar_icon_size_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_toolbar_item_append - * @since 1.8 - * - * Append item to the toolbar. - * - * @param[in] icon - * @param[in] label - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_toolbar_item_append - */ -#define elm_obj_toolbar_item_append(icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_item_prepend - * @since 1.8 - * - * Prepend item to the toolbar. - * - * @param[in] icon - * @param[in] label - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_toolbar_item_prepend - */ -#define elm_obj_toolbar_item_prepend(icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_item_insert_before - * @since 1.8 - * - * Insert a new item into the toolbar object before item before. - * - * @param[in] before - * @param[in] icon - * @param[in] label - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_toolbar_item_insert_before - */ -#define elm_obj_toolbar_item_insert_before(before, icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_item_insert_after - * @since 1.8 - * - * Insert a new item into the toolbar object after item after. - * - * @param[in] after - * @param[in] icon - * @param[in] label - * @param[in] func - * @param[in] data - * @param[out] ret - * - * @see elm_toolbar_item_insert_after - */ -#define elm_obj_toolbar_item_insert_after(after, icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_first_item_get - * @since 1.8 - * - * Get the first item in the given toolbar widget's list of - * items. - * - * @param[out] ret - * - * @see elm_toolbar_first_item_get - */ -#define elm_obj_toolbar_first_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_last_item_get - * @since 1.8 - * - * Get the last item in the given toolbar widget's list of - * items. - * - * @param[out] ret - * - * @see elm_toolbar_last_item_get - */ -#define elm_obj_toolbar_last_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_item_find_by_label - * @since 1.8 - * - * Returns a pointer to a toolbar item by its label. - * - * @param[in] label - * @param[out] ret - * - * @see elm_toolbar_item_find_by_label - */ -#define elm_obj_toolbar_item_find_by_label(label, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_FIND_BY_LABEL), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_selected_item_get - * @since 1.8 - * - * Get the selected item. - * - * @param[out] ret - * - * @see elm_toolbar_selected_item_get - */ -#define elm_obj_toolbar_selected_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_more_item_get - * @since 1.8 - * - * Get the more item. - * - * @param[out] ret - * - * @see elm_toolbar_more_item_get - */ -#define elm_obj_toolbar_more_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MORE_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_toolbar_shrink_mode_set - * @since 1.8 - * - * Set the item displaying mode of a given toolbar widget obj. - * - * @param[in] shrink_mode - * - * @see elm_toolbar_shrink_mode_set - */ -#define elm_obj_toolbar_shrink_mode_set(shrink_mode) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_SET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode, shrink_mode) - -/** - * @def elm_obj_toolbar_shrink_mode_get - * @since 1.8 - * - * Get the shrink mode of toolbar obj. - * - * @param[out] ret - * - * @see elm_toolbar_shrink_mode_get - */ -#define elm_obj_toolbar_shrink_mode_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_GET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode *, ret) - -/** - * @def elm_obj_toolbar_homogeneous_set - * @since 1.8 - * - * Enable/disable homogeneous mode. - * - * @param[in] homogeneous - * - * @see elm_toolbar_homogeneous_set - */ -#define elm_obj_toolbar_homogeneous_set(homogeneous) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Eina_Bool, homogeneous) - -/** - * @def elm_obj_toolbar_homogeneous_get - * @since 1.8 - * - * Get whether the homogeneous mode is enabled. - * - * @param[out] ret - * - * @see elm_toolbar_homogeneous_get - */ -#define elm_obj_toolbar_homogeneous_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_toolbar_menu_parent_set - * @since 1.8 - * - * Set the parent object of the toolbar items' menus. - * - * @param[in] parent - * - * @see elm_toolbar_menu_parent_set - */ -#define elm_obj_toolbar_menu_parent_set(parent) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent) - -/** - * @def elm_obj_toolbar_menu_parent_get - * @since 1.8 - * - * Get the parent object of the toolbar items' menus. - * - * @param[out] ret - * - * @see elm_toolbar_menu_parent_get - */ -#define elm_obj_toolbar_menu_parent_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret) - -/** - * @def elm_obj_toolbar_align_set - * @since 1.8 - * - * Set the alignment of the items. - * - * @param[in] align - * - * @see elm_toolbar_align_set - */ -#define elm_obj_toolbar_align_set(align) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, align) - -/** - * @def elm_obj_toolbar_align_get - * @since 1.8 - * - * Get the alignment of the items. - * - * @param[out] ret - * - * @see elm_toolbar_align_get - */ -#define elm_obj_toolbar_align_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, ret) - -/** - * @def elm_obj_toolbar_icon_order_lookup_set - * @since 1.8 - * - * Sets icon lookup order, for toolbar items' icons. - * - * @param[in] order - * - * @see elm_toolbar_icon_order_lookup_set - */ -#define elm_obj_toolbar_icon_order_lookup_set(order) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_SET), EO_TYPECHECK(Elm_Icon_Lookup_Order, order) - -/** - * @def elm_obj_toolbar_icon_order_lookup_get - * @since 1.8 - * - * Gets the icon lookup order. - * - * @param[out] ret - * - * @see elm_toolbar_icon_order_lookup_get - */ -#define elm_obj_toolbar_icon_order_lookup_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_GET), EO_TYPECHECK(Elm_Icon_Lookup_Order *, ret) - -/** - * @def elm_obj_toolbar_horizontal_set - * @since 1.8 - * - * Change a toolbar's orientation - * - * @param[in] horizontal - * - * @see elm_toolbar_horizontal_set - */ -#define elm_obj_toolbar_horizontal_set(horizontal) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal) - -/** - * @def elm_obj_toolbar_horizontal_get - * @since 1.8 - * - * Get a toolbar's orientation - * - * @param[out] ret - * - * @see elm_toolbar_horizontal_get - */ -#define elm_obj_toolbar_horizontal_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_toolbar_items_count - * @since 1.8 - * - * Get the number of items in a toolbar - * - * @param[out] ret - * - * @see elm_toolbar_items_count - */ -#define elm_obj_toolbar_items_count(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEMS_COUNT), EO_TYPECHECK(unsigned int *, ret) - -/** - * @def elm_obj_toolbar_standard_priority_set - * @since 1.8 - * - * Set the standard priority of visible items in a toolbar - * - * @param[in] priority - * - * @see elm_toolbar_standard_priority_set - */ -#define elm_obj_toolbar_standard_priority_set(priority) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_SET), EO_TYPECHECK(int, priority) - -/** - * @def elm_obj_toolbar_standard_priority_get - * @since 1.8 - * - * Get the standard_priority of visible items in a toolbar - * - * @param[out] ret - * - * @see elm_toolbar_standard_priority_get - */ -#define elm_obj_toolbar_standard_priority_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_toolbar_select_mode_set - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[in] mode - * - * @see elm_toolbar_select_mode_set - */ -#define elm_obj_toolbar_select_mode_set(mode) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode) - -/** - * @def elm_obj_toolbar_select_mode_get - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[out] ret - * - * @see elm_toolbar_select_mode_get - */ -#define elm_obj_toolbar_select_mode_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret) - - -/** - * Set reorder mode - * - * @param obj The toolbar object - * @param reorder_mode The reorder mode - * (EINA_TRUE = on, EINA_FALSE = off) - * - * @ingroup Toolbar - */ -EAPI void elm_toolbar_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode); - -/** - * Get the reorder mode - * - * @param obj The toolbar object - * @return The reorder mode - * (EINA_TRUE = on, EINA_FALSE = off) - * - * @ingroup Toolbar - */ -EAPI Eina_Bool elm_toolbar_reorder_mode_get(const Evas_Object *obj); - -/** - * Show a specific item, when the toolbar can be scrolled. - * - * @param it the toolbar item - * - * see elm_toolbar_item_bring_in() - * - * @since 1.8 - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_show(Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type type); - -/** - * Show a specific item with scroll animation, when the toolbar can be scrolled. - * - * @param it the toolbar item - * - * see elm_toolbar_item_show() - * - * @since 1.8 - * @ingroup Toolbar - */ -EAPI void elm_toolbar_item_bring_in(Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type type); +#include +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_toolbar_common.h b/legacy/elementary/src/lib/elm_toolbar_common.h new file mode 100644 index 0000000000..032f6f4699 --- /dev/null +++ b/legacy/elementary/src/lib/elm_toolbar_common.h @@ -0,0 +1,442 @@ +/** + * @enum Elm_Toolbar_Shrink_Mode + * @typedef Elm_Toolbar_Shrink_Mode + * + * Set toolbar's items display behavior, it can be scrollable, + * show a menu with exceeding items, or simply hide them. + * + * @note Default value is #ELM_TOOLBAR_SHRINK_MENU. It reads value + * from elm config. + * + * Values don't work as bitmask, only one can be chosen. + * + * @see elm_toolbar_shrink_mode_set() + * @see elm_toolbar_shrink_mode_get() + * + * @ingroup Toolbar + */ +typedef enum +{ + ELM_TOOLBAR_SHRINK_NONE, /**< Set toolbar minimum size to fit all the items. */ + ELM_TOOLBAR_SHRINK_HIDE, /**< Hide exceeding items. */ + ELM_TOOLBAR_SHRINK_SCROLL, /**< Allow accessing exceeding items through a scroller. */ + ELM_TOOLBAR_SHRINK_MENU, /**< Inserts a button to pop up a menu with exceeding items. */ + ELM_TOOLBAR_SHRINK_EXPAND, /**< Expand all items according the size of the toolbar. */ + ELM_TOOLBAR_SHRINK_LAST /**< Indicates error if returned by elm_toolbar_shrink_mode_get() */ +} Elm_Toolbar_Shrink_Mode; + +/** + * Defines where to position the item in the toolbar. + * + * @ingroup Toolbar + */ +typedef enum +{ + ELM_TOOLBAR_ITEM_SCROLLTO_NONE = 0, /**< no scrollto */ + ELM_TOOLBAR_ITEM_SCROLLTO_IN = (1 << 0), /**< to the nearest viewport */ + ELM_TOOLBAR_ITEM_SCROLLTO_FIRST = (1 << 1), /**< to the first of viewport */ + ELM_TOOLBAR_ITEM_SCROLLTO_MIDDLE = (1 << 2), /**< to the middle of viewport */ + ELM_TOOLBAR_ITEM_SCROLLTO_LAST = (1 << 3) /**< to the last of viewport */ +} Elm_Toolbar_Item_Scrollto_Type; + +typedef struct _Elm_Toolbar_Item_State Elm_Toolbar_Item_State; /**< State of a Elm_Toolbar_Item. Can be created with elm_toolbar_item_state_add() and removed with elm_toolbar_item_state_del(). */ + +/** + * Get the item after @p item in toolbar. + * + * @param it The toolbar item. + * @return The item after @p item, or @c NULL if none or on failure. + * + * @note If it is the last item, @c NULL will be returned. + * + * @see elm_toolbar_item_append() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_next_get(const Elm_Object_Item *it); + +/** + * Get the item before @p item in toolbar. + * + * @param it The toolbar item. + * @return The item before @p item, or @c NULL if none or on failure. + * + * @note If it is the first item, @c NULL will be returned. + * + * @see elm_toolbar_item_prepend() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_prev_get(const Elm_Object_Item *it); + +/** + * Set the priority of a toolbar item. + * + * @param it The toolbar item. + * @param priority The item priority. The default is zero. + * + * This is used only when the toolbar shrink mode is set + * to #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE. + * When space is less than required, items with low priority + * will be removed from the toolbar and added to a dynamically-created menu, + * while items with higher priority will remain on the toolbar, + * with the same order they were added. + * + * @see elm_toolbar_item_priority_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_priority_set(Elm_Object_Item *it, int priority); + +/** + * Get the priority of a toolbar item. + * + * @param it The toolbar item. + * @return The @p item priority, or @c 0 on failure. + * + * @see elm_toolbar_item_priority_set() for details. + * + * @ingroup Toolbar + */ +EAPI int elm_toolbar_item_priority_get(const Elm_Object_Item *it); + +/** + * Get whether the @p item is selected or not. + * + * @param it The toolbar item. + * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates + * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_toolbar_selected_item_set() for details. + * @see elm_toolbar_item_selected_get() + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_selected_get(const Elm_Object_Item *it); + +/** + * Set the selected state of an item. + * + * @param it The toolbar item + * @param selected The selected state + * + * This sets the selected state of the given item @p it. + * @c EINA_TRUE for selected, @c EINA_FALSE for not selected. + * + * If a new item is selected the previously selected will be unselected. + * Previously selected item can be get with function + * elm_toolbar_selected_item_get(). + * + * Selected items will be highlighted. + * + * @see elm_toolbar_item_selected_get() + * @see elm_toolbar_selected_item_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); + +/** + * Set the icon associated with @p item. + * + * @param it The toolbar item. + * @param icon A string with icon name or the absolute path of an image file. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @note This function does not accept relative icon path. + * + * @see elm_toolbar_icon_order_lookup_set() + * @see elm_toolbar_icon_order_lookup_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_icon_set(Elm_Object_Item *it, const char *icon); + +/** + * Get the string used to set the icon of @p item. + * + * @param it The toolbar item. + * @return The string associated with the icon object. + * + * @see elm_toolbar_item_icon_set() for details. + * + * @ingroup Toolbar + */ +EAPI const char *elm_toolbar_item_icon_get(const Elm_Object_Item *it); + +/** + * Get the real Evas(Edje) object created to implement the view of a given + * toolbar @p item. + * + * @param it The toolbar item. + * @return The base Edje object associated with @p it. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_item_object_get(const Elm_Object_Item *it); + +/** + * Get the icon object of @p item. + * + * @param it The toolbar item. + * @return The icon object + * + * @see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(), + * or elm_toolbar_item_icon_memfile_set() for details. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_item_icon_object_get(Elm_Object_Item *it); + +/** + * Set the icon associated with @p item to an image in a binary buffer. + * + * @param it The toolbar item. + * @param img The binary data that will be used as an image + * @param size The size of binary data @p img + * @param format Optional format of @p img to pass to the image loader + * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file) + * + * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) + * + * @note The icon image set by this function can be changed by + * elm_toolbar_item_icon_set(). + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_icon_memfile_set(Elm_Object_Item *it, const void *img, size_t size, const char *format, const char *key); + +/** + * Set the icon associated with @p item to an image in a binary buffer. + * + * @param it The toolbar item. + * @param file The file that contains the image + * @param key Optional key of @p img to pass to the image loader (eg. if @p img is an edje file) + * + * @return (@c EINA_TRUE = success, @c EINA_FALSE = error) + * + * @note The icon image set by this function can be changed by + * elm_toolbar_item_icon_set(). + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item *it, const char *file, const char *key); + +/** + * Set or unset item as a separator. + * + * @param it The toolbar item. + * @param separator @c EINA_TRUE to set item @p item as separator or + * @c EINA_FALSE to unset, i.e., item will be used as a regular item. + * + * Items aren't set as separator by default. + * + * If set as separator it will display separator theme, so won't display + * icons or label. + * + * @see elm_toolbar_item_separator_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_separator_set(Elm_Object_Item *it, Eina_Bool separator); + +/** + * Get a value whether item is a separator or not. + * + * @param it The toolbar item. + * @return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE + * indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned. + * + * @see elm_toolbar_item_separator_set() for details. + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_separator_get(const Elm_Object_Item *it); + +/** + * Set whether the toolbar item opens a menu. + * + * @param it The toolbar item. + * @param menu If @c EINA_TRUE, @p item will opens a menu when selected. + * + * A toolbar item can be set to be a menu, using this function. + * + * Once it is set to be a menu, it can be manipulated through the + * menu-like function elm_toolbar_menu_parent_set() and the other + * elm_menu functions, using the Evas_Object @c menu returned by + * elm_toolbar_item_menu_get(). + * + * So, items to be displayed in this item's menu should be added with + * elm_menu_item_add(). + * + * The following code exemplifies the most basic usage: + * @code + * tb = elm_toolbar_add(win) + * item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL); + * elm_toolbar_item_menu_set(item, EINA_TRUE); + * elm_toolbar_menu_parent_set(tb, win); + * menu = elm_toolbar_item_menu_get(item); + * elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL); + * menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL, + * NULL); + * @endcode + * + * @see elm_toolbar_item_menu_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_menu_set(Elm_Object_Item *it, Eina_Bool menu); + +/** + * Get toolbar item's menu. + * + * @param it The toolbar item. + * @return Item's menu object or @c NULL on failure. + * + * If @p item wasn't set as menu item with elm_toolbar_item_menu_set(), + * this function will set it. + * + * @see elm_toolbar_item_menu_set() for details. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_item_menu_get(const Elm_Object_Item *it); + +/** + * Add a new state to @p item. + * + * @param it The toolbar item. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the new state. + * @param func The function to call when the item is clicked when this + * state is selected. + * @param data The data to associate with the state. + * @return The toolbar item state, or @c NULL upon failure. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * States created with this function can be removed with + * elm_toolbar_item_state_del(). + * + * @see elm_toolbar_item_state_del() + * @see elm_toolbar_item_state_sel() + * @see elm_toolbar_item_state_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_add(Elm_Object_Item *it, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); + +/** + * Delete a previously added state to @p item. + * + * @param it The toolbar item. + * @param state The state to be deleted. + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. + * + * @see elm_toolbar_item_state_add() + */ +EAPI Eina_Bool elm_toolbar_item_state_del(Elm_Object_Item *it, Elm_Toolbar_Item_State *state); + +/** + * Set @p state as the current state of @p it. + * + * @param it The toolbar item. + * @param state The state to use. + * @return @c EINA_TRUE on success or @c EINA_FALSE on failure. + * + * If @p state is @c NULL, it won't select any state and the default item's + * icon and label will be used. It's the same behaviour than + * elm_toolbar_item_state_unset(). + * + * @see elm_toolbar_item_state_unset() + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_item_state_set(Elm_Object_Item *it, Elm_Toolbar_Item_State *state); + +/** + * Unset the state of @p it. + * + * @param it The toolbar item. + * + * The default icon and label from this item will be displayed. + * + * @see elm_toolbar_item_state_set() for more details. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_state_unset(Elm_Object_Item *it); + +/** + * Get the current state of @p it. + * + * @param it The toolbar item. + * @return The selected state or @c NULL if none is selected or on failure. + * + * @see elm_toolbar_item_state_set() for details. + * @see elm_toolbar_item_state_unset() + * @see elm_toolbar_item_state_add() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_get(const Elm_Object_Item *it); + +/** + * Get the state after selected state in toolbar's @p item. + * + * @param it The toolbar item to change state. + * @return The state after current state, or @c NULL on failure. + * + * If last state is selected, this function will return first state. + * + * @see elm_toolbar_item_state_set() + * @see elm_toolbar_item_state_add() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_next(Elm_Object_Item *it); + +/** + * Get the state before selected state in toolbar's @p item. + * + * @param it The toolbar item to change state. + * @return The state before current state, or @c NULL on failure. + * + * If first state is selected, this function will return last state. + * + * @see elm_toolbar_item_state_set() + * @see elm_toolbar_item_state_add() + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Item_State *elm_toolbar_item_state_prev(Elm_Object_Item *it); + +/** + * Show a specific item, when the toolbar can be scrolled. + * + * @param it the toolbar item + * + * see elm_toolbar_item_bring_in() + * + * @since 1.8 + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_show(Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type type); + +/** + * Show a specific item with scroll animation, when the toolbar can be scrolled. + * + * @param it the toolbar item + * + * see elm_toolbar_item_show() + * + * @since 1.8 + * @ingroup Toolbar + */ +EAPI void elm_toolbar_item_bring_in(Elm_Object_Item *it, Elm_Toolbar_Item_Scrollto_Type type); + diff --git a/legacy/elementary/src/lib/elm_toolbar_eo.h b/legacy/elementary/src/lib/elm_toolbar_eo.h new file mode 100644 index 0000000000..bb78f5edd6 --- /dev/null +++ b/legacy/elementary/src/lib/elm_toolbar_eo.h @@ -0,0 +1,408 @@ +/** + * @ingroup Toolbar + * + * @{ + */ +#define ELM_OBJ_TOOLBAR_CLASS elm_obj_toolbar_class_get() + +const Eo_Class *elm_obj_toolbar_class_get(void) EINA_CONST; + +extern EAPI Eo_Op ELM_OBJ_TOOLBAR_BASE_ID; + +enum +{ + ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_SET, + ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_GET, + ELM_OBJ_TOOLBAR_SUB_ID_ITEM_APPEND, + ELM_OBJ_TOOLBAR_SUB_ID_ITEM_PREPEND, + ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_BEFORE, + ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_AFTER, + ELM_OBJ_TOOLBAR_SUB_ID_FIRST_ITEM_GET, + ELM_OBJ_TOOLBAR_SUB_ID_LAST_ITEM_GET, + ELM_OBJ_TOOLBAR_SUB_ID_ITEM_FIND_BY_LABEL, + ELM_OBJ_TOOLBAR_SUB_ID_SELECTED_ITEM_GET, + ELM_OBJ_TOOLBAR_SUB_ID_MORE_ITEM_GET, + ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_SET, + ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_GET, + ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_SET, + ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_GET, + ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_SET, + ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_GET, + ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_SET, + ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_GET, + ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_SET, + ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_GET, + ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_SET, + ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_GET, + ELM_OBJ_TOOLBAR_SUB_ID_ITEMS_COUNT, + ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_SET, + ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_GET, + ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_SET, + ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_GET, + ELM_OBJ_TOOLBAR_SUB_ID_LAST +}; + +#define ELM_OBJ_TOOLBAR_ID(sub_id) (ELM_OBJ_TOOLBAR_BASE_ID + sub_id) + + +/** + * @def elm_obj_toolbar_icon_size_set + * @since 1.8 + * + * Set the icon size, in pixels, to be used by toolbar items. + * + * @param[in] icon_size + * + * @see elm_toolbar_icon_size_set + */ +#define elm_obj_toolbar_icon_size_set(icon_size) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_SET), EO_TYPECHECK(int, icon_size) + +/** + * @def elm_obj_toolbar_icon_size_get + * @since 1.8 + * + * Get the icon size, in pixels, to be used by toolbar items. + * + * @param[out] ret + * + * @see elm_toolbar_icon_size_get + */ +#define elm_obj_toolbar_icon_size_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_SIZE_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_toolbar_item_append + * @since 1.8 + * + * Append item to the toolbar. + * + * @param[in] icon + * @param[in] label + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_toolbar_item_append + */ +#define elm_obj_toolbar_item_append(icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_item_prepend + * @since 1.8 + * + * Prepend item to the toolbar. + * + * @param[in] icon + * @param[in] label + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_toolbar_item_prepend + */ +#define elm_obj_toolbar_item_prepend(icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_PREPEND), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_item_insert_before + * @since 1.8 + * + * Insert a new item into the toolbar object before item before. + * + * @param[in] before + * @param[in] icon + * @param[in] label + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_toolbar_item_insert_before + */ +#define elm_obj_toolbar_item_insert_before(before, icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_BEFORE), EO_TYPECHECK(Elm_Object_Item *, before), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_item_insert_after + * @since 1.8 + * + * Insert a new item into the toolbar object after item after. + * + * @param[in] after + * @param[in] icon + * @param[in] label + * @param[in] func + * @param[in] data + * @param[out] ret + * + * @see elm_toolbar_item_insert_after + */ +#define elm_obj_toolbar_item_insert_after(after, icon, label, func, data, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_INSERT_AFTER), EO_TYPECHECK(Elm_Object_Item *, after), EO_TYPECHECK(const char *, icon), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_first_item_get + * @since 1.8 + * + * Get the first item in the given toolbar widget's list of + * items. + * + * @param[out] ret + * + * @see elm_toolbar_first_item_get + */ +#define elm_obj_toolbar_first_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_FIRST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_last_item_get + * @since 1.8 + * + * Get the last item in the given toolbar widget's list of + * items. + * + * @param[out] ret + * + * @see elm_toolbar_last_item_get + */ +#define elm_obj_toolbar_last_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_LAST_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_item_find_by_label + * @since 1.8 + * + * Returns a pointer to a toolbar item by its label. + * + * @param[in] label + * @param[out] ret + * + * @see elm_toolbar_item_find_by_label + */ +#define elm_obj_toolbar_item_find_by_label(label, ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEM_FIND_BY_LABEL), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_selected_item_get + * @since 1.8 + * + * Get the selected item. + * + * @param[out] ret + * + * @see elm_toolbar_selected_item_get + */ +#define elm_obj_toolbar_selected_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECTED_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_more_item_get + * @since 1.8 + * + * Get the more item. + * + * @param[out] ret + * + * @see elm_toolbar_more_item_get + */ +#define elm_obj_toolbar_more_item_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MORE_ITEM_GET), EO_TYPECHECK(Elm_Object_Item **, ret) + +/** + * @def elm_obj_toolbar_shrink_mode_set + * @since 1.8 + * + * Set the item displaying mode of a given toolbar widget obj. + * + * @param[in] shrink_mode + * + * @see elm_toolbar_shrink_mode_set + */ +#define elm_obj_toolbar_shrink_mode_set(shrink_mode) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_SET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode, shrink_mode) + +/** + * @def elm_obj_toolbar_shrink_mode_get + * @since 1.8 + * + * Get the shrink mode of toolbar obj. + * + * @param[out] ret + * + * @see elm_toolbar_shrink_mode_get + */ +#define elm_obj_toolbar_shrink_mode_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SHRINK_MODE_GET), EO_TYPECHECK(Elm_Toolbar_Shrink_Mode *, ret) + +/** + * @def elm_obj_toolbar_homogeneous_set + * @since 1.8 + * + * Enable/disable homogeneous mode. + * + * @param[in] homogeneous + * + * @see elm_toolbar_homogeneous_set + */ +#define elm_obj_toolbar_homogeneous_set(homogeneous) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_SET), EO_TYPECHECK(Eina_Bool, homogeneous) + +/** + * @def elm_obj_toolbar_homogeneous_get + * @since 1.8 + * + * Get whether the homogeneous mode is enabled. + * + * @param[out] ret + * + * @see elm_toolbar_homogeneous_get + */ +#define elm_obj_toolbar_homogeneous_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HOMOGENEOUS_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_toolbar_menu_parent_set + * @since 1.8 + * + * Set the parent object of the toolbar items' menus. + * + * @param[in] parent + * + * @see elm_toolbar_menu_parent_set + */ +#define elm_obj_toolbar_menu_parent_set(parent) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent) + +/** + * @def elm_obj_toolbar_menu_parent_get + * @since 1.8 + * + * Get the parent object of the toolbar items' menus. + * + * @param[out] ret + * + * @see elm_toolbar_menu_parent_get + */ +#define elm_obj_toolbar_menu_parent_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_MENU_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret) + +/** + * @def elm_obj_toolbar_align_set + * @since 1.8 + * + * Set the alignment of the items. + * + * @param[in] align + * + * @see elm_toolbar_align_set + */ +#define elm_obj_toolbar_align_set(align) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_SET), EO_TYPECHECK(double, align) + +/** + * @def elm_obj_toolbar_align_get + * @since 1.8 + * + * Get the alignment of the items. + * + * @param[out] ret + * + * @see elm_toolbar_align_get + */ +#define elm_obj_toolbar_align_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ALIGN_GET), EO_TYPECHECK(double *, ret) + +/** + * @def elm_obj_toolbar_icon_order_lookup_set + * @since 1.8 + * + * Sets icon lookup order, for toolbar items' icons. + * + * @param[in] order + * + * @see elm_toolbar_icon_order_lookup_set + */ +#define elm_obj_toolbar_icon_order_lookup_set(order) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_SET), EO_TYPECHECK(Elm_Icon_Lookup_Order, order) + +/** + * @def elm_obj_toolbar_icon_order_lookup_get + * @since 1.8 + * + * Gets the icon lookup order. + * + * @param[out] ret + * + * @see elm_toolbar_icon_order_lookup_get + */ +#define elm_obj_toolbar_icon_order_lookup_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ICON_ORDER_LOOKUP_GET), EO_TYPECHECK(Elm_Icon_Lookup_Order *, ret) + +/** + * @def elm_obj_toolbar_horizontal_set + * @since 1.8 + * + * Change a toolbar's orientation + * + * @param[in] horizontal + * + * @see elm_toolbar_horizontal_set + */ +#define elm_obj_toolbar_horizontal_set(horizontal) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal) + +/** + * @def elm_obj_toolbar_horizontal_get + * @since 1.8 + * + * Get a toolbar's orientation + * + * @param[out] ret + * + * @see elm_toolbar_horizontal_get + */ +#define elm_obj_toolbar_horizontal_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_toolbar_items_count + * @since 1.8 + * + * Get the number of items in a toolbar + * + * @param[out] ret + * + * @see elm_toolbar_items_count + */ +#define elm_obj_toolbar_items_count(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_ITEMS_COUNT), EO_TYPECHECK(unsigned int *, ret) + +/** + * @def elm_obj_toolbar_standard_priority_set + * @since 1.8 + * + * Set the standard priority of visible items in a toolbar + * + * @param[in] priority + * + * @see elm_toolbar_standard_priority_set + */ +#define elm_obj_toolbar_standard_priority_set(priority) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_SET), EO_TYPECHECK(int, priority) + +/** + * @def elm_obj_toolbar_standard_priority_get + * @since 1.8 + * + * Get the standard_priority of visible items in a toolbar + * + * @param[out] ret + * + * @see elm_toolbar_standard_priority_get + */ +#define elm_obj_toolbar_standard_priority_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_STANDARD_PRIORITY_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_toolbar_select_mode_set + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[in] mode + * + * @see elm_toolbar_select_mode_set + */ +#define elm_obj_toolbar_select_mode_set(mode) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_SET), EO_TYPECHECK(Elm_Object_Select_Mode, mode) + +/** + * @def elm_obj_toolbar_select_mode_get + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[out] ret + * + * @see elm_toolbar_select_mode_get + */ +#define elm_obj_toolbar_select_mode_get(ret) ELM_OBJ_TOOLBAR_ID(ELM_OBJ_TOOLBAR_SUB_ID_SELECT_MODE_GET), EO_TYPECHECK(Elm_Object_Select_Mode *, ret) + +/** + * @} + */ + diff --git a/legacy/elementary/src/lib/elm_toolbar_legacy.h b/legacy/elementary/src/lib/elm_toolbar_legacy.h new file mode 100644 index 0000000000..366b799ef5 --- /dev/null +++ b/legacy/elementary/src/lib/elm_toolbar_legacy.h @@ -0,0 +1,552 @@ +/** + * Add a new toolbar widget to the given parent Elementary + * (container) object. + * + * @param parent The parent object. + * @return a new toolbar widget handle or @c NULL, on errors. + * + * This function inserts a new toolbar widget on the canvas. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent); + +/** + * Set the icon size, in pixels, to be used by toolbar items. + * + * @param obj The toolbar object + * @param icon_size The icon size in pixels + * + * @note Default value is @c 32. It reads value from elm config. + * + * @see elm_toolbar_icon_size_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_icon_size_set(Evas_Object *obj, int icon_size); + +/** + * Get the icon size, in pixels, to be used by toolbar items. + * + * @param obj The toolbar object. + * @return The icon size in pixels. + * + * @see elm_toolbar_icon_size_set() for details. + * + * @ingroup Toolbar + */ +EAPI int elm_toolbar_icon_size_get(const Evas_Object *obj); + +/** + * Sets icon lookup order, for toolbar items' icons. + * + * @param obj The toolbar object. + * @param order The icon lookup order. + * + * Icons added before calling this function will not be affected. + * The default lookup order is #ELM_ICON_LOOKUP_THEME_FDO. + * + * @see elm_toolbar_icon_order_lookup_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_icon_order_lookup_set(Evas_Object *obj, Elm_Icon_Lookup_Order order); + +/** + * Gets the icon lookup order. + * + * @param obj The toolbar object. + * @return The icon lookup order. + * + * @see elm_toolbar_icon_order_lookup_set() for details. + * + * @ingroup Toolbar + */ +EAPI Elm_Icon_Lookup_Order elm_toolbar_icon_order_lookup_get(const Evas_Object *obj); + +/** + * Append item to the toolbar. + * + * @param obj The toolbar object. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and appended to the toolbar, i.e., will + * be set as @b last item. + * + * Items created with this method can be deleted with + * elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @note This function does not accept relative icon path. + * + * @see elm_toolbar_item_icon_set() + * @see elm_object_item_del() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); + +/** + * Prepend item to the toolbar. + * + * @param obj The toolbar object. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and prepended to the toolbar, i.e., will + * be set as @b first item. + * + * Items created with this method can be deleted with + * elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @note This function does not accept relative icon path. + * + * @see elm_toolbar_item_icon_set() + * @see elm_object_item_del() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); + +/** + * Insert a new item into the toolbar object before item @p before. + * + * @param obj The toolbar object. + * @param before The toolbar item to insert before. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the toolbar. Its position in + * this toolbar will be just before item @p before. + * + * Items created with this method can be deleted with + * elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @note This function does not accept relative icon path. + * + * @see elm_toolbar_item_icon_set() + * @see elm_object_item_del() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); + +/** + * Insert a new item into the toolbar object after item @p after. + * + * @param obj The toolbar object. + * @param after The toolbar item to insert after. + * @param icon A string with icon name or the absolute path of an image file. + * @param label The label of the item. + * @param func The function to call when the item is clicked. + * @param data The data to associate with the item for related callbacks. + * @return The created item or @c NULL upon failure. + * + * A new item will be created and added to the toolbar. Its position in + * this toolbar will be just after item @p after. + * + * Items created with this method can be deleted with + * elm_object_item_del(). + * + * Associated @p data can be properly freed when item is deleted if a + * callback function is set with elm_object_item_del_cb_set(). + * + * If a function is passed as argument, it will be called every time this item + * is selected, i.e., the user clicks over an unselected item. + * If such function isn't needed, just passing + * @c NULL as @p func is enough. The same should be done for @p data. + * + * Toolbar will load icon image from fdo or current theme. + * This behavior can be set by elm_toolbar_icon_order_lookup_set() function. + * If an absolute path is provided it will load it direct from a file. + * + * @note This function does not accept relative icon path. + * + * @see elm_toolbar_item_icon_set() + * @see elm_object_item_del() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *icon, const char *label, Evas_Smart_Cb func, const void *data); + +/** + * Get the first item in the given toolbar widget's list of + * items. + * + * @param obj The toolbar object + * @return The first item or @c NULL, if it has no items (and on + * errors) + * + * @see elm_toolbar_item_append() + * @see elm_toolbar_last_item_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_first_item_get(const Evas_Object *obj); + +/** + * Get the last item in the given toolbar widget's list of + * items. + * + * @param obj The toolbar object + * @return The last item or @c NULL, if it has no items (and on + * errors) + * + * @see elm_toolbar_item_prepend() + * @see elm_toolbar_first_item_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_last_item_get(const Evas_Object *obj); + +/** + * Returns a pointer to a toolbar item by its label. + * + * @param obj The toolbar object. + * @param label The label of the item to find. + * + * @return The pointer to the toolbar item matching @p label or @c NULL + * on failure. + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_item_find_by_label(const Evas_Object *obj, const char *label); + +/** + * Get the selected item. + * + * @param obj The toolbar object. + * @return The selected toolbar item. + * + * The selected item can be unselected with function + * elm_toolbar_item_selected_set(). + * + * The selected item always will be highlighted on toolbar. + * + * @see elm_toolbar_selected_items_get() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_selected_item_get(const Evas_Object *obj); + +/** + * Get the more item which is auto-generated by toolbar. + * + * @param obj The toolbar object. + * @return The toolbar more item. + * + * Toolbar generates 'more' item when there is no more space to fit items in + * and toolbar is in ELM_TOOLBAR_SHRINK_MENU or ELM_TOOLBAR_SHRINK_EXPAND mode. + * The more item can be manipulated by elm_object_item_text_set() and + * elm_object_item_content_set. + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Item *elm_toolbar_more_item_get(const Evas_Object *obj); + +/** + * Set the item displaying mode of a given toolbar widget @p obj. + * + * @param obj The toolbar object handle + * @param shrink_mode Toolbar's items display behavior + * + * The toolbar won't scroll under #ELM_TOOLBAR_SHRINK_NONE mode, but + * it will enforce a minimum size, so that all the items will fit + * inside it. It won't scroll and won't show the items that don't fit + * under #ELM_TOOLBAR_SHRINK_HIDE mode. Finally, it'll scroll under + * #ELM_TOOLBAR_SHRINK_SCROLL mode, and it will create a button to + * aggregate items which didn't fit with the #ELM_TOOLBAR_SHRINK_MENU + * mode. + * + * @warning This function's behavior will clash with those of + * elm_scroller_policy_set(), so use either one of them, but not both. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_shrink_mode_set(Evas_Object *obj, Elm_Toolbar_Shrink_Mode shrink_mode); + +/** + * Get the shrink mode of toolbar @p obj. + * + * @param obj The toolbar object. + * @return Toolbar's items display behavior. + * + * @see elm_toolbar_shrink_mode_set() for details. + * + * @ingroup Toolbar + */ +EAPI Elm_Toolbar_Shrink_Mode elm_toolbar_shrink_mode_get(const Evas_Object *obj); + +/** + * Set the item's transverse expansion of a given toolbar widget @p obj. + * + * @param obj The toolbar object. + * @param transverse_expanded The transverse expansion of the item. + * (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE) + * + * This will expand the transverse length of the item according the transverse length of the toolbar. + * The default is what the transverse length of the item is set according its min value. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_transverse_expanded_set(Evas_Object *obj, Eina_Bool transverse_expanded); + +/** + * Get the transverse expansion of toolbar @p obj. + * + * @param obj The toolbar object. + * @return The transverse expansion of the item. + * (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE) + * + * @see elm_toolbar_transverse_expand_set() for details. + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_transverse_expanded_get(const Evas_Object *obj); + +/** + * Enable/disable homogeneous mode. + * + * @param obj The toolbar object + * @param homogeneous Assume the items within the toolbar are of the + * same size (EINA_TRUE = on, EINA_FALSE = off). Default is @c EINA_FALSE. + * + * This will enable the homogeneous mode where items are of the same size. + * @see elm_toolbar_homogeneous_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous); + +/** + * Get whether the homogeneous mode is enabled. + * + * @param obj The toolbar object. + * @return Assume the items within the toolbar are of the same height + * and width (EINA_TRUE = on, EINA_FALSE = off). + * + * @see elm_toolbar_homogeneous_set() + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_homogeneous_get(const Evas_Object *obj); + +/** + * Set the parent object of the toolbar items' menus. + * + * @param obj The toolbar object. + * @param parent The parent of the menu objects. + * + * Each item can be set as item menu, with elm_toolbar_item_menu_set(). + * + * For more details about setting the parent for toolbar menus, see + * elm_menu_parent_set(). + * + * @see elm_menu_parent_set() for details. + * @see elm_toolbar_item_menu_set() for details. + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_menu_parent_set(Evas_Object *obj, Evas_Object *parent); + +/** + * Get the parent object of the toolbar items' menus. + * + * @param obj The toolbar object. + * @return The parent of the menu objects. + * + * @see elm_toolbar_menu_parent_set() for details. + * + * @ingroup Toolbar + */ +EAPI Evas_Object *elm_toolbar_menu_parent_get(const Evas_Object *obj); + +/** + * Set the alignment of the items. + * + * @param obj The toolbar object. + * @param align The new alignment, a float between 0.0 + * and 1.0 . + * + * Alignment of toolbar items, from 0.0 to indicates to align + * left, to 1.0 , to align to right. 0.5 centralize + * items. + * + * Centered items by default. + * + * @see elm_toolbar_align_get() + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_align_set(Evas_Object *obj, double align); + +/** + * Get the alignment of the items. + * + * @param obj The toolbar object. + * @return toolbar items alignment, a float between 0.0 and + * 1.0 . + * + * @see elm_toolbar_align_set() for details. + * + * @ingroup Toolbar + */ +EAPI double elm_toolbar_align_get(const Evas_Object *obj); + +/** + * Change a toolbar's orientation + * @param obj The toolbar object + * @param horizontal If @c EINA_TRUE, the toolbar is horizontal + * By default, a toolbar will be horizontal. Use this function to create a vertical toolbar. + * @ingroup Toolbar + */ +EAPI void elm_toolbar_horizontal_set(Evas_Object *obj, Eina_Bool horizontal); + +/** + * Get a toolbar's orientation + * @param obj The toolbar object + * @return If @c EINA_TRUE, the toolbar is horizontal + * By default, a toolbar will be horizontal. Use this function to determine whether a toolbar is vertical. + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_horizontal_get(const Evas_Object *obj); + +/** + * Get the number of items in a toolbar + * @param obj The toolbar object + * @return The number of items in @p obj toolbar + * @ingroup Toolbar + */ +EAPI unsigned int elm_toolbar_items_count(const Evas_Object *obj); + +/** + * Set the standard priority of visible items in a toolbar + * @param obj The toolbar object + * @param priority The standard_priority of visible items + * + * If the priority of the item is up to standard priority, it is shown in basic panel. + * The other items are located in more menu or panel. The more menu or panel can be shown when the more item is clicked. + * + * @see elm_toolbar_standard_priority_get() + * + * @since 1.7 + * @ingroup Toolbar + */ +EAPI void elm_toolbar_standard_priority_set(Evas_Object *obj, int priority); + +/** + * Get the standard_priority of visible items in a toolbar + * @param obj The toolbar object + * @return The standard priority of items in @p obj toolbar + * + * @see elm_toolbar_standard_priority_set() + * + * @since 1.7 + * @ingroup Toolbar + */ +EAPI int elm_toolbar_standard_priority_get(const Evas_Object *obj); + +/** + * Set the toolbar select mode. + * + * @param obj The toolbar object + * @param mode The select mode + * + * elm_toolbar_select_mode_set() changes item select mode in the toolbar widget. + * - ELM_OBJECT_SELECT_MODE_DEFAULT : Items will only call their selection func and + * callback when first becoming selected. Any further clicks will + * do nothing, unless you set always select mode. + * - ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, + * every click will make the selected callbacks be called. + * - ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select items + * entirely and they will neither appear selected nor call selected + * callback functions. + * + * @see elm_toolbar_select_mode_get() + * + * @ingroup Toolbar + */ +EAPI void +elm_toolbar_select_mode_set(Evas_Object *obj, Elm_Object_Select_Mode mode); + +/** + * Get the toolbar select mode. + * + * @param obj The toolbar object + * @return The select mode + * (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX) + * + * @see elm_toolbar_select_mode_set() + * + * @ingroup Toolbar + */ +EAPI Elm_Object_Select_Mode +elm_toolbar_select_mode_get(const Evas_Object *obj); + +/** + * Set reorder mode + * + * @param obj The toolbar object + * @param reorder_mode The reorder mode + * (EINA_TRUE = on, EINA_FALSE = off) + * + * @ingroup Toolbar + */ +EAPI void elm_toolbar_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode); + +/** + * Get the reorder mode + * + * @param obj The toolbar object + * @return The reorder mode + * (EINA_TRUE = on, EINA_FALSE = off) + * + * @ingroup Toolbar + */ +EAPI Eina_Bool elm_toolbar_reorder_mode_get(const Evas_Object *obj); + diff --git a/legacy/elementary/src/lib/elm_win.h b/legacy/elementary/src/lib/elm_win.h index 9956a9eb46..28f974041a 100644 --- a/legacy/elementary/src/lib/elm_win.h +++ b/legacy/elementary/src/lib/elm_win.h @@ -93,2691 +93,13 @@ * @{ */ -#define ELM_OBJ_WIN_CLASS elm_obj_win_class_get() - -const Eo_Class *elm_obj_win_class_get(void) EINA_CONST; - -extern EAPI Eo_Op ELM_OBJ_WIN_BASE_ID; - -enum - { - ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR, - ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD, - ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL, - ELM_OBJ_WIN_SUB_ID_TITLE_SET, - ELM_OBJ_WIN_SUB_ID_TITLE_GET, - ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET, - ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET, - ELM_OBJ_WIN_SUB_ID_ROLE_SET, - ELM_OBJ_WIN_SUB_ID_ROLE_GET, - ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET, - ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET, - ELM_OBJ_WIN_SUB_ID_AUTODEL_SET, - ELM_OBJ_WIN_SUB_ID_AUTODEL_GET, - ELM_OBJ_WIN_SUB_ID_ACTIVATE, - ELM_OBJ_WIN_SUB_ID_LOWER, - ELM_OBJ_WIN_SUB_ID_RAISE, - ELM_OBJ_WIN_SUB_ID_CENTER, - ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET, - ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET, - ELM_OBJ_WIN_SUB_ID_SHAPED_SET, - ELM_OBJ_WIN_SUB_ID_SHAPED_GET, - ELM_OBJ_WIN_SUB_ID_ALPHA_SET, - ELM_OBJ_WIN_SUB_ID_ALPHA_GET, - ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET, - ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET, - ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET, - ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET, - ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET, - ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET, - ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET, - ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET, - ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET, - ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET, - ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET, - ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET, - ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET, - ELM_OBJ_WIN_SUB_ID_PROFILE_SET, - ELM_OBJ_WIN_SUB_ID_PROFILE_GET, - ELM_OBJ_WIN_SUB_ID_URGENT_SET, - ELM_OBJ_WIN_SUB_ID_URGENT_GET, - ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET, - ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET, - ELM_OBJ_WIN_SUB_ID_MODAL_SET, - ELM_OBJ_WIN_SUB_ID_MODAL_GET, - ELM_OBJ_WIN_SUB_ID_ASPECT_SET, - ELM_OBJ_WIN_SUB_ID_ASPECT_GET, - ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET, - ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET, - ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET, - ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET, - ELM_OBJ_WIN_SUB_ID_LAYER_SET, - ELM_OBJ_WIN_SUB_ID_LAYER_GET, - ELM_OBJ_WIN_SUB_ID_ROTATION_SET, - ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET, - ELM_OBJ_WIN_SUB_ID_ROTATION_GET, - ELM_OBJ_WIN_SUB_ID_STICKY_SET, - ELM_OBJ_WIN_SUB_ID_STICKY_GET, - ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET, - ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET, - ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET, - ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET, - ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET, - ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET, - ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET, - ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET, - ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET, - ELM_OBJ_WIN_SUB_ID_FOCUS_GET, - ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET, - ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET, - ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET, - ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET, - ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET, - ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET, - ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET, - ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET, - ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND, - ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET, - ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET, - ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET, - ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET, - ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET, - ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN, - ELM_OBJ_WIN_SUB_ID_XWINDOW_GET, - ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET, - ELM_OBJ_WIN_SUB_ID_LAST - }; - -#define ELM_OBJ_WIN_ID(sub_id) (ELM_OBJ_WIN_BASE_ID + sub_id) - - -/** - * @def elm_obj_win_constructor - * @since 1.8 - * - * No description supplied by the EAPI. - * - * @param[in] name - * @param[in] type - * - */ -#define elm_obj_win_constructor(name, type) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR), EO_TYPECHECK(const char *, name), EO_TYPECHECK(Elm_Win_Type, type) - -/** - * @def elm_obj_win_resize_object_add - * @since 1.8 - * - * Add subobj as a resize object of window @p obj. - * - * @param[in] subobj - * - * @see elm_win_resize_object_add - */ -#define elm_obj_win_resize_object_add(subobj) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD), EO_TYPECHECK(Evas_Object *, subobj) - -/** - * @def elm_obj_win_resize_object_del - * @since 1.8 - * - * Delete subobj as a resize object of window @p obj. - * - * @param[in] subobj - * - * @see elm_win_resize_object_del - */ -#define elm_obj_win_resize_object_del(subobj) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL), EO_TYPECHECK(Evas_Object *, subobj) - -/** - * @def elm_obj_win_title_set - * @since 1.8 - * - * Set the title of the window - * - * @param[in] title - * - * @see elm_win_title_set - */ -#define elm_obj_win_title_set(title) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_SET), EO_TYPECHECK(const char *, title) - -/** - * @def elm_obj_win_title_get - * @since 1.8 - * - * Get the title of the window - * - * @param[out] ret - * - * @see elm_win_title_get - */ -#define elm_obj_win_title_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_GET), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_win_icon_name_set - * @since 1.8 - * - * Set the icon name of the window - * - * @param[in] icon_name - * - * @see elm_win_icon_name_set - */ -#define elm_obj_win_icon_name_set(icon_name) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET), EO_TYPECHECK(const char *, icon_name) - -/** - * @def elm_obj_win_icon_name_get - * @since 1.8 - * - * Get the icon name of the window - * - * @param[out] ret - * - * @see elm_win_icon_name_get - */ -#define elm_obj_win_icon_name_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_win_role_set - * @since 1.8 - * - * Set the role of the window - * - * @param[in] role - * - * @see elm_win_role_set - */ -#define elm_obj_win_role_set(role) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_SET), EO_TYPECHECK(const char *, role) - -/** - * @def elm_obj_win_role_get - * @since 1.8 - * - * Get the role of the window - * - * @param[out] ret - * - * @see elm_win_role_get - */ -#define elm_obj_win_role_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_GET), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_win_icon_object_set - * @since 1.8 - * - * Set a window object's icon - * - * @param[in] icon - * - * @see elm_win_icon_object_set - */ -#define elm_obj_win_icon_object_set(icon) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET), EO_TYPECHECK(Evas_Object *, icon) - -/** - * @def elm_obj_win_icon_object_get - * @since 1.8 - * - * Get the icon object used for the window - * - * @param[out] ret - * - * @see elm_win_icon_object_get - */ -#define elm_obj_win_icon_object_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET), EO_TYPECHECK(const Evas_Object **, ret) - -/** - * @def elm_obj_win_autodel_set - * @since 1.8 - * - * Set the window's autodel state. - * - * @param[in] autodel - * - * @see elm_win_autodel_set - */ -#define elm_obj_win_autodel_set(autodel) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET), EO_TYPECHECK(Eina_Bool, autodel) - -/** - * @def elm_obj_win_autodel_get - * @since 1.8 - * - * Get the window's autodel state. - * - * @param[out] ret - * - * @see elm_win_autodel_get - */ -#define elm_obj_win_autodel_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_activate - * @since 1.8 - * - * Activate a window object. - * - * - * @see elm_win_activate - */ -#define elm_obj_win_activate() ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ACTIVATE) - -/** - * @def elm_obj_win_lower - * @since 1.8 - * - * Lower a window object. - * - * - * @see elm_win_lower - */ -#define elm_obj_win_lower() ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LOWER) - -/** - * @def elm_obj_win_raise - * @since 1.8 - * - * Raise a window object. - * - * - * @see elm_win_raise - */ -#define elm_obj_win_raise() ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RAISE) - -/** - * @def elm_obj_win_center - * @since 1.8 - * - * Center a window on its screen - * - * @param[in] h - * @param[in] v - * - * @see elm_win_center - */ -#define elm_obj_win_center(h, v) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CENTER), EO_TYPECHECK(Eina_Bool, h), EO_TYPECHECK(Eina_Bool, v) - -/** - * @def elm_obj_win_borderless_set - * @since 1.8 - * - * Set the borderless state of a window. - * - * @param[in] borderless - * - * @see elm_win_borderless_set - */ -#define elm_obj_win_borderless_set(borderless) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET), EO_TYPECHECK(Eina_Bool, borderless) - -/** - * @def elm_obj_win_borderless_get - * @since 1.8 - * - * Get the borderless state of a window. - * - * @param[out] ret - * - * @see elm_win_borderless_get - */ -#define elm_obj_win_borderless_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_shaped_set - * @since 1.8 - * - * Set the shaped state of a window. - * - * @param[in] shaped - * - * @see elm_win_shaped_set - */ -#define elm_obj_win_shaped_set(shaped) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_SET), EO_TYPECHECK(Eina_Bool, shaped) - -/** - * @def elm_obj_win_shaped_get - * @since 1.8 - * - * Get the shaped state of a window. - * - * @param[out] ret - * - * @see elm_win_shaped_get - */ -#define elm_obj_win_shaped_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_alpha_set - * @since 1.8 - * - * Set the alpha channel state of a window. - * - * @param[in] alpha - * - * @see elm_win_alpha_set - */ -#define elm_obj_win_alpha_set(alpha) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_SET), EO_TYPECHECK(Eina_Bool, alpha) - -/** - * @def elm_obj_win_alpha_get - * @since 1.8 - * - * Get the alpha channel state of a window. - * - * @param[out] ret - * - * @see elm_win_alpha_get - */ -#define elm_obj_win_alpha_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_override_set - * @since 1.8 - * - * Set the override state of a window. - * - * @param[in] override - * - * @see elm_win_override_set - */ -#define elm_obj_win_override_set(override) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET), EO_TYPECHECK(Eina_Bool, override) - -/** - * @def elm_obj_win_override_get - * @since 1.8 - * - * Get the override state of a window. - * - * @param[out] ret - * - * @see elm_win_override_get - */ -#define elm_obj_win_override_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_fullscreen_set - * @since 1.8 - * - * Set the fullscreen state of a window. - * - * @param[in] fullscreen - * - * @see elm_win_fullscreen_set - */ -#define elm_obj_win_fullscreen_set(fullscreen) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET), EO_TYPECHECK(Eina_Bool, fullscreen) - -/** - * @def elm_obj_win_fullscreen_get - * @since 1.8 - * - * Get the fullscreen state of a window. - * - * @param[out] ret - * - * @see elm_win_fullscreen_get - */ -#define elm_obj_win_fullscreen_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_main_menu_get - * @since 1.8 - * - * Get the Main Menu of a window. - * - * @param[out] ret Main menu. - * - * @see elm_win_main_menu_get - */ -#define elm_obj_win_main_menu_get(ret) \ - ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET), \ - EO_TYPECHECK(Eo **, ret) - -/** - * @def elm_obj_win_maximized_set - * @since 1.8 - * - * Set the maximized state of a window. - * - * @param[in] maximized - * - * @see elm_win_maximized_set - */ -#define elm_obj_win_maximized_set(maximized) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET), EO_TYPECHECK(Eina_Bool, maximized) - -/** - * @def elm_obj_win_maximized_get - * @since 1.8 - * - * Get the maximized state of a window. - * - * @param[out] ret - * - * @see elm_win_maximized_get - */ -#define elm_obj_win_maximized_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_iconified_set - * @since 1.8 - * - * Set the iconified state of a window. - * - * @param[in] iconified - * - * @see elm_win_iconified_set - */ -#define elm_obj_win_iconified_set(iconified) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET), EO_TYPECHECK(Eina_Bool, iconified) - -/** - * @def elm_obj_win_iconified_get - * @since 1.8 - * - * Get the iconified state of a window. - * - * @param[out] ret - * - * @see elm_win_iconified_get - */ -#define elm_obj_win_iconified_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_withdrawn_set - * @since 1.8 - * - * Set the withdrawn state of a window. - * - * @param[in] withdrawn - * - * @see elm_win_withdrawn_set - */ -#define elm_obj_win_withdrawn_set(withdrawn) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET), EO_TYPECHECK(Eina_Bool, withdrawn) - -/** - * @def elm_obj_win_withdrawn_get - * @since 1.8 - * - * Get the withdrawn state of a window. - * - * @param[out] ret - * - * @see elm_win_withdrawn_get - */ -#define elm_obj_win_withdrawn_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_available_profiles_set - * @since 1.8 - * - * Set the array of available profiles to a window. - * - * @param[in] profiles - * @param[in] count - * - * @see elm_win_available_profiles_set - */ -#define elm_obj_win_available_profiles_set(profiles, count) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET), EO_TYPECHECK(const char **, profiles), EO_TYPECHECK(unsigned int, count) - -/** - * @def elm_obj_win_available_profiles_get - * @since 1.8 - * - * Get the array of available profiles of a window. - * - * @param[out] ret - * @param[out] profiles - * @param[out] count - * - * @see elm_win_available_profiles_get - */ -#define elm_obj_win_available_profiles_get(ret, profiles, count) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET), EO_TYPECHECK(Eina_Bool *, ret), EO_TYPECHECK(char ***, profiles), EO_TYPECHECK(unsigned int *, count) - -/** - * @def elm_obj_win_profile_set - * @since 1.8 - * - * Set the profile of a window. - * - * @param[in] profile - * - * @see elm_win_profile_set - */ -#define elm_obj_win_profile_set(profile) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_SET), EO_TYPECHECK(const char *, profile) - -/** - * @def elm_obj_win_profile_get - * @since 1.8 - * - * Get the profile of a window. - * - * @param[out] ret - * - * @see elm_win_profile_get - */ -#define elm_obj_win_profile_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_GET), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_win_urgent_set - * @since 1.8 - * - * Set the urgent state of a window. - * - * @param[in] urgent - * - * @see elm_win_urgent_set - */ -#define elm_obj_win_urgent_set(urgent) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_SET), EO_TYPECHECK(Eina_Bool, urgent) - -/** - * @def elm_obj_win_urgent_get - * @since 1.8 - * - * Get the urgent state of a window. - * - * @param[out] ret - * - * @see elm_win_urgent_get - */ -#define elm_obj_win_urgent_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_demand_attention_set - * @since 1.8 - * - * Set the demand_attention state of a window. - * - * @param[in] demand_attention - * - * @see elm_win_demand_attention_set - */ -#define elm_obj_win_demand_attention_set(demand_attention) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET), EO_TYPECHECK(Eina_Bool, demand_attention) - -/** - * @def elm_obj_win_demand_attention_get - * @since 1.8 - * - * Get the demand_attention state of a window. - * - * @param[out] ret - * - * @see elm_win_demand_attention_get - */ -#define elm_obj_win_demand_attention_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_modal_set - * @since 1.8 - * - * Set the modal state of a window. - * - * @param[in] modal - * - * @see elm_win_modal_set - */ -#define elm_obj_win_modal_set(modal) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_SET), EO_TYPECHECK(Eina_Bool, modal) - -/** - * @def elm_obj_win_modal_get - * @since 1.8 - * - * Get the modal state of a window. - * - * @param[out] ret - * - * @see elm_win_modal_get - */ -#define elm_obj_win_modal_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_aspect_set - * @since 1.8 - * - * Set the aspect ratio of a window. - * - * @param[in] aspect - * - * @see elm_win_aspect_set - */ -#define elm_obj_win_aspect_set(aspect) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_SET), EO_TYPECHECK(double, aspect) - -/** - * @def elm_obj_win_aspect_get - * @since 1.8 - * - * Get the aspect ratio of a window. - * - * @param[out] ret - * - * @see elm_win_aspect_get - */ -#define elm_obj_win_aspect_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_GET), EO_TYPECHECK(double *, ret) - -/** - * @def elm_obj_win_size_base_set - * @since 1.8 - * - * Set the base window size used with stepping calculation - * - * @param[in] w - * @param[in] h - * - * @see elm_win_size_base_set - */ -#define elm_obj_win_size_base_set(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) - -/** - * @def elm_obj_win_size_base_get - * @since 1.8 - * - * Get the base size of a window. - * - * @param[out] w - * @param[out] h - * - * @see elm_win_size_base_get - */ -#define elm_obj_win_size_base_get(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) - -/** - * @def elm_obj_win_size_step_set - * @since 1.8 - * - * Set the window stepping used with sizing calculation - * - * @param[in] w - * @param[in] h - * - * @see elm_win_size_step_set - */ -#define elm_obj_win_size_step_set(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) - -/** - * @def elm_obj_win_size_step_get - * @since 1.8 - * - * Get the stepping of a window. - * - * @param[out] w - * @param[out] h - * - * @see elm_win_size_step_get - */ -#define elm_obj_win_size_step_get(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) - -/** - * @def elm_obj_win_layer_set - * @since 1.8 - * - * Set the layer of the window. - * - * @param[in] layer - * - * @see elm_win_layer_set - */ -#define elm_obj_win_layer_set(layer) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_SET), EO_TYPECHECK(int, layer) - -/** - * @def elm_obj_win_layer_get - * @since 1.8 - * - * Get the layer of the window. - * - * @param[out] ret - * - * @see elm_win_layer_get - */ -#define elm_obj_win_layer_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_win_rotation_set - * @since 1.8 - * - * Set the rotation of the window. - * - * @param[in] rotation - * - * @see elm_win_rotation_set - */ -#define elm_obj_win_rotation_set(rotation) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_SET), EO_TYPECHECK(int, rotation) - -/** - * @def elm_obj_win_rotation_with_resize_set - * @since 1.8 - * - * Rotates the window and resizes it. - * - * @param[in] rotation - * - * @see elm_win_rotation_with_resize_set - */ -#define elm_obj_win_rotation_with_resize_set(rotation) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET), EO_TYPECHECK(int, rotation) - -/** - * @def elm_obj_win_rotation_get - * @since 1.8 - * - * Get the rotation of the window. - * - * @param[out] ret - * - * @see elm_win_rotation_get - */ -#define elm_obj_win_rotation_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_win_sticky_set - * @since 1.8 - * - * Set the sticky state of the window. - * - * @param[in] sticky - * - * @see elm_win_sticky_set - */ -#define elm_obj_win_sticky_set(sticky) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_SET), EO_TYPECHECK(Eina_Bool, sticky) - -/** - * @def elm_obj_win_sticky_get - * @since 1.8 - * - * Get the sticky state of the window. - * - * @param[out] ret - * - * @see elm_win_sticky_get - */ -#define elm_obj_win_sticky_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_keyboard_mode_set - * @since 1.8 - * - * Sets the keyboard mode of the window. - * - * @param[in] mode - * - * @see elm_win_keyboard_mode_set - */ -#define elm_obj_win_keyboard_mode_set(mode) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET), EO_TYPECHECK(Elm_Win_Keyboard_Mode, mode) - -/** - * @def elm_obj_win_keyboard_mode_get - * @since 1.8 - * - * Gets the keyboard mode of the window. - * - * @param[out] ret - * - * @see elm_win_keyboard_mode_get - */ -#define elm_obj_win_keyboard_mode_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET), EO_TYPECHECK(Elm_Win_Keyboard_Mode *, ret) - -/** - * @def elm_obj_win_keyboard_win_set - * @since 1.8 - * - * Sets whether the window is a keyboard. - * - * @param[in] is_keyboard - * - * @see elm_win_keyboard_win_set - */ -#define elm_obj_win_keyboard_win_set(is_keyboard) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET), EO_TYPECHECK(Eina_Bool, is_keyboard) - -/** - * @def elm_obj_win_keyboard_win_get - * @since 1.8 - * - * Gets whether the window is a keyboard. - * - * @param[out] ret - * - * @see elm_win_keyboard_win_get - */ -#define elm_obj_win_keyboard_win_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_indicator_mode_set - * @since 1.8 - * - * Sets the indicator mode of the window. - * - * @param[in] mode - * - * @see elm_win_indicator_mode_set - */ -#define elm_obj_win_indicator_mode_set(mode) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET), EO_TYPECHECK(Elm_Win_Indicator_Mode, mode) - -/** - * @def elm_obj_win_indicator_mode_get - * @since 1.8 - * - * Gets the indicator mode of the window. - * - * @param[out] ret - * - * @see elm_win_indicator_mode_get - */ -#define elm_obj_win_indicator_mode_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET), EO_TYPECHECK(Elm_Win_Indicator_Mode *, ret) - -/** - * @def elm_obj_win_indicator_opacity_set - * @since 1.8 - * - * Sets the indicator opacity mode of the window. - * - * @param[in] mode - * - * @see elm_win_indicator_opacity_set - */ -#define elm_obj_win_indicator_opacity_set(mode) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET), EO_TYPECHECK(Elm_Win_Indicator_Opacity_Mode, mode) - -/** - * @def elm_obj_win_indicator_opacity_get - * @since 1.8 - * - * Gets the indicator opacity mode of the window. - * - * @param[out] ret - * - * @see elm_win_indicator_opacity_get - */ -#define elm_obj_win_indicator_opacity_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET), EO_TYPECHECK(Elm_Win_Indicator_Opacity_Mode *, ret) - -/** - * @def elm_obj_win_screen_position_get - * @since 1.8 - * - * Get the screen position of a window. - * - * @param[out] x - * @param[out] y - * - * @see elm_win_screen_position_get - */ -#define elm_obj_win_screen_position_get(x, y) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y) - -/** - * @def elm_obj_win_focus_get - * @since 1.8 - * - * Determine whether a window has focus - * - * @param[out] ret - * - * @see elm_win_focus_get - */ -#define elm_obj_win_focus_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_screen_constrain_set - * @since 1.8 - * - * Constrain the maximum width and height of a window to the width and height of its screen - * - * @param[in] constrain - * - * @see elm_win_screen_constrain_set - */ -#define elm_obj_win_screen_constrain_set(constrain) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET), EO_TYPECHECK(Eina_Bool, constrain) - -/** - * @def elm_obj_win_screen_constrain_get - * @since 1.8 - * - * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen - * - * @param[out] ret - * - * @see elm_win_screen_constrain_get - */ -#define elm_obj_win_screen_constrain_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_screen_size_get - * @since 1.8 - * - * Get screen geometry details for the screen that a window is on - * - * @param[out] x - * @param[out] y - * @param[out] w - * @param[out] h - * - * @see elm_win_screen_size_get - */ -#define elm_obj_win_screen_size_get(x, y, w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) - -/** - * @def elm_obj_win_screen_dpi_get - * @since 1.8 - * - * Get screen dpi for the screen that a window is on - * - * @param[out] xdpi - * @param[out] ydpi - * - * @see elm_win_screen_dpi_get - */ -#define elm_obj_win_screen_dpi_get(xdpi, ydpi) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET), EO_TYPECHECK(int *, xdpi), EO_TYPECHECK(int *, ydpi) - -/** - * @def elm_obj_win_conformant_set - * @since 1.8 - * - * Set if this window is an illume conformant window - * - * @param[in] conformant - * - * @see elm_win_conformant_set - */ -#define elm_obj_win_conformant_set(conformant) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET), EO_TYPECHECK(Eina_Bool, conformant) - -/** - * @def elm_obj_win_conformant_get - * @since 1.8 - * - * Get if this window is an illume conformant window - * - * @param[out] ret - * - * @see elm_win_conformant_get - */ -#define elm_obj_win_conformant_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_quickpanel_set - * @since 1.8 - * - * Set a window to be an illume quickpanel window - * - * @param[in] quickpanel - * - * @see elm_win_quickpanel_set - */ -#define elm_obj_win_quickpanel_set(quickpanel) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET), EO_TYPECHECK(Eina_Bool, quickpanel) - -/** - * @def elm_obj_win_quickpanel_get - * @since 1.8 - * - * Get if this window is a quickpanel or not - * - * @param[out] ret - * - * @see elm_win_quickpanel_get - */ -#define elm_obj_win_quickpanel_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_quickpanel_priority_major_set - * @since 1.8 - * - * Set the major priority of a quickpanel window - * - * @param[in] priority - * - * @see elm_win_quickpanel_priority_major_set - */ -#define elm_obj_win_quickpanel_priority_major_set(priority) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET), EO_TYPECHECK(int, priority) - -/** - * @def elm_obj_win_quickpanel_priority_major_get - * @since 1.8 - * - * Get the major priority of a quickpanel window - * - * @param[out] ret - * - * @see elm_win_quickpanel_priority_major_get - */ -#define elm_obj_win_quickpanel_priority_major_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_win_quickpanel_priority_minor_set - * @since 1.8 - * - * Set the minor priority of a quickpanel window - * - * @param[in] priority - * - * @see elm_win_quickpanel_priority_minor_set - */ -#define elm_obj_win_quickpanel_priority_minor_set(priority) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET), EO_TYPECHECK(int, priority) - -/** - * @def elm_obj_win_quickpanel_priority_minor_get - * @since 1.8 - * - * Get the minor priority of a quickpanel window - * - * @param[out] ret - * - * @see elm_win_quickpanel_priority_minor_get - */ -#define elm_obj_win_quickpanel_priority_minor_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_win_quickpanel_zone_set - * @since 1.8 - * - * Set which zone this quickpanel should appear in - * - * @param[in] zone - * - * @see elm_win_quickpanel_zone_set - */ -#define elm_obj_win_quickpanel_zone_set(zone) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET), EO_TYPECHECK(int, zone) - -/** - * @def elm_obj_win_quickpanel_zone_get - * @since 1.8 - * - * Get which zone this quickpanel should appear in - * - * @param[out] ret - * - * @see elm_win_quickpanel_zone_get - */ -#define elm_obj_win_quickpanel_zone_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET), EO_TYPECHECK(int *, ret) - -/** - * @def elm_obj_win_prop_focus_skip_set - * @since 1.8 - * - * Set the window to be skipped by keyboard focus - * - * @param[in] skip - * - * @see elm_win_prop_focus_skip_set - */ -#define elm_obj_win_prop_focus_skip_set(skip) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET), EO_TYPECHECK(Eina_Bool, skip) - -/** - * @def elm_obj_win_illume_command_send - * @since 1.8 - * - * Send a command to the windowing environment - * - * @param[in] command - * @param[in] params - * - * @see elm_win_illume_command_send - */ -#define elm_obj_win_illume_command_send(command, params) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND), EO_TYPECHECK(Elm_Illume_Command, command), EO_TYPECHECK(void *, params) - -/** - * @def elm_obj_win_inlined_image_object_get - * @since 1.8 - * - * Get the inlined image object handle - * - * @param[out] ret - * - * @see elm_win_inlined_image_object_get - */ -#define elm_obj_win_inlined_image_object_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET), EO_TYPECHECK(Evas_Object **, ret) - -/** - * @def elm_obj_win_focus_highlight_enabled_set - * @since 1.8 - * - * Set the enabled status for the focus highlight in a window - * - * @param[in] enabled - * - * @see elm_win_focus_highlight_enabled_set - */ -#define elm_obj_win_focus_highlight_enabled_set(enabled) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled) - -/** - * @def elm_obj_win_focus_highlight_enabled_get - * @since 1.8 - * - * Get the enabled value of the focus highlight for this window - * - * @param[out] ret - * - * @see elm_win_focus_highlight_enabled_get - */ -#define elm_obj_win_focus_highlight_enabled_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_focus_highlight_style_set - * @since 1.8 - * - * Set the style for the focus highlight on this window - * - * @param[in] style - * - * @see elm_win_focus_highlight_style_set - */ -#define elm_obj_win_focus_highlight_style_set(style) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET), EO_TYPECHECK(const char *, style) - -/** - * @def elm_obj_win_focus_highlight_style_get - * @since 1.8 - * - * Get the style set for the focus highlight object - * - * @param[out] ret - * - * @see elm_win_focus_highlight_style_get - */ -#define elm_obj_win_focus_highlight_style_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET), EO_TYPECHECK(const char **, ret) - -/** - * @def elm_obj_win_socket_listen - * @since 1.8 - * - * Create a socket to provide the service for Plug widget - * - * @param[in] svcname - * @param[in] svcnum - * @param[in] svcsys - * @param[out] ret - * - * @see elm_win_socket_listen - */ -#define elm_obj_win_socket_listen(svcname, svcnum, svcsys, ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN), EO_TYPECHECK(const char *, svcname), EO_TYPECHECK(int, svcnum), EO_TYPECHECK(Eina_Bool, svcsys), EO_TYPECHECK(Eina_Bool *, ret) - -/** - * @def elm_obj_win_xwindow_get - * @since 1.8 - * - * Get the Ecore_X_Window of an Evas_Object - * - * @param[out] ret - * - * @see elm_win_xwindow_get - */ -#define elm_obj_win_xwindow_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET), EO_TYPECHECK(Ecore_X_Window *, ret) - -/** - * @def elm_obj_win_wl_window_get - * @since 1.8 - * - * Get the Ecore_Wl_Window of and Evas_Object - * - * @param[out] ret - * - * @see elm_win_wl_window_get - */ -#define elm_obj_win_wl_window_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET), EO_TYPECHECK(Ecore_Wl_Window **, ret) - -/** - * Defines the types of window that can be created - * - * These are hints set on the window so that a running Window Manager knows - * how the window should be handled and/or what kind of decorations it - * should have. - * - * Currently, only the X11 backed engines use them. - */ -typedef enum -{ - ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level - window. Almost every window will be created with this - type. */ - ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */ - ELM_WIN_DESKTOP, /**< For special desktop windows, like a background - window holding desktop icons. */ - ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would - be kept on top of any other window by the Window - Manager. */ - ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or - similar. */ - ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */ - ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or - palette. */ - ELM_WIN_SPLASH, /**< Splash window for a starting up application. */ - ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an - entry in a menubar is clicked. Typically used - with elm_win_override_set(). This hint exists - for completion only, as the EFL way of - implementing a menu would not normally use a - separate window for its contents. */ - ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu - triggered by right-clicking an object. */ - ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of - explanatory text that typically appear after the - mouse cursor hovers over an object for a while. - Typically used with elm_win_override_set() and also - not very commonly used in the EFL. */ - ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about - battery life or a new E-Mail received. */ - ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not - usually used in the EFL. */ - ELM_WIN_DND, /**< Used to indicate the window is a representation of an - object being dragged across different windows, or even - applications. Typically used with - elm_win_override_set(). */ - ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image - buffer. No actual window is created for this - type, instead the window and all of its - contents will be rendered to an image buffer. - This allows to have children window inside a - parent one just like any other object would - be, and do other things like applying @c - Evas_Map effects to it. This is the only type - of window that requires the @c parent - parameter of elm_win_add() to be a valid @c - Evas_Object. */ - ELM_WIN_SOCKET_IMAGE,/**< The window is rendered onto an image buffer - and can be shown other process's plug image object. - No actual window is created for this type, - instead the window and all of its contents will be - rendered to an image buffer and can be shown - other process's plug image object*/ -} Elm_Win_Type; - -/** - * The different layouts that can be requested for the virtual keyboard. - * - * When the application window is being managed by Illume, it may request - * any of the following layouts for the virtual keyboard. - */ -typedef enum -{ - ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */ - ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */ - ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */ - ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */ - ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */ - ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */ - ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */ - ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */ - ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QWERTY) keyboard layout */ - ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */ - ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */ - ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */ - ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */ - ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */ - ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */ - ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */ -} Elm_Win_Keyboard_Mode; - -/** - * In some environments, like phones, you may have an indicator that - * shows battery status, reception, time etc. This is the indicator. - * - * Sometimes you don't want it because you provide the same functionality - * inside your app, so this will request that the indicator is hidden in - * this circumstance if you use ELM_ILLUME_INDICATOR_HIDE. The default - * is to have the indicator shown. - */ -typedef enum -{ - ELM_WIN_INDICATOR_UNKNOWN, /**< Unknown indicator state */ - ELM_WIN_INDICATOR_HIDE, /**< Hides the indicator */ - ELM_WIN_INDICATOR_SHOW /**< Shows the indicator */ -} Elm_Win_Indicator_Mode; - -/** - * Defines the opacity modes of indicator that can be shown - */ - -typedef enum -{ - ELM_WIN_INDICATOR_OPACITY_UNKNOWN, /**< Unknown indicator opacity mode */ - ELM_WIN_INDICATOR_OPAQUE, /**< Opacifies the indicator */ - ELM_WIN_INDICATOR_TRANSLUCENT, /**< Be translucent the indicator */ - ELM_WIN_INDICATOR_TRANSPARENT /**< Transparentizes the indicator */ -} Elm_Win_Indicator_Opacity_Mode; - -/** - * Available commands that can be sent to the Illume manager. - * - * When running under an Illume session, a window may send commands to the - * Illume manager to perform different actions. - */ -typedef enum -{ - ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous window */ - ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window in the list */ - ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home screen */ - ELM_ILLUME_COMMAND_CLOSE, /**< Closes the currently active window */ -} Elm_Illume_Command; - -/** - * Adds a window object. If this is the first window created, pass NULL as - * @p parent. - * - * @param parent Parent object to add the window to, or NULL - * @param name The name of the window - * @param type The window type, one of #Elm_Win_Type. - * - * The @p parent parameter can be @c NULL for every window @p type - * except #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the - * canvas on which the image object will be created. - * - * @return The created object, or @c NULL on failure - * - * @ingroup Win - */ -EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type); - -/** - * Adds a window object with standard setup - * - * @param name The name of the window - * @param title The title for the window - * - * This creates a window like elm_win_add() but also puts in a standard - * background with elm_bg_add(), as well as setting the window title to - * @p title. The window type created is of type ELM_WIN_BASIC, with @c NULL - * as the parent widget. - * - * @return The created object, or @c NULL on failure - * - * @see elm_win_add() - * - * @ingroup Win - */ -EAPI Evas_Object *elm_win_util_standard_add(const char *name, const char *title); - -/** - * Add @p subobj as a resize object of window @p obj. - * - * - * Setting an object as a resize object of the window means that the - * @p subobj child's size and position will be controlled by the window - * directly. That is, the object will be resized to match the window size - * and should never be moved or resized manually by the developer. - * - * In addition, resize objects of the window control what the minimum size - * of it will be, as well as whether it can or not be resized by the user. - * - * For the end user to be able to resize a window by dragging the handles - * or borders provided by the Window Manager, or using any other similar - * mechanism, all of the resize objects in the window should have their - * evas_object_size_hint_weight_set() set to EVAS_HINT_EXPAND. - * - * Also notice that the window can get resized to the current size of the - * object if the EVAS_HINT_EXPAND is set @b after the call to - * elm_win_resize_object_add(). So if the object should get resized to the - * size of the window, set this hint @b before adding it as a resize object - * (this happens because the size of the window and the object are evaluated - * as soon as the object is added to the window). - * - * @param obj The window object - * @param subobj The resize object to add - * - * @ingroup Win - */ -EAPI void elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj); - -/** - * Delete @p subobj as a resize object of window @p obj. - * - * This function removes the object @p subobj from the resize objects of - * the window @p obj. It will not delete the object itself, which will be - * left unmanaged and should be deleted by the developer, manually handled - * or set as child of some other container. - * - * @param obj The window object - * @param subobj The resize object to add - * - * @ingroup Win - */ -EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj); - -/** - * Set the title of the window - * - * @param obj The window object - * @param title The title to set - * - * @ingroup Win - */ -EAPI void elm_win_title_set(Evas_Object *obj, const char *title); - -/** - * Get the title of the window - * - * The returned string is an internal one and should not be freed or - * modified. It will also be invalid if a new title is set or if - * the window is destroyed. - * - * @param obj The window object - * @return The title - * - * @ingroup Win - */ -EAPI const char *elm_win_title_get(const Evas_Object *obj); - -/** - * Set the icon name of the window - * - * @param obj The window object - * @param icon_name The icon name to set - * - * @ingroup Win - */ -EAPI void elm_win_icon_name_set(Evas_Object *obj, const char *icon_name); - -/** - * Get the icon name of the window - * - * The returned string is an internal one and should not be freed or - * modified. It will also be invalid if a new icon name is set or if - * the window is destroyed. - * - * @param obj The window object - * @return The icon name - * - * @ingroup Win - */ -EAPI const char *elm_win_icon_name_get(const Evas_Object *obj); - -/** - * Set the role of the window - * - * @param obj The window object - * @param role The role to set - * - * @ingroup Win - */ -EAPI void elm_win_role_set(Evas_Object *obj, const char *role); - -/** - * Get the role of the window - * - * The returned string is an internal one and should not be freed or - * modified. It will also be invalid if a new role is set or if - * the window is destroyed. - * - * @param obj The window object - * @return The role - * - * @ingroup Win - */ -EAPI const char *elm_win_role_get(const Evas_Object *obj); - -/** - * Set a window object's icon - * - * This sets an image to be used as the icon for the given window, in - * the window manager decoration part. The exact pixel dimensions of - * the object (not object size) will be used, and the image pixels - * will be used as-is when this function is called. If the image - * object has been updated, then call this function again to source - * the image pixels and put them on the window's icon. Note that - * only Evas image objects are allowed, for - * - * @param obj The window object to get an icon - * @param icon The Evas image object to use for an icon - * - * Example of usage: - * @code - * icon = evas_object_image_add(evas_object_evas_get(elm_window)); - * evas_object_image_file_set(icon, "/path/to/the/icon", NULL); - * elm_win_icon_object_set(elm_window, icon); - * evas_object_show(icon); - * @endcode - * - * @ingroup Win - */ -EAPI void elm_win_icon_object_set(Evas_Object *obj, Evas_Object *icon); - -/** - * Get the icon object used for the window - * - * The object returns is the one marked by elm_win_icon_object_set() as the - * object to use for the window icon. - * - * @param obj The window object - * @return The icon object set - * - * @ingroup Win - */ -EAPI const Evas_Object *elm_win_icon_object_get(const Evas_Object *obj); - -/** - * Set the window's autodel state. - * - * When closing the window in any way outside of the program control, like - * pressing the X button in the titlebar or using a command from the - * Window Manager, a "delete,request" signal is emitted to indicate that - * this event occurred and the developer can take any action, which may - * include, or not, destroying the window object. - * - * When the @p autodel parameter is set, the window will be automatically - * destroyed when this event occurs, after the signal is emitted. - * If @p autodel is @c EINA_FALSE, then the window will not be destroyed - * and is up to the program to do so when it's required. - * - * @param obj The window object - * @param autodel If true, the window will automatically delete itself when - * closed - * - * @ingroup Win - */ -EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel); - -/** - * Get the window's autodel state. - * - * @param obj The window object - * @return If the window will automatically delete itself when closed - * - * @see elm_win_autodel_set() - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj); - -/** - * Activate a window object. - * - * This function sends a request to the Window Manager to activate the - * window pointed by @p obj. If honored by the WM, the window will receive - * the keyboard focus. - * - * @note This is just a request that a Window Manager may ignore, so calling - * this function does not ensure in any way that the window will be the - * active one after it. - * - * @param obj The window object - * - * @ingroup Win - */ -EAPI void elm_win_activate(Evas_Object *obj); - -/** - * Lower a window object. - * - * Places the window pointed by @p obj at the bottom of the stack, so that - * no other window is covered by it. - * - * If elm_win_override_set() is not set, the Window Manager may ignore this - * request. - * - * @param obj The window object - * - * @ingroup Win - */ -EAPI void elm_win_lower(Evas_Object *obj); - -/** - * Raise a window object. - * - * Places the window pointed by @p obj at the top of the stack, so that it's - * not covered by any other window. - * - * If elm_win_override_set() is not set, the Window Manager may ignore this - * request. - * - * @param obj The window object - * - * @ingroup Win - */ -EAPI void elm_win_raise(Evas_Object *obj); - -/** - * Center a window on its screen - * - * This function centers window @p obj horizontally and/or vertically based on the values - * of @p h and @p v. - * @param obj The window object - * @param h If true, center horizontally. If false, do not change horizontal location. - * @param v If true, center vertically. If false, do not change vertical location. - * - * @ingroup Win - */ -EAPI void elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v); - -/** - * Set the borderless state of a window. - * - * This function requests the Window Manager to not draw any decoration - * around the window. - * - * @param obj The window object - * @param borderless If true, the window is borderless - * - * @ingroup Win - */ -EAPI void elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless); - -/** - * Get the borderless state of a window. - * - * @param obj The window object - * @return If true, the window is borderless - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_borderless_get(const Evas_Object *obj); - -/** - * Set the shaped state of a window. - * - * Shaped windows, when supported, will render the parts of the window that - * has no content, transparent. - * - * If @p shaped is EINA_FALSE, then it is strongly advised to have some - * background object or cover the entire window in any other way, or the - * parts of the canvas that have no data will show framebuffer artifacts. - * - * @param obj The window object - * @param shaped If true, the window is shaped - * - * @see elm_win_alpha_set() - * - * @ingroup Win - */ -EAPI void elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped); - -/** - * Get the shaped state of a window. - * - * @param obj The window object - * @return If true, the window is shaped - * - * @see elm_win_shaped_set() - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_shaped_get(const Evas_Object *obj); - -/** - * Set the alpha channel state of a window. - * - * If @p alpha is EINA_TRUE, the alpha channel of the canvas will be enabled - * possibly making parts of the window completely or partially transparent. - * This is also subject to the underlying system supporting it, like for - * example, running under a compositing manager. If no compositing is - * available, enabling this option will instead fallback to using shaped - * windows, with elm_win_shaped_set(). - * - * @param obj The window object - * @param enabled EINA_TRUE if the window alpha channel is enabled, EINA_FALSE otherwise - * - * @see elm_win_alpha_set() - * - * @ingroup Win - */ -EAPI void elm_win_alpha_set(Evas_Object *obj, Eina_Bool enabled); - -/** - * Get the alpha channel state of a window. - * - * @param obj The window object - * @return EINA_TRUE if the window alpha channel is enabled, EINA_FALSE - * otherwise - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_alpha_get(const Evas_Object *obj); - -/** - * Set the override state of a window. - * - * A window with @p override set to EINA_TRUE will not be managed by the - * Window Manager. This means that no decorations of any kind will be shown - * for it, moving and resizing must be handled by the application, as well - * as the window visibility. - * - * This should not be used for normal windows, and even for not so normal - * ones, it should only be used when there's a good reason and with a lot - * of care. Mishandling override windows may result situations that - * disrupt the normal workflow of the end user. - * - * @param obj The window object - * @param override If true, the window is overridden - * - * @ingroup Win - */ -EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override); - -/** - * Get the override state of a window. - * - * @param obj The window object - * @return If true, the window is overridden - * - * @see elm_win_override_set() - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj); - -/** - * Set the fullscreen state of a window. - * - * @param obj The window object - * @param fullscreen If true, the window is fullscreen - * - * @ingroup Win - */ -EAPI void elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen); - -/** - * Get the fullscreen state of a window. - * - * @param obj The window object - * @return If true, the window is fullscreen - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_fullscreen_get(const Evas_Object *obj); - -/** - * Get the Main Menu of a window. - * - * @param obj The window object - * @return The Main Menu of the window (NULL if error). - * - * @ingroup Win - */ -EAPI Evas_Object *elm_win_main_menu_get(const Evas_Object *obj); - -/** - * Set the maximized state of a window. - * - * @param obj The window object - * @param maximized If true, the window is maximized - * - * @ingroup Win - */ -EAPI void elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized); - -/** - * Get the maximized state of a window. - * - * @param obj The window object - * @return If true, the window is maximized - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_maximized_get(const Evas_Object *obj); - -/** - * Set the iconified state of a window. - * - * @param obj The window object - * @param iconified If true, the window is iconified - * - * @ingroup Win - */ -EAPI void elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified); - -/** - * Get the iconified state of a window. - * - * @param obj The window object - * @return If true, the window is iconified - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_iconified_get(const Evas_Object *obj); - -/** - * Set the withdrawn state of a window. - * - * @param obj The window object - * @param withdrawn If true, the window is withdrawn - * - * @ingroup Win - */ -EAPI void elm_win_withdrawn_set(Evas_Object *obj, Eina_Bool withdrawn); - -/** - * Get the withdrawn state of a window. - * - * @param obj The window object - * @return If true, the window is withdrawn - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_withdrawn_get(const Evas_Object *obj); - -/** - * Set the array of available profiles to a window. - * - * @param obj The window object - * @param profiles The string array of available profiles - * @param count The number of members in profiles - * - * @ingroup Win - * @since 1.8 - */ -EAPI void elm_win_available_profiles_set(Evas_Object *obj, const char **profiles, unsigned int count); - -/** - * Get the array of available profiles of a window. - * - * @param obj The window object - * @param profiles Where to return the string array of available profiles - * @param count Where to return the number of members in profiles - * @return EINA_TRUE if available profiles exist, EINA_FALSE otherwise - * - * @ingroup Win - * @since 1.8 - */ -EAPI Eina_Bool elm_win_available_profiles_get(Evas_Object *obj, char ***profiles, unsigned int *count); - -/** - * Set the profile of a window. - * - * @param obj The window object - * @param profile The string value of a window profile - * - * @ingroup Win - * @since 1.8 - */ -EAPI void elm_win_profile_set(Evas_Object *obj, const char *profile); - -/** - * Get the profile of a window. - * - * @param obj The window object - * @return The string value of a window profile, or NULL if none exists - * - * @ingroup Win - * @since 1.8 - */ -EAPI const char *elm_win_profile_get(const Evas_Object *obj); - -/** - * Set the urgent state of a window. - * - * @param obj The window object - * @param urgent If true, the window is urgent - * - * @ingroup Win - */ -EAPI void elm_win_urgent_set(Evas_Object *obj, Eina_Bool urgent); - -/** - * Get the urgent state of a window. - * - * @param obj The window object - * @return If true, the window is urgent - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_urgent_get(const Evas_Object *obj); - -/** - * Set the demand_attention state of a window. - * - * @param obj The window object - * @param demand_attention If true, the window is demand_attention - * - * @ingroup Win - */ -EAPI void elm_win_demand_attention_set(Evas_Object *obj, Eina_Bool demand_attention); - -/** - * Get the demand_attention state of a window. - * - * @param obj The window object - * @return If true, the window is demand_attention - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_demand_attention_get(const Evas_Object *obj); - -/** - * Set the modal state of a window. - * - * @param obj The window object - * @param modal If true, the window is modal - * - * @ingroup Win - */ -EAPI void elm_win_modal_set(Evas_Object *obj, Eina_Bool modal); - -/** - * Get the modal state of a window. - * - * @param obj The window object - * @return If true, the window is modal - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_modal_get(const Evas_Object *obj); - -/** - * Set the aspect ratio of a window. - * - * @param obj The window object - * @param aspect If 0, the window has no aspect limits, otherwise it is - * width divided by height - * - * @ingroup Win - */ -EAPI void elm_win_aspect_set(Evas_Object *obj, double aspect); - -/** - * Get the aspect ratio of a window. - * - * @param obj The window object - * @return The aspect ratio set (0 by default) - * - * @ingroup Win - */ -EAPI double elm_win_aspect_get(const Evas_Object *obj); - -/** - * Set the base window size used with stepping calculation - * - * Base size + stepping is what is calculated for window sizing restrictions. - * - * @param obj The window object - * @param w The base width - * @param h The base height - * - * @ingroup Win - * @see elm_win_size_step_set - * @see elm_win_size_base_get - * @since 1.7 - */ -EAPI void elm_win_size_base_set(Evas_Object *obj, int w, int h); - -/** - * Get the base size of a window. - * - * @param obj The window object - * @param w Pointer in which to store returned base width - * @param h Pointer in which to store returned base height - * - * @ingroup Win - * @see elm_win_size_base_set - * @see elm_win_size_step_set - * @since 1.7 - */ -EAPI void elm_win_size_base_get(Evas_Object *obj, int *w, int *h); - -/** - * Set the window stepping used with sizing calculation - * - * Base size + stepping is what is calculated for window sizing restrictions. - * - * @param obj The window object - * @param w The stepping width (0 disables) - * @param h The stepping height (0 disables) - * - * @ingroup Win - * @see elm_win_size_step_get - * @see elm_win_size_base_set - * @since 1.7 - */ -EAPI void elm_win_size_step_set(Evas_Object *obj, int w, int h); - -/** - * Get the stepping of a window. - * - * @param obj The window object - * @param w Pointer in which to store returned stepping width - * @param h Pointer in which to store returned stepping height - * - * @ingroup Win - * @see elm_win_size_base_set - * @see elm_win_size_step_set - * @since 1.7 - */ -EAPI void elm_win_size_step_get(Evas_Object *obj, int *w, int *h); - -/** - * Set the layer of the window. - * - * What this means exactly will depend on the underlying engine used. - * - * In the case of X11 backed engines, the value in @p layer has the - * following meanings: - * @li < 3: The window will be placed below all others. - * @li > 5: The window will be placed above all others. - * @li other: The window will be placed in the default layer. - * - * @param obj The window object - * @param layer The layer of the window - * - * @ingroup Win - */ -EAPI void elm_win_layer_set(Evas_Object *obj, int layer); - -/** - * Get the layer of the window. - * - * @param obj The window object - * @return The layer of the window - * - * @see elm_win_layer_set() - * - * @ingroup Win - */ -EAPI int elm_win_layer_get(const Evas_Object *obj); - -/** - * This pushes (incriments) the norender counter on the window - * - * @param obj The window object - * - * There are some occasions where you wish to suspend rendering on a window. - * You may be "sleeping" and have nothing to update and do not want animations - * or other theme side-effects causing rendering to the window while "asleep". - * You can push (and pop) the norender mode to have this work. - * - * If combined with evas_render_dump(), evas_image_cache_flush() and - * evas_font_cache_flush() (and maybe edje_file_cache_flush() and - * edje_collection_cache_flush()), you can minimize memory footprint - * significantly while "asleep", and the pausing of rendering ensures - * evas does not re-load data into memory until needed. When rendering is - * resumed, data will be re-loaded as needed, which may result in some - * lag, but does save memory. - * - * @see elm_win_norender_pop() - * @see elm_win_norender_get() - * @see elm_win_render() - * @ingroup Win - * @since 1.7 - */ -EAPI void elm_win_norender_push(Evas_Object *obj); - -/** - * This pops (decrements) the norender counter on the window - * - * @param obj The window object - * - * Once norender has gone back to 0, then automatic rendering will continue - * in the given window. If it is already at 0, this will have no effect. - * - * @see elm_win_norender_push() - * @see elm_win_norender_get() - * @see elm_win_render() - * @ingroup Win - * @since 1.7 - */ -EAPI void elm_win_norender_pop(Evas_Object *obj); - -/** - * The retruns how many times norender has been pushed on the window - * @param obj The window object - * @return The number of times norender has been pushed - * - * @see elm_win_norender_push() - * @see elm_win_norender_pop() - * @see elm_win_render() - * @ingroup Win - * @since 1.7 - */ -EAPI int elm_win_norender_get(Evas_Object *obj); - -/** - * This manually asks evas to render the window now - * - * @param obj The window object - * - * You should NEVER call this unless you really know what you are doing and - * why. Never call this unless you are asking for performance degredation - * and possibly weird behavior. Windows get automatically rendered when the - * application goes idle so there is never a need to call this UNLESS you - * have enabled "norender" mode. - * - * @see elm_win_norender_push() - * @see elm_win_norender_pop() - * @see elm_win_norender_get() - * @ingroup Win - * @since 1.7 - */ -EAPI void elm_win_render(Evas_Object *obj); - -/** - * Set the rotation of the window. - * - * Most engines only work with multiples of 90. - * - * This function is used to set the orientation of the window @p obj to - * match that of the screen. The window itself will be resized to adjust - * to the new geometry of its contents. If you want to keep the window size, - * see elm_win_rotation_with_resize_set(). - * - * @param obj The window object - * @param rotation The rotation of the window, in degrees (0-360), - * counter-clockwise. - * - * @ingroup Win - */ -EAPI void elm_win_rotation_set(Evas_Object *obj, int rotation); - -/** - * Rotates the window and resizes it. - * - * Like elm_win_rotation_set(), but it also resizes the window's contents so - * that they fit inside the current window geometry. - * - * @param obj The window object - * @param rotation The rotation of the window in degrees (0-360), - * counter-clockwise. - * - * @ingroup Win - */ -EAPI void elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation); - -/** - * Get the rotation of the window. - * - * @param obj The window object - * @return The rotation of the window in degrees (0-360) - * - * @see elm_win_rotation_set() - * @see elm_win_rotation_with_resize_set() - * - * @ingroup Win - */ -EAPI int elm_win_rotation_get(const Evas_Object *obj); - -/** - * Set the sticky state of the window. - * - * Hints the Window Manager that the window in @p obj should be left fixed - * at its position even when the virtual desktop it's on moves or changes. - * - * @param obj The window object - * @param sticky If true, the window's sticky state is enabled - * - * @ingroup Win - */ -EAPI void elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky); - -/** - * Get the sticky state of the window. - * - * @param obj The window object - * @return If true, the window's sticky state is enabled - * - * @see elm_win_sticky_set() - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_sticky_get(const Evas_Object *obj); - -/** - * Set if this window is an illume conformant window - * - * @param obj The window object - * @param conformant The conformant flag (1 = conformant, 0 = non-conformant) - * - * @ingroup Win - */ -EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant); - -/** - * Get if this window is an illume conformant window - * - * @param obj The window object - * @return A boolean if this window is illume conformant or not - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_conformant_get(const Evas_Object *obj); - -/** - * Set a window to be an illume quickpanel window - * - * By default window objects are not quickpanel windows. - * - * @param obj The window object - * @param quickpanel The quickpanel flag (1 = quickpanel, 0 = normal window) - * - * @ingroup Win - */ -EAPI void elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel); - -/** - * Get if this window is a quickpanel or not - * - * @param obj The window object - * @return A boolean if this window is a quickpanel or not - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_quickpanel_get(const Evas_Object *obj); - -/** - * Set the major priority of a quickpanel window - * - * @param obj The window object - * @param priority The major priority for this quickpanel - * - * @ingroup Win - */ -EAPI void elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority); - -/** - * Get the major priority of a quickpanel window - * - * @param obj The window object - * @return The major priority of this quickpanel - * - * @ingroup Win - */ -EAPI int elm_win_quickpanel_priority_major_get(const Evas_Object *obj); - -/** - * Set the minor priority of a quickpanel window - * - * @param obj The window object - * @param priority The minor priority for this quickpanel - * - * @ingroup Win - */ -EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority); - -/** - * Get the minor priority of a quickpanel window - * - * @param obj The window object - * @return The minor priority of this quickpanel - * - * @ingroup Win - */ -EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj); - -/** - * Set which zone this quickpanel should appear in - * - * @param obj The window object - * @param zone The requested zone for this quickpanel - * - * @ingroup Win - */ -EAPI void elm_win_quickpanel_zone_set(Evas_Object *obj, int zone); - -/** - * Get which zone this quickpanel should appear in - * - * @param obj The window object - * @return The requested zone for this quickpanel - * - * @ingroup Win - */ -EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj); - -/** - * Set the window to be skipped by keyboard focus - * - * This sets the window to be skipped by normal keyboard input. This means - * a window manager will be asked to not focus this window as well as omit - * it from things like the taskbar, pager, "alt-tab" list etc. etc. - * - * Call this and enable it on a window BEFORE you show it for the first time, - * otherwise it may have no effect. - * - * Use this for windows that have only output information or might only be - * interacted with by the mouse or fingers, and never for typing input. - * Be careful that this may have side-effects like making the window - * non-accessible in some cases unless the window is specially handled. Use - * this with care. - * - * @param obj The window object - * @param skip The skip flag state (EINA_TRUE if it is to be skipped) - * - * @ingroup Win - */ -EAPI void elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip); - -/** - * Send a command to the windowing environment - * - * This is intended to work in touchscreen or small screen device - * environments where there is a more simplistic window management policy in - * place. This uses the window object indicated to select which part of the - * environment to control (the part that this window lives in), and provides - * a command and an optional parameter structure (use NULL for this if not - * needed). - * - * @param obj The window object that lives in the environment to control - * @param command The command to send - * @param params Optional parameters for the command - * - * @ingroup Win - */ -EAPI void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params); - -/** - * Get the inlined image object handle - * - * When you create a window with elm_win_add() of type ELM_WIN_INLINED_IMAGE, - * then the window is in fact an evas image object inlined in the parent - * canvas. You can get this object (be careful to not manipulate it as it - * is under control of elementary), and use it to do things like get pixel - * data, save the image to a file, etc. - * - * @param obj The window object to get the inlined image from - * @return The inlined image object, or NULL if none exists - * - * @ingroup Win - */ -EAPI Evas_Object *elm_win_inlined_image_object_get(Evas_Object *obj); - -/** - * Determine whether a window has focus - * @param obj The window to query - * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_focus_get(const Evas_Object *obj); - -/** - * Constrain the maximum width and height of a window to the width and height of its screen - * - * When @p constrain is true, @p obj will never resize larger than the screen. - * @param obj The window object - * @param constrain EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction - * - * @ingroup Win - */ -EAPI void elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain); - -/** - * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen - * - * When this function returns true, @p obj will never resize larger than the screen. - * @param obj The window object - * @return EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_screen_constrain_get(Evas_Object *obj); - -/** - * Get screen geometry details for the screen that a window is on - * @param obj The window to query - * @param x where to return the horizontal offset value. May be NULL. - * @param y where to return the vertical offset value. May be NULL. - * @param w where to return the width value. May be NULL. - * @param h where to return the height value. May be NULL. - * - * @ingroup Win - */ -EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); - -/** - * Get screen dpi for the screen that a window is on - * @param obj The window to query - * @param xdpi Pointer to value to store return horizontal dpi. May be NULL. - * @param ydpi Pointer to value to store return vertical dpi. May be NULL. - * - * @ingroup Win - * @since 1.7 - */ -EAPI void elm_win_screen_dpi_get(const Evas_Object *obj, int *xdpi, int *ydpi); - -/** - * Set the enabled status for the focus highlight in a window - * - * This function will enable or disable the focus highlight only for the - * given window, regardless of the global setting for it - * - * @param obj The window where to enable the highlight - * @param enabled The enabled value for the highlight - * - * @ingroup Win - */ -EAPI void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled); - -/** - * Get the enabled value of the focus highlight for this window - * - * @param obj The window in which to check if the focus highlight is enabled - * - * @return EINA_TRUE if enabled, EINA_FALSE otherwise - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Evas_Object *obj); - -/** - * Set the style for the focus highlight on this window - * - * Sets the style to use for theming the highlight of focused objects on - * the given window. If @p style is NULL, the default will be used. - * - * @param obj The window where to set the style - * @param style The style to set - * - * @ingroup Win - */ -EAPI void elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style); - -/** - * Get the style set for the focus highlight object - * - * Gets the style set for this windows highlight object, or NULL if none - * is set. - * - * @param obj The window to retrieve the highlights style from - * - * @return The style set or NULL if none was. Default is used in that case. - * - * @ingroup Win - */ -EAPI const char *elm_win_focus_highlight_style_get(const Evas_Object *obj); - -/** - * Sets the keyboard mode of the window. - * - * @param obj The window object - * @param mode The mode to set, one of #Elm_Win_Keyboard_Mode - * - * @ingroup Win - */ -EAPI void elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode); - -/** - * Gets the keyboard mode of the window. - * - * @param obj The window object - * @return The mode, one of #Elm_Win_Keyboard_Mode - * - * @ingroup Win - */ -EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj); - -/** - * Sets whether the window is a keyboard. - * - * @param obj The window object - * @param is_keyboard If true, the window is a virtual keyboard - * - * @ingroup Win - */ -EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard); - -/** - * Gets whether the window is a keyboard. - * - * @param obj The window object - * @return If the window is a virtual keyboard - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj); - -/** - * Sets the indicator mode of the window. - * - * @param obj The window object - * @param mode The mode to set, one of #Elm_Win_Indicator_Mode - * - * @ingroup Win - */ -EAPI void elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode); - -/** - * Gets the indicator mode of the window. - * - * @param obj The window object - * @return The mode, one of #Elm_Win_Indicator_Mode - * - * @ingroup Win - */ -EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj); - -/** - * Sets the indicator opacity mode of the window. - * - * @param obj The window object - * @param mode The mode to set, one of #Elm_Win_Indicator_Opacity_Mode - * - * @ingroup Win - */ -EAPI void elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode); - -/** - * Gets the indicator opacity mode of the window. - * - * @param obj The window object - * @return The mode, one of #Elm_Win_Indicator_Opacity_Mode - * - * @ingroup Win - */ -EAPI Elm_Win_Indicator_Opacity_Mode elm_win_indicator_opacity_get(const Evas_Object *obj); - -/** - * Get the screen position of a window. - * - * @param obj The window object - * @param x The int to store the x coordinate to - * @param y The int to store the y coordinate to - * - * @ingroup Win - */ -EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y); - -/** - * Create a socket to provide the service for Plug widget - * - * @param obj The window object - * @param svcname The name of the service to be advertised. ensure that it is unique (when combined with @p svcnum) otherwise creation may fail. - * @param svcnum A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name. - * @param svcsys A boolean that if true, specifies to create a system-wide service all users can connect to, otherwise the service is private to the user id that created the service. - * @return If socket creation is successful - * - * @ingroup Win - */ -EAPI Eina_Bool elm_win_socket_listen(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys); - -/* X specific calls - won't work on non-x engines (return 0) */ -/** - * Get the Ecore_X_Window of an Evas_Object - * - * @param obj The object - * - * @return The Ecore_X_Window of @p obj - * - * @ingroup Win - */ -EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj); - -/* Wayland specific call - returns NULL on non-Wayland engines */ -/** - * Get the Ecore_Wl_Window of and Evas_Object - * - * @param obj the object - * - * @return The Ecore_Wl_Window of @p obj - * - * @ingroup Win - */ -EAPI Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj); - -/** - * @typedef Elm_Win_Trap - * - * Trap can be set with elm_win_trap_set() and will intercept the - * calls to internal ecore_evas with the same name and parameters. If - * there is a trap and it returns @c EINA_TRUE then the call will be - * allowed, otherwise it will be ignored. - * - * @since 1.7 - */ -typedef struct _Elm_Win_Trap Elm_Win_Trap; -struct _Elm_Win_Trap -{ -#define ELM_WIN_TRAP_VERSION (1UL) - unsigned long version; - void *(*add)(Evas_Object *o); /**< object was just added. The returned pointer will be handled to every other trap call. */ - void (*del)(void *data, Evas_Object *o); /**< object will be deleted. */ - Eina_Bool (*hide)(void *data, Evas_Object *o); - Eina_Bool (*show)(void *data, Evas_Object *o); - Eina_Bool (*move)(void *data, Evas_Object *o, int x, int y); - Eina_Bool (*resize)(void *data, Evas_Object *o, int w, int h); - Eina_Bool (*center)(void *data, Evas_Object *o); /* not in ecore_evas, but nice to trap */ - Eina_Bool (*lower)(void *data, Evas_Object *o); - Eina_Bool (*raise)(void *data, Evas_Object *o); - Eina_Bool (*activate)(void *data, Evas_Object *o); - Eina_Bool (*alpha_set)(void *data, Evas_Object *o, Eina_Bool alpha); - Eina_Bool (*aspect_set)(void *data, Evas_Object *o, double aspect); - Eina_Bool (*avoid_damage_set)(void *data, Evas_Object *o, Ecore_Evas_Avoid_Damage_Type on); - Eina_Bool (*borderless_set)(void *data, Evas_Object *o, Eina_Bool on); - Eina_Bool (*demand_attention_set)(void *data, Evas_Object *o, Eina_Bool on); - Eina_Bool (*focus_skip_set)(void *data, Evas_Object *o, Eina_Bool skip); - Eina_Bool (*fullscreen_set)(void *data, Evas_Object *o, Eina_Bool on); - Eina_Bool (*iconified_set)(void *data, Evas_Object *o, Eina_Bool on); - Eina_Bool (*layer_set)(void *data, Evas_Object *o, int layer); - Eina_Bool (*manual_render_set)(void *data, Evas_Object *o, Eina_Bool manual_render); - Eina_Bool (*maximized_set)(void *data, Evas_Object *o, Eina_Bool on); - Eina_Bool (*modal_set)(void *data, Evas_Object *o, Eina_Bool on); - Eina_Bool (*name_class_set)(void *data, Evas_Object *o, const char *n, const char *c); - Eina_Bool (*object_cursor_set)(void *data, Evas_Object *o, Evas_Object *obj, int layer, int hot_x, int hot_y); - Eina_Bool (*override_set)(void *data, Evas_Object *o, Eina_Bool on); - Eina_Bool (*rotation_set)(void *data, Evas_Object *o, int rot); - Eina_Bool (*rotation_with_resize_set)(void *data, Evas_Object *o, int rot); - Eina_Bool (*shaped_set)(void *data, Evas_Object *o, Eina_Bool shaped); - Eina_Bool (*size_base_set)(void *data, Evas_Object *o, int w, int h); - Eina_Bool (*size_step_set)(void *data, Evas_Object *o, int w, int h); - Eina_Bool (*size_min_set)(void *data, Evas_Object *o, int w, int h); - Eina_Bool (*size_max_set)(void *data, Evas_Object *o, int w, int h); - Eina_Bool (*sticky_set)(void *data, Evas_Object *o, Eina_Bool sticky); - Eina_Bool (*title_set)(void *data, Evas_Object *o, const char *t); - Eina_Bool (*urgent_set)(void *data, Evas_Object *o, Eina_Bool urgent); - Eina_Bool (*withdrawn_set)(void *data, Evas_Object *o, Eina_Bool withdrawn); -}; - -/** - * Sets the trap to be used for internal @c Ecore_Evas management. - * - * @param trap the trap to be used or @c NULL to remove traps. Pointer - * is not modified or copied, keep it alive. - * @return @c EINA_TRUE on success, @c EINA_FALSE if there was a - * problem, such as invalid version number. - * - * @warning this is an advanced feature that you should avoid using. - * - * @since 1.7 - */ -EAPI Eina_Bool elm_win_trap_set(const Elm_Win_Trap *trap); - -/** - * Set the floating mode of a window. - * - * @param obj The window object - * @param floating If true, the window is floating mode - * - * @ingroup Win - * @see elm_win_floating_mode_get() - * @since 1.8 - */ -EAPI void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating); - -/** - * Get the floating mode of a window. - * - * @param obj The window object - * @return If true, the window is floating mode - * - * @ingroup Win - * @see elm_win_floating_mode_set() - * @since 1.8 - */ -EAPI Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj); +#include +#ifdef EFL_EO_API_SUPPORT +#include +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include +#endif /** * @} diff --git a/legacy/elementary/src/lib/elm_win_common.h b/legacy/elementary/src/lib/elm_win_common.h new file mode 100644 index 0000000000..664b29b872 --- /dev/null +++ b/legacy/elementary/src/lib/elm_win_common.h @@ -0,0 +1,202 @@ +/** + * Defines the types of window that can be created + * + * These are hints set on the window so that a running Window Manager knows + * how the window should be handled and/or what kind of decorations it + * should have. + * + * Currently, only the X11 backed engines use them. + */ +typedef enum +{ + ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level + window. Almost every window will be created with this + type. */ + ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */ + ELM_WIN_DESKTOP, /**< For special desktop windows, like a background + window holding desktop icons. */ + ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would + be kept on top of any other window by the Window + Manager. */ + ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or + similar. */ + ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */ + ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or + palette. */ + ELM_WIN_SPLASH, /**< Splash window for a starting up application. */ + ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an + entry in a menubar is clicked. Typically used + with elm_win_override_set(). This hint exists + for completion only, as the EFL way of + implementing a menu would not normally use a + separate window for its contents. */ + ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu + triggered by right-clicking an object. */ + ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of + explanatory text that typically appear after the + mouse cursor hovers over an object for a while. + Typically used with elm_win_override_set() and also + not very commonly used in the EFL. */ + ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about + battery life or a new E-Mail received. */ + ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not + usually used in the EFL. */ + ELM_WIN_DND, /**< Used to indicate the window is a representation of an + object being dragged across different windows, or even + applications. Typically used with + elm_win_override_set(). */ + ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image + buffer. No actual window is created for this + type, instead the window and all of its + contents will be rendered to an image buffer. + This allows to have children window inside a + parent one just like any other object would + be, and do other things like applying @c + Evas_Map effects to it. This is the only type + of window that requires the @c parent + parameter of elm_win_add() to be a valid @c + Evas_Object. */ + ELM_WIN_SOCKET_IMAGE,/**< The window is rendered onto an image buffer + and can be shown other process's plug image object. + No actual window is created for this type, + instead the window and all of its contents will be + rendered to an image buffer and can be shown + other process's plug image object*/ +} Elm_Win_Type; + +/** + * The different layouts that can be requested for the virtual keyboard. + * + * When the application window is being managed by Illume, it may request + * any of the following layouts for the virtual keyboard. + */ +typedef enum +{ + ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */ + ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */ + ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */ + ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */ + ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */ + ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */ + ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */ + ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */ + ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QWERTY) keyboard layout */ + ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */ + ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */ + ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */ + ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */ + ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */ + ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */ + ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */ +} Elm_Win_Keyboard_Mode; + +/** + * In some environments, like phones, you may have an indicator that + * shows battery status, reception, time etc. This is the indicator. + * + * Sometimes you don't want it because you provide the same functionality + * inside your app, so this will request that the indicator is hidden in + * this circumstance if you use ELM_ILLUME_INDICATOR_HIDE. The default + * is to have the indicator shown. + */ +typedef enum +{ + ELM_WIN_INDICATOR_UNKNOWN, /**< Unknown indicator state */ + ELM_WIN_INDICATOR_HIDE, /**< Hides the indicator */ + ELM_WIN_INDICATOR_SHOW /**< Shows the indicator */ +} Elm_Win_Indicator_Mode; + +/** + * Defines the opacity modes of indicator that can be shown + */ + +typedef enum +{ + ELM_WIN_INDICATOR_OPACITY_UNKNOWN, /**< Unknown indicator opacity mode */ + ELM_WIN_INDICATOR_OPAQUE, /**< Opacifies the indicator */ + ELM_WIN_INDICATOR_TRANSLUCENT, /**< Be translucent the indicator */ + ELM_WIN_INDICATOR_TRANSPARENT /**< Transparentizes the indicator */ +} Elm_Win_Indicator_Opacity_Mode; + +/** + * Available commands that can be sent to the Illume manager. + * + * When running under an Illume session, a window may send commands to the + * Illume manager to perform different actions. + */ +typedef enum +{ + ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous window */ + ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window in the list */ + ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home screen */ + ELM_ILLUME_COMMAND_CLOSE, /**< Closes the currently active window */ +} Elm_Illume_Command; + +/** + * @typedef Elm_Win_Trap + * + * Trap can be set with elm_win_trap_set() and will intercept the + * calls to internal ecore_evas with the same name and parameters. If + * there is a trap and it returns @c EINA_TRUE then the call will be + * allowed, otherwise it will be ignored. + * + * @since 1.7 + */ +typedef struct _Elm_Win_Trap Elm_Win_Trap; +struct _Elm_Win_Trap +{ +#define ELM_WIN_TRAP_VERSION (1UL) + unsigned long version; + void *(*add)(Evas_Object *o); /**< object was just added. The returned pointer will be handled to every other trap call. */ + void (*del)(void *data, Evas_Object *o); /**< object will be deleted. */ + Eina_Bool (*hide)(void *data, Evas_Object *o); + Eina_Bool (*show)(void *data, Evas_Object *o); + Eina_Bool (*move)(void *data, Evas_Object *o, int x, int y); + Eina_Bool (*resize)(void *data, Evas_Object *o, int w, int h); + Eina_Bool (*center)(void *data, Evas_Object *o); /* not in ecore_evas, but nice to trap */ + Eina_Bool (*lower)(void *data, Evas_Object *o); + Eina_Bool (*raise)(void *data, Evas_Object *o); + Eina_Bool (*activate)(void *data, Evas_Object *o); + Eina_Bool (*alpha_set)(void *data, Evas_Object *o, Eina_Bool alpha); + Eina_Bool (*aspect_set)(void *data, Evas_Object *o, double aspect); + Eina_Bool (*avoid_damage_set)(void *data, Evas_Object *o, Ecore_Evas_Avoid_Damage_Type on); + Eina_Bool (*borderless_set)(void *data, Evas_Object *o, Eina_Bool on); + Eina_Bool (*demand_attention_set)(void *data, Evas_Object *o, Eina_Bool on); + Eina_Bool (*focus_skip_set)(void *data, Evas_Object *o, Eina_Bool skip); + Eina_Bool (*fullscreen_set)(void *data, Evas_Object *o, Eina_Bool on); + Eina_Bool (*iconified_set)(void *data, Evas_Object *o, Eina_Bool on); + Eina_Bool (*layer_set)(void *data, Evas_Object *o, int layer); + Eina_Bool (*manual_render_set)(void *data, Evas_Object *o, Eina_Bool manual_render); + Eina_Bool (*maximized_set)(void *data, Evas_Object *o, Eina_Bool on); + Eina_Bool (*modal_set)(void *data, Evas_Object *o, Eina_Bool on); + Eina_Bool (*name_class_set)(void *data, Evas_Object *o, const char *n, const char *c); + Eina_Bool (*object_cursor_set)(void *data, Evas_Object *o, Evas_Object *obj, int layer, int hot_x, int hot_y); + Eina_Bool (*override_set)(void *data, Evas_Object *o, Eina_Bool on); + Eina_Bool (*rotation_set)(void *data, Evas_Object *o, int rot); + Eina_Bool (*rotation_with_resize_set)(void *data, Evas_Object *o, int rot); + Eina_Bool (*shaped_set)(void *data, Evas_Object *o, Eina_Bool shaped); + Eina_Bool (*size_base_set)(void *data, Evas_Object *o, int w, int h); + Eina_Bool (*size_step_set)(void *data, Evas_Object *o, int w, int h); + Eina_Bool (*size_min_set)(void *data, Evas_Object *o, int w, int h); + Eina_Bool (*size_max_set)(void *data, Evas_Object *o, int w, int h); + Eina_Bool (*sticky_set)(void *data, Evas_Object *o, Eina_Bool sticky); + Eina_Bool (*title_set)(void *data, Evas_Object *o, const char *t); + Eina_Bool (*urgent_set)(void *data, Evas_Object *o, Eina_Bool urgent); + Eina_Bool (*withdrawn_set)(void *data, Evas_Object *o, Eina_Bool withdrawn); +}; + +/** + * Sets the trap to be used for internal @c Ecore_Evas management. + * + * @param trap the trap to be used or @c NULL to remove traps. Pointer + * is not modified or copied, keep it alive. + * @return @c EINA_TRUE on success, @c EINA_FALSE if there was a + * problem, such as invalid version number. + * + * @warning this is an advanced feature that you should avoid using. + * + * @since 1.7 + */ +EAPI Eina_Bool elm_win_trap_set(const Elm_Win_Trap *trap); + + diff --git a/legacy/elementary/src/lib/elm_win_eo.h b/legacy/elementary/src/lib/elm_win_eo.h new file mode 100644 index 0000000000..0a321b36e2 --- /dev/null +++ b/legacy/elementary/src/lib/elm_win_eo.h @@ -0,0 +1,1222 @@ +/** + * @ingroup Win + * + * @{ + */ +#define ELM_OBJ_WIN_CLASS elm_obj_win_class_get() + +const Eo_Class *elm_obj_win_class_get(void) EINA_CONST; + +extern EAPI Eo_Op ELM_OBJ_WIN_BASE_ID; + +enum + { + ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR, + ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD, + ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL, + ELM_OBJ_WIN_SUB_ID_TITLE_SET, + ELM_OBJ_WIN_SUB_ID_TITLE_GET, + ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET, + ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET, + ELM_OBJ_WIN_SUB_ID_ROLE_SET, + ELM_OBJ_WIN_SUB_ID_ROLE_GET, + ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET, + ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET, + ELM_OBJ_WIN_SUB_ID_AUTODEL_SET, + ELM_OBJ_WIN_SUB_ID_AUTODEL_GET, + ELM_OBJ_WIN_SUB_ID_ACTIVATE, + ELM_OBJ_WIN_SUB_ID_LOWER, + ELM_OBJ_WIN_SUB_ID_RAISE, + ELM_OBJ_WIN_SUB_ID_CENTER, + ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET, + ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET, + ELM_OBJ_WIN_SUB_ID_SHAPED_SET, + ELM_OBJ_WIN_SUB_ID_SHAPED_GET, + ELM_OBJ_WIN_SUB_ID_ALPHA_SET, + ELM_OBJ_WIN_SUB_ID_ALPHA_GET, + ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET, + ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET, + ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET, + ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET, + ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET, + ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET, + ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET, + ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET, + ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET, + ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET, + ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET, + ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET, + ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET, + ELM_OBJ_WIN_SUB_ID_PROFILE_SET, + ELM_OBJ_WIN_SUB_ID_PROFILE_GET, + ELM_OBJ_WIN_SUB_ID_URGENT_SET, + ELM_OBJ_WIN_SUB_ID_URGENT_GET, + ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET, + ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET, + ELM_OBJ_WIN_SUB_ID_MODAL_SET, + ELM_OBJ_WIN_SUB_ID_MODAL_GET, + ELM_OBJ_WIN_SUB_ID_ASPECT_SET, + ELM_OBJ_WIN_SUB_ID_ASPECT_GET, + ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET, + ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET, + ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET, + ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET, + ELM_OBJ_WIN_SUB_ID_LAYER_SET, + ELM_OBJ_WIN_SUB_ID_LAYER_GET, + ELM_OBJ_WIN_SUB_ID_ROTATION_SET, + ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET, + ELM_OBJ_WIN_SUB_ID_ROTATION_GET, + ELM_OBJ_WIN_SUB_ID_STICKY_SET, + ELM_OBJ_WIN_SUB_ID_STICKY_GET, + ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET, + ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET, + ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET, + ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET, + ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET, + ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET, + ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET, + ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET, + ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET, + ELM_OBJ_WIN_SUB_ID_FOCUS_GET, + ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET, + ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET, + ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET, + ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET, + ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET, + ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET, + ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET, + ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET, + ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND, + ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET, + ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET, + ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET, + ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET, + ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET, + ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN, + ELM_OBJ_WIN_SUB_ID_XWINDOW_GET, + ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET, + ELM_OBJ_WIN_SUB_ID_LAST + }; + +#define ELM_OBJ_WIN_ID(sub_id) (ELM_OBJ_WIN_BASE_ID + sub_id) + + +/** + * @def elm_obj_win_constructor + * @since 1.8 + * + * No description supplied by the EAPI. + * + * @param[in] name + * @param[in] type + * + */ +#define elm_obj_win_constructor(name, type) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR), EO_TYPECHECK(const char *, name), EO_TYPECHECK(Elm_Win_Type, type) + +/** + * @def elm_obj_win_resize_object_add + * @since 1.8 + * + * Add subobj as a resize object of window @p obj. + * + * @param[in] subobj + * + * @see elm_win_resize_object_add + */ +#define elm_obj_win_resize_object_add(subobj) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD), EO_TYPECHECK(Evas_Object *, subobj) + +/** + * @def elm_obj_win_resize_object_del + * @since 1.8 + * + * Delete subobj as a resize object of window @p obj. + * + * @param[in] subobj + * + * @see elm_win_resize_object_del + */ +#define elm_obj_win_resize_object_del(subobj) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL), EO_TYPECHECK(Evas_Object *, subobj) + +/** + * @def elm_obj_win_title_set + * @since 1.8 + * + * Set the title of the window + * + * @param[in] title + * + * @see elm_win_title_set + */ +#define elm_obj_win_title_set(title) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_SET), EO_TYPECHECK(const char *, title) + +/** + * @def elm_obj_win_title_get + * @since 1.8 + * + * Get the title of the window + * + * @param[out] ret + * + * @see elm_win_title_get + */ +#define elm_obj_win_title_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_GET), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_win_icon_name_set + * @since 1.8 + * + * Set the icon name of the window + * + * @param[in] icon_name + * + * @see elm_win_icon_name_set + */ +#define elm_obj_win_icon_name_set(icon_name) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET), EO_TYPECHECK(const char *, icon_name) + +/** + * @def elm_obj_win_icon_name_get + * @since 1.8 + * + * Get the icon name of the window + * + * @param[out] ret + * + * @see elm_win_icon_name_get + */ +#define elm_obj_win_icon_name_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_GET), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_win_role_set + * @since 1.8 + * + * Set the role of the window + * + * @param[in] role + * + * @see elm_win_role_set + */ +#define elm_obj_win_role_set(role) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_SET), EO_TYPECHECK(const char *, role) + +/** + * @def elm_obj_win_role_get + * @since 1.8 + * + * Get the role of the window + * + * @param[out] ret + * + * @see elm_win_role_get + */ +#define elm_obj_win_role_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROLE_GET), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_win_icon_object_set + * @since 1.8 + * + * Set a window object's icon + * + * @param[in] icon + * + * @see elm_win_icon_object_set + */ +#define elm_obj_win_icon_object_set(icon) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_SET), EO_TYPECHECK(Evas_Object *, icon) + +/** + * @def elm_obj_win_icon_object_get + * @since 1.8 + * + * Get the icon object used for the window + * + * @param[out] ret + * + * @see elm_win_icon_object_get + */ +#define elm_obj_win_icon_object_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_OBJECT_GET), EO_TYPECHECK(const Evas_Object **, ret) + +/** + * @def elm_obj_win_autodel_set + * @since 1.8 + * + * Set the window's autodel state. + * + * @param[in] autodel + * + * @see elm_win_autodel_set + */ +#define elm_obj_win_autodel_set(autodel) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_SET), EO_TYPECHECK(Eina_Bool, autodel) + +/** + * @def elm_obj_win_autodel_get + * @since 1.8 + * + * Get the window's autodel state. + * + * @param[out] ret + * + * @see elm_win_autodel_get + */ +#define elm_obj_win_autodel_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AUTODEL_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_activate + * @since 1.8 + * + * Activate a window object. + * + * + * @see elm_win_activate + */ +#define elm_obj_win_activate() ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ACTIVATE) + +/** + * @def elm_obj_win_lower + * @since 1.8 + * + * Lower a window object. + * + * + * @see elm_win_lower + */ +#define elm_obj_win_lower() ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LOWER) + +/** + * @def elm_obj_win_raise + * @since 1.8 + * + * Raise a window object. + * + * + * @see elm_win_raise + */ +#define elm_obj_win_raise() ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RAISE) + +/** + * @def elm_obj_win_center + * @since 1.8 + * + * Center a window on its screen + * + * @param[in] h + * @param[in] v + * + * @see elm_win_center + */ +#define elm_obj_win_center(h, v) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CENTER), EO_TYPECHECK(Eina_Bool, h), EO_TYPECHECK(Eina_Bool, v) + +/** + * @def elm_obj_win_borderless_set + * @since 1.8 + * + * Set the borderless state of a window. + * + * @param[in] borderless + * + * @see elm_win_borderless_set + */ +#define elm_obj_win_borderless_set(borderless) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_SET), EO_TYPECHECK(Eina_Bool, borderless) + +/** + * @def elm_obj_win_borderless_get + * @since 1.8 + * + * Get the borderless state of a window. + * + * @param[out] ret + * + * @see elm_win_borderless_get + */ +#define elm_obj_win_borderless_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_BORDERLESS_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_shaped_set + * @since 1.8 + * + * Set the shaped state of a window. + * + * @param[in] shaped + * + * @see elm_win_shaped_set + */ +#define elm_obj_win_shaped_set(shaped) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_SET), EO_TYPECHECK(Eina_Bool, shaped) + +/** + * @def elm_obj_win_shaped_get + * @since 1.8 + * + * Get the shaped state of a window. + * + * @param[out] ret + * + * @see elm_win_shaped_get + */ +#define elm_obj_win_shaped_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SHAPED_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_alpha_set + * @since 1.8 + * + * Set the alpha channel state of a window. + * + * @param[in] alpha + * + * @see elm_win_alpha_set + */ +#define elm_obj_win_alpha_set(alpha) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_SET), EO_TYPECHECK(Eina_Bool, alpha) + +/** + * @def elm_obj_win_alpha_get + * @since 1.8 + * + * Get the alpha channel state of a window. + * + * @param[out] ret + * + * @see elm_win_alpha_get + */ +#define elm_obj_win_alpha_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ALPHA_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_override_set + * @since 1.8 + * + * Set the override state of a window. + * + * @param[in] override + * + * @see elm_win_override_set + */ +#define elm_obj_win_override_set(override) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_SET), EO_TYPECHECK(Eina_Bool, override) + +/** + * @def elm_obj_win_override_get + * @since 1.8 + * + * Get the override state of a window. + * + * @param[out] ret + * + * @see elm_win_override_get + */ +#define elm_obj_win_override_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_OVERRIDE_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_fullscreen_set + * @since 1.8 + * + * Set the fullscreen state of a window. + * + * @param[in] fullscreen + * + * @see elm_win_fullscreen_set + */ +#define elm_obj_win_fullscreen_set(fullscreen) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_SET), EO_TYPECHECK(Eina_Bool, fullscreen) + +/** + * @def elm_obj_win_fullscreen_get + * @since 1.8 + * + * Get the fullscreen state of a window. + * + * @param[out] ret + * + * @see elm_win_fullscreen_get + */ +#define elm_obj_win_fullscreen_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FULLSCREEN_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_main_menu_get + * @since 1.8 + * + * Get the Main Menu of a window. + * + * @param[out] ret Main menu. + * + * @see elm_win_main_menu_get + */ +#define elm_obj_win_main_menu_get(ret) \ + ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAIN_MENU_GET), \ + EO_TYPECHECK(Eo **, ret) + +/** + * @def elm_obj_win_maximized_set + * @since 1.8 + * + * Set the maximized state of a window. + * + * @param[in] maximized + * + * @see elm_win_maximized_set + */ +#define elm_obj_win_maximized_set(maximized) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_SET), EO_TYPECHECK(Eina_Bool, maximized) + +/** + * @def elm_obj_win_maximized_get + * @since 1.8 + * + * Get the maximized state of a window. + * + * @param[out] ret + * + * @see elm_win_maximized_get + */ +#define elm_obj_win_maximized_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MAXIMIZED_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_iconified_set + * @since 1.8 + * + * Set the iconified state of a window. + * + * @param[in] iconified + * + * @see elm_win_iconified_set + */ +#define elm_obj_win_iconified_set(iconified) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_SET), EO_TYPECHECK(Eina_Bool, iconified) + +/** + * @def elm_obj_win_iconified_get + * @since 1.8 + * + * Get the iconified state of a window. + * + * @param[out] ret + * + * @see elm_win_iconified_get + */ +#define elm_obj_win_iconified_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICONIFIED_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_withdrawn_set + * @since 1.8 + * + * Set the withdrawn state of a window. + * + * @param[in] withdrawn + * + * @see elm_win_withdrawn_set + */ +#define elm_obj_win_withdrawn_set(withdrawn) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_SET), EO_TYPECHECK(Eina_Bool, withdrawn) + +/** + * @def elm_obj_win_withdrawn_get + * @since 1.8 + * + * Get the withdrawn state of a window. + * + * @param[out] ret + * + * @see elm_win_withdrawn_get + */ +#define elm_obj_win_withdrawn_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WITHDRAWN_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_available_profiles_set + * @since 1.8 + * + * Set the array of available profiles to a window. + * + * @param[in] profiles + * @param[in] count + * + * @see elm_win_available_profiles_set + */ +#define elm_obj_win_available_profiles_set(profiles, count) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_SET), EO_TYPECHECK(const char **, profiles), EO_TYPECHECK(unsigned int, count) + +/** + * @def elm_obj_win_available_profiles_get + * @since 1.8 + * + * Get the array of available profiles of a window. + * + * @param[out] ret + * @param[out] profiles + * @param[out] count + * + * @see elm_win_available_profiles_get + */ +#define elm_obj_win_available_profiles_get(ret, profiles, count) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_AVAILABLE_PROFILES_GET), EO_TYPECHECK(Eina_Bool *, ret), EO_TYPECHECK(char ***, profiles), EO_TYPECHECK(unsigned int *, count) + +/** + * @def elm_obj_win_profile_set + * @since 1.8 + * + * Set the profile of a window. + * + * @param[in] profile + * + * @see elm_win_profile_set + */ +#define elm_obj_win_profile_set(profile) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_SET), EO_TYPECHECK(const char *, profile) + +/** + * @def elm_obj_win_profile_get + * @since 1.8 + * + * Get the profile of a window. + * + * @param[out] ret + * + * @see elm_win_profile_get + */ +#define elm_obj_win_profile_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROFILE_GET), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_win_urgent_set + * @since 1.8 + * + * Set the urgent state of a window. + * + * @param[in] urgent + * + * @see elm_win_urgent_set + */ +#define elm_obj_win_urgent_set(urgent) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_SET), EO_TYPECHECK(Eina_Bool, urgent) + +/** + * @def elm_obj_win_urgent_get + * @since 1.8 + * + * Get the urgent state of a window. + * + * @param[out] ret + * + * @see elm_win_urgent_get + */ +#define elm_obj_win_urgent_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_URGENT_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_demand_attention_set + * @since 1.8 + * + * Set the demand_attention state of a window. + * + * @param[in] demand_attention + * + * @see elm_win_demand_attention_set + */ +#define elm_obj_win_demand_attention_set(demand_attention) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_SET), EO_TYPECHECK(Eina_Bool, demand_attention) + +/** + * @def elm_obj_win_demand_attention_get + * @since 1.8 + * + * Get the demand_attention state of a window. + * + * @param[out] ret + * + * @see elm_win_demand_attention_get + */ +#define elm_obj_win_demand_attention_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_DEMAND_ATTENTION_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_modal_set + * @since 1.8 + * + * Set the modal state of a window. + * + * @param[in] modal + * + * @see elm_win_modal_set + */ +#define elm_obj_win_modal_set(modal) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_SET), EO_TYPECHECK(Eina_Bool, modal) + +/** + * @def elm_obj_win_modal_get + * @since 1.8 + * + * Get the modal state of a window. + * + * @param[out] ret + * + * @see elm_win_modal_get + */ +#define elm_obj_win_modal_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_MODAL_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_aspect_set + * @since 1.8 + * + * Set the aspect ratio of a window. + * + * @param[in] aspect + * + * @see elm_win_aspect_set + */ +#define elm_obj_win_aspect_set(aspect) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_SET), EO_TYPECHECK(double, aspect) + +/** + * @def elm_obj_win_aspect_get + * @since 1.8 + * + * Get the aspect ratio of a window. + * + * @param[out] ret + * + * @see elm_win_aspect_get + */ +#define elm_obj_win_aspect_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ASPECT_GET), EO_TYPECHECK(double *, ret) + +/** + * @def elm_obj_win_size_base_set + * @since 1.8 + * + * Set the base window size used with stepping calculation + * + * @param[in] w + * @param[in] h + * + * @see elm_win_size_base_set + */ +#define elm_obj_win_size_base_set(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) + +/** + * @def elm_obj_win_size_base_get + * @since 1.8 + * + * Get the base size of a window. + * + * @param[out] w + * @param[out] h + * + * @see elm_win_size_base_get + */ +#define elm_obj_win_size_base_get(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_BASE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) + +/** + * @def elm_obj_win_size_step_set + * @since 1.8 + * + * Set the window stepping used with sizing calculation + * + * @param[in] w + * @param[in] h + * + * @see elm_win_size_step_set + */ +#define elm_obj_win_size_step_set(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) + +/** + * @def elm_obj_win_size_step_get + * @since 1.8 + * + * Get the stepping of a window. + * + * @param[out] w + * @param[out] h + * + * @see elm_win_size_step_get + */ +#define elm_obj_win_size_step_get(w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SIZE_STEP_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) + +/** + * @def elm_obj_win_layer_set + * @since 1.8 + * + * Set the layer of the window. + * + * @param[in] layer + * + * @see elm_win_layer_set + */ +#define elm_obj_win_layer_set(layer) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_SET), EO_TYPECHECK(int, layer) + +/** + * @def elm_obj_win_layer_get + * @since 1.8 + * + * Get the layer of the window. + * + * @param[out] ret + * + * @see elm_win_layer_get + */ +#define elm_obj_win_layer_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_LAYER_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_win_rotation_set + * @since 1.8 + * + * Set the rotation of the window. + * + * @param[in] rotation + * + * @see elm_win_rotation_set + */ +#define elm_obj_win_rotation_set(rotation) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_SET), EO_TYPECHECK(int, rotation) + +/** + * @def elm_obj_win_rotation_with_resize_set + * @since 1.8 + * + * Rotates the window and resizes it. + * + * @param[in] rotation + * + * @see elm_win_rotation_with_resize_set + */ +#define elm_obj_win_rotation_with_resize_set(rotation) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_WITH_RESIZE_SET), EO_TYPECHECK(int, rotation) + +/** + * @def elm_obj_win_rotation_get + * @since 1.8 + * + * Get the rotation of the window. + * + * @param[out] ret + * + * @see elm_win_rotation_get + */ +#define elm_obj_win_rotation_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ROTATION_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_win_sticky_set + * @since 1.8 + * + * Set the sticky state of the window. + * + * @param[in] sticky + * + * @see elm_win_sticky_set + */ +#define elm_obj_win_sticky_set(sticky) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_SET), EO_TYPECHECK(Eina_Bool, sticky) + +/** + * @def elm_obj_win_sticky_get + * @since 1.8 + * + * Get the sticky state of the window. + * + * @param[out] ret + * + * @see elm_win_sticky_get + */ +#define elm_obj_win_sticky_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_STICKY_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_keyboard_mode_set + * @since 1.8 + * + * Sets the keyboard mode of the window. + * + * @param[in] mode + * + * @see elm_win_keyboard_mode_set + */ +#define elm_obj_win_keyboard_mode_set(mode) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_SET), EO_TYPECHECK(Elm_Win_Keyboard_Mode, mode) + +/** + * @def elm_obj_win_keyboard_mode_get + * @since 1.8 + * + * Gets the keyboard mode of the window. + * + * @param[out] ret + * + * @see elm_win_keyboard_mode_get + */ +#define elm_obj_win_keyboard_mode_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_MODE_GET), EO_TYPECHECK(Elm_Win_Keyboard_Mode *, ret) + +/** + * @def elm_obj_win_keyboard_win_set + * @since 1.8 + * + * Sets whether the window is a keyboard. + * + * @param[in] is_keyboard + * + * @see elm_win_keyboard_win_set + */ +#define elm_obj_win_keyboard_win_set(is_keyboard) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_SET), EO_TYPECHECK(Eina_Bool, is_keyboard) + +/** + * @def elm_obj_win_keyboard_win_get + * @since 1.8 + * + * Gets whether the window is a keyboard. + * + * @param[out] ret + * + * @see elm_win_keyboard_win_get + */ +#define elm_obj_win_keyboard_win_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_KEYBOARD_WIN_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_indicator_mode_set + * @since 1.8 + * + * Sets the indicator mode of the window. + * + * @param[in] mode + * + * @see elm_win_indicator_mode_set + */ +#define elm_obj_win_indicator_mode_set(mode) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_SET), EO_TYPECHECK(Elm_Win_Indicator_Mode, mode) + +/** + * @def elm_obj_win_indicator_mode_get + * @since 1.8 + * + * Gets the indicator mode of the window. + * + * @param[out] ret + * + * @see elm_win_indicator_mode_get + */ +#define elm_obj_win_indicator_mode_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_MODE_GET), EO_TYPECHECK(Elm_Win_Indicator_Mode *, ret) + +/** + * @def elm_obj_win_indicator_opacity_set + * @since 1.8 + * + * Sets the indicator opacity mode of the window. + * + * @param[in] mode + * + * @see elm_win_indicator_opacity_set + */ +#define elm_obj_win_indicator_opacity_set(mode) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_SET), EO_TYPECHECK(Elm_Win_Indicator_Opacity_Mode, mode) + +/** + * @def elm_obj_win_indicator_opacity_get + * @since 1.8 + * + * Gets the indicator opacity mode of the window. + * + * @param[out] ret + * + * @see elm_win_indicator_opacity_get + */ +#define elm_obj_win_indicator_opacity_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INDICATOR_OPACITY_GET), EO_TYPECHECK(Elm_Win_Indicator_Opacity_Mode *, ret) + +/** + * @def elm_obj_win_screen_position_get + * @since 1.8 + * + * Get the screen position of a window. + * + * @param[out] x + * @param[out] y + * + * @see elm_win_screen_position_get + */ +#define elm_obj_win_screen_position_get(x, y) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_POSITION_GET), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y) + +/** + * @def elm_obj_win_focus_get + * @since 1.8 + * + * Determine whether a window has focus + * + * @param[out] ret + * + * @see elm_win_focus_get + */ +#define elm_obj_win_focus_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_screen_constrain_set + * @since 1.8 + * + * Constrain the maximum width and height of a window to the width and height of its screen + * + * @param[in] constrain + * + * @see elm_win_screen_constrain_set + */ +#define elm_obj_win_screen_constrain_set(constrain) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_SET), EO_TYPECHECK(Eina_Bool, constrain) + +/** + * @def elm_obj_win_screen_constrain_get + * @since 1.8 + * + * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen + * + * @param[out] ret + * + * @see elm_win_screen_constrain_get + */ +#define elm_obj_win_screen_constrain_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_CONSTRAIN_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_screen_size_get + * @since 1.8 + * + * Get screen geometry details for the screen that a window is on + * + * @param[out] x + * @param[out] y + * @param[out] w + * @param[out] h + * + * @see elm_win_screen_size_get + */ +#define elm_obj_win_screen_size_get(x, y, w, h) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_SIZE_GET), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) + +/** + * @def elm_obj_win_screen_dpi_get + * @since 1.8 + * + * Get screen dpi for the screen that a window is on + * + * @param[out] xdpi + * @param[out] ydpi + * + * @see elm_win_screen_dpi_get + */ +#define elm_obj_win_screen_dpi_get(xdpi, ydpi) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SCREEN_DPI_GET), EO_TYPECHECK(int *, xdpi), EO_TYPECHECK(int *, ydpi) + +/** + * @def elm_obj_win_conformant_set + * @since 1.8 + * + * Set if this window is an illume conformant window + * + * @param[in] conformant + * + * @see elm_win_conformant_set + */ +#define elm_obj_win_conformant_set(conformant) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_SET), EO_TYPECHECK(Eina_Bool, conformant) + +/** + * @def elm_obj_win_conformant_get + * @since 1.8 + * + * Get if this window is an illume conformant window + * + * @param[out] ret + * + * @see elm_win_conformant_get + */ +#define elm_obj_win_conformant_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_CONFORMANT_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_quickpanel_set + * @since 1.8 + * + * Set a window to be an illume quickpanel window + * + * @param[in] quickpanel + * + * @see elm_win_quickpanel_set + */ +#define elm_obj_win_quickpanel_set(quickpanel) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_SET), EO_TYPECHECK(Eina_Bool, quickpanel) + +/** + * @def elm_obj_win_quickpanel_get + * @since 1.8 + * + * Get if this window is a quickpanel or not + * + * @param[out] ret + * + * @see elm_win_quickpanel_get + */ +#define elm_obj_win_quickpanel_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_quickpanel_priority_major_set + * @since 1.8 + * + * Set the major priority of a quickpanel window + * + * @param[in] priority + * + * @see elm_win_quickpanel_priority_major_set + */ +#define elm_obj_win_quickpanel_priority_major_set(priority) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_SET), EO_TYPECHECK(int, priority) + +/** + * @def elm_obj_win_quickpanel_priority_major_get + * @since 1.8 + * + * Get the major priority of a quickpanel window + * + * @param[out] ret + * + * @see elm_win_quickpanel_priority_major_get + */ +#define elm_obj_win_quickpanel_priority_major_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MAJOR_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_win_quickpanel_priority_minor_set + * @since 1.8 + * + * Set the minor priority of a quickpanel window + * + * @param[in] priority + * + * @see elm_win_quickpanel_priority_minor_set + */ +#define elm_obj_win_quickpanel_priority_minor_set(priority) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_SET), EO_TYPECHECK(int, priority) + +/** + * @def elm_obj_win_quickpanel_priority_minor_get + * @since 1.8 + * + * Get the minor priority of a quickpanel window + * + * @param[out] ret + * + * @see elm_win_quickpanel_priority_minor_get + */ +#define elm_obj_win_quickpanel_priority_minor_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_PRIORITY_MINOR_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_win_quickpanel_zone_set + * @since 1.8 + * + * Set which zone this quickpanel should appear in + * + * @param[in] zone + * + * @see elm_win_quickpanel_zone_set + */ +#define elm_obj_win_quickpanel_zone_set(zone) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_SET), EO_TYPECHECK(int, zone) + +/** + * @def elm_obj_win_quickpanel_zone_get + * @since 1.8 + * + * Get which zone this quickpanel should appear in + * + * @param[out] ret + * + * @see elm_win_quickpanel_zone_get + */ +#define elm_obj_win_quickpanel_zone_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_QUICKPANEL_ZONE_GET), EO_TYPECHECK(int *, ret) + +/** + * @def elm_obj_win_prop_focus_skip_set + * @since 1.8 + * + * Set the window to be skipped by keyboard focus + * + * @param[in] skip + * + * @see elm_win_prop_focus_skip_set + */ +#define elm_obj_win_prop_focus_skip_set(skip) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_PROP_FOCUS_SKIP_SET), EO_TYPECHECK(Eina_Bool, skip) + +/** + * @def elm_obj_win_illume_command_send + * @since 1.8 + * + * Send a command to the windowing environment + * + * @param[in] command + * @param[in] params + * + * @see elm_win_illume_command_send + */ +#define elm_obj_win_illume_command_send(command, params) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ILLUME_COMMAND_SEND), EO_TYPECHECK(Elm_Illume_Command, command), EO_TYPECHECK(void *, params) + +/** + * @def elm_obj_win_inlined_image_object_get + * @since 1.8 + * + * Get the inlined image object handle + * + * @param[out] ret + * + * @see elm_win_inlined_image_object_get + */ +#define elm_obj_win_inlined_image_object_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_INLINED_IMAGE_OBJECT_GET), EO_TYPECHECK(Evas_Object **, ret) + +/** + * @def elm_obj_win_focus_highlight_enabled_set + * @since 1.8 + * + * Set the enabled status for the focus highlight in a window + * + * @param[in] enabled + * + * @see elm_win_focus_highlight_enabled_set + */ +#define elm_obj_win_focus_highlight_enabled_set(enabled) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enabled) + +/** + * @def elm_obj_win_focus_highlight_enabled_get + * @since 1.8 + * + * Get the enabled value of the focus highlight for this window + * + * @param[out] ret + * + * @see elm_win_focus_highlight_enabled_get + */ +#define elm_obj_win_focus_highlight_enabled_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_focus_highlight_style_set + * @since 1.8 + * + * Set the style for the focus highlight on this window + * + * @param[in] style + * + * @see elm_win_focus_highlight_style_set + */ +#define elm_obj_win_focus_highlight_style_set(style) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_SET), EO_TYPECHECK(const char *, style) + +/** + * @def elm_obj_win_focus_highlight_style_get + * @since 1.8 + * + * Get the style set for the focus highlight object + * + * @param[out] ret + * + * @see elm_win_focus_highlight_style_get + */ +#define elm_obj_win_focus_highlight_style_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_FOCUS_HIGHLIGHT_STYLE_GET), EO_TYPECHECK(const char **, ret) + +/** + * @def elm_obj_win_socket_listen + * @since 1.8 + * + * Create a socket to provide the service for Plug widget + * + * @param[in] svcname + * @param[in] svcnum + * @param[in] svcsys + * @param[out] ret + * + * @see elm_win_socket_listen + */ +#define elm_obj_win_socket_listen(svcname, svcnum, svcsys, ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_SOCKET_LISTEN), EO_TYPECHECK(const char *, svcname), EO_TYPECHECK(int, svcnum), EO_TYPECHECK(Eina_Bool, svcsys), EO_TYPECHECK(Eina_Bool *, ret) + +/** + * @def elm_obj_win_xwindow_get + * @since 1.8 + * + * Get the Ecore_X_Window of an Evas_Object + * + * @param[out] ret + * + * @see elm_win_xwindow_get + */ +#define elm_obj_win_xwindow_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_XWINDOW_GET), EO_TYPECHECK(Ecore_X_Window *, ret) + +/** + * @def elm_obj_win_wl_window_get + * @since 1.8 + * + * Get the Ecore_Wl_Window of and Evas_Object + * + * @param[out] ret + * + * @see elm_win_wl_window_get + */ +#define elm_obj_win_wl_window_get(ret) ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WL_WINDOW_GET), EO_TYPECHECK(Ecore_Wl_Window **, ret) + +/** + * @} + */ + diff --git a/legacy/elementary/src/lib/elm_win_legacy.h b/legacy/elementary/src/lib/elm_win_legacy.h new file mode 100644 index 0000000000..463c98230f --- /dev/null +++ b/legacy/elementary/src/lib/elm_win_legacy.h @@ -0,0 +1,1272 @@ +/** + * Adds a window object. If this is the first window created, pass NULL as + * @p parent. + * + * @param parent Parent object to add the window to, or NULL + * @param name The name of the window + * @param type The window type, one of #Elm_Win_Type. + * + * The @p parent parameter can be @c NULL for every window @p type + * except #ELM_WIN_INLINED_IMAGE, which needs a parent to retrieve the + * canvas on which the image object will be created. + * + * @return The created object, or @c NULL on failure + * + * @ingroup Win + */ +EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type); + +/** + * Adds a window object with standard setup + * + * @param name The name of the window + * @param title The title for the window + * + * This creates a window like elm_win_add() but also puts in a standard + * background with elm_bg_add(), as well as setting the window title to + * @p title. The window type created is of type ELM_WIN_BASIC, with @c NULL + * as the parent widget. + * + * @return The created object, or @c NULL on failure + * + * @see elm_win_add() + * + * @ingroup Win + */ +EAPI Evas_Object *elm_win_util_standard_add(const char *name, const char *title); + +/** + * Add @p subobj as a resize object of window @p obj. + * + * + * Setting an object as a resize object of the window means that the + * @p subobj child's size and position will be controlled by the window + * directly. That is, the object will be resized to match the window size + * and should never be moved or resized manually by the developer. + * + * In addition, resize objects of the window control what the minimum size + * of it will be, as well as whether it can or not be resized by the user. + * + * For the end user to be able to resize a window by dragging the handles + * or borders provided by the Window Manager, or using any other similar + * mechanism, all of the resize objects in the window should have their + * evas_object_size_hint_weight_set() set to EVAS_HINT_EXPAND. + * + * Also notice that the window can get resized to the current size of the + * object if the EVAS_HINT_EXPAND is set @b after the call to + * elm_win_resize_object_add(). So if the object should get resized to the + * size of the window, set this hint @b before adding it as a resize object + * (this happens because the size of the window and the object are evaluated + * as soon as the object is added to the window). + * + * @param obj The window object + * @param subobj The resize object to add + * + * @ingroup Win + */ +EAPI void elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj); + +/** + * Delete @p subobj as a resize object of window @p obj. + * + * This function removes the object @p subobj from the resize objects of + * the window @p obj. It will not delete the object itself, which will be + * left unmanaged and should be deleted by the developer, manually handled + * or set as child of some other container. + * + * @param obj The window object + * @param subobj The resize object to add + * + * @ingroup Win + */ +EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj); + +/** + * Set the title of the window + * + * @param obj The window object + * @param title The title to set + * + * @ingroup Win + */ +EAPI void elm_win_title_set(Evas_Object *obj, const char *title); + +/** + * Get the title of the window + * + * The returned string is an internal one and should not be freed or + * modified. It will also be invalid if a new title is set or if + * the window is destroyed. + * + * @param obj The window object + * @return The title + * + * @ingroup Win + */ +EAPI const char *elm_win_title_get(const Evas_Object *obj); + +/** + * Set the icon name of the window + * + * @param obj The window object + * @param icon_name The icon name to set + * + * @ingroup Win + */ +EAPI void elm_win_icon_name_set(Evas_Object *obj, const char *icon_name); + +/** + * Get the icon name of the window + * + * The returned string is an internal one and should not be freed or + * modified. It will also be invalid if a new icon name is set or if + * the window is destroyed. + * + * @param obj The window object + * @return The icon name + * + * @ingroup Win + */ +EAPI const char *elm_win_icon_name_get(const Evas_Object *obj); + +/** + * Set the role of the window + * + * @param obj The window object + * @param role The role to set + * + * @ingroup Win + */ +EAPI void elm_win_role_set(Evas_Object *obj, const char *role); + +/** + * Get the role of the window + * + * The returned string is an internal one and should not be freed or + * modified. It will also be invalid if a new role is set or if + * the window is destroyed. + * + * @param obj The window object + * @return The role + * + * @ingroup Win + */ +EAPI const char *elm_win_role_get(const Evas_Object *obj); + +/** + * Set a window object's icon + * + * This sets an image to be used as the icon for the given window, in + * the window manager decoration part. The exact pixel dimensions of + * the object (not object size) will be used, and the image pixels + * will be used as-is when this function is called. If the image + * object has been updated, then call this function again to source + * the image pixels and put them on the window's icon. Note that + * only Evas image objects are allowed, for + * + * @param obj The window object to get an icon + * @param icon The Evas image object to use for an icon + * + * Example of usage: + * @code + * icon = evas_object_image_add(evas_object_evas_get(elm_window)); + * evas_object_image_file_set(icon, "/path/to/the/icon", NULL); + * elm_win_icon_object_set(elm_window, icon); + * evas_object_show(icon); + * @endcode + * + * @ingroup Win + */ +EAPI void elm_win_icon_object_set(Evas_Object *obj, Evas_Object *icon); + +/** + * Get the icon object used for the window + * + * The object returns is the one marked by elm_win_icon_object_set() as the + * object to use for the window icon. + * + * @param obj The window object + * @return The icon object set + * + * @ingroup Win + */ +EAPI const Evas_Object *elm_win_icon_object_get(const Evas_Object *obj); + +/** + * Set the window's autodel state. + * + * When closing the window in any way outside of the program control, like + * pressing the X button in the titlebar or using a command from the + * Window Manager, a "delete,request" signal is emitted to indicate that + * this event occurred and the developer can take any action, which may + * include, or not, destroying the window object. + * + * When the @p autodel parameter is set, the window will be automatically + * destroyed when this event occurs, after the signal is emitted. + * If @p autodel is @c EINA_FALSE, then the window will not be destroyed + * and is up to the program to do so when it's required. + * + * @param obj The window object + * @param autodel If true, the window will automatically delete itself when + * closed + * + * @ingroup Win + */ +EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel); + +/** + * Get the window's autodel state. + * + * @param obj The window object + * @return If the window will automatically delete itself when closed + * + * @see elm_win_autodel_set() + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj); + +/** + * Activate a window object. + * + * This function sends a request to the Window Manager to activate the + * window pointed by @p obj. If honored by the WM, the window will receive + * the keyboard focus. + * + * @note This is just a request that a Window Manager may ignore, so calling + * this function does not ensure in any way that the window will be the + * active one after it. + * + * @param obj The window object + * + * @ingroup Win + */ +EAPI void elm_win_activate(Evas_Object *obj); + +/** + * Lower a window object. + * + * Places the window pointed by @p obj at the bottom of the stack, so that + * no other window is covered by it. + * + * If elm_win_override_set() is not set, the Window Manager may ignore this + * request. + * + * @param obj The window object + * + * @ingroup Win + */ +EAPI void elm_win_lower(Evas_Object *obj); + +/** + * Raise a window object. + * + * Places the window pointed by @p obj at the top of the stack, so that it's + * not covered by any other window. + * + * If elm_win_override_set() is not set, the Window Manager may ignore this + * request. + * + * @param obj The window object + * + * @ingroup Win + */ +EAPI void elm_win_raise(Evas_Object *obj); + +/** + * Center a window on its screen + * + * This function centers window @p obj horizontally and/or vertically based on the values + * of @p h and @p v. + * @param obj The window object + * @param h If true, center horizontally. If false, do not change horizontal location. + * @param v If true, center vertically. If false, do not change vertical location. + * + * @ingroup Win + */ +EAPI void elm_win_center(Evas_Object *obj, Eina_Bool h, Eina_Bool v); + +/** + * Set the borderless state of a window. + * + * This function requests the Window Manager to not draw any decoration + * around the window. + * + * @param obj The window object + * @param borderless If true, the window is borderless + * + * @ingroup Win + */ +EAPI void elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless); + +/** + * Get the borderless state of a window. + * + * @param obj The window object + * @return If true, the window is borderless + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_borderless_get(const Evas_Object *obj); + +/** + * Set the shaped state of a window. + * + * Shaped windows, when supported, will render the parts of the window that + * has no content, transparent. + * + * If @p shaped is EINA_FALSE, then it is strongly advised to have some + * background object or cover the entire window in any other way, or the + * parts of the canvas that have no data will show framebuffer artifacts. + * + * @param obj The window object + * @param shaped If true, the window is shaped + * + * @see elm_win_alpha_set() + * + * @ingroup Win + */ +EAPI void elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped); + +/** + * Get the shaped state of a window. + * + * @param obj The window object + * @return If true, the window is shaped + * + * @see elm_win_shaped_set() + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_shaped_get(const Evas_Object *obj); + +/** + * Set the alpha channel state of a window. + * + * If @p alpha is EINA_TRUE, the alpha channel of the canvas will be enabled + * possibly making parts of the window completely or partially transparent. + * This is also subject to the underlying system supporting it, like for + * example, running under a compositing manager. If no compositing is + * available, enabling this option will instead fallback to using shaped + * windows, with elm_win_shaped_set(). + * + * @param obj The window object + * @param enabled EINA_TRUE if the window alpha channel is enabled, EINA_FALSE otherwise + * + * @see elm_win_alpha_set() + * + * @ingroup Win + */ +EAPI void elm_win_alpha_set(Evas_Object *obj, Eina_Bool enabled); + +/** + * Get the alpha channel state of a window. + * + * @param obj The window object + * @return EINA_TRUE if the window alpha channel is enabled, EINA_FALSE + * otherwise + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_alpha_get(const Evas_Object *obj); + +/** + * Set the override state of a window. + * + * A window with @p override set to EINA_TRUE will not be managed by the + * Window Manager. This means that no decorations of any kind will be shown + * for it, moving and resizing must be handled by the application, as well + * as the window visibility. + * + * This should not be used for normal windows, and even for not so normal + * ones, it should only be used when there's a good reason and with a lot + * of care. Mishandling override windows may result situations that + * disrupt the normal workflow of the end user. + * + * @param obj The window object + * @param override If true, the window is overridden + * + * @ingroup Win + */ +EAPI void elm_win_override_set(Evas_Object *obj, Eina_Bool override); + +/** + * Get the override state of a window. + * + * @param obj The window object + * @return If true, the window is overridden + * + * @see elm_win_override_set() + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj); + +/** + * Set the fullscreen state of a window. + * + * @param obj The window object + * @param fullscreen If true, the window is fullscreen + * + * @ingroup Win + */ +EAPI void elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen); + +/** + * Get the fullscreen state of a window. + * + * @param obj The window object + * @return If true, the window is fullscreen + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_fullscreen_get(const Evas_Object *obj); + +/** + * Get the Main Menu of a window. + * + * @param obj The window object + * @return The Main Menu of the window (NULL if error). + * + * @ingroup Win + */ +EAPI Evas_Object *elm_win_main_menu_get(const Evas_Object *obj); + +/** + * Set the maximized state of a window. + * + * @param obj The window object + * @param maximized If true, the window is maximized + * + * @ingroup Win + */ +EAPI void elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized); + +/** + * Get the maximized state of a window. + * + * @param obj The window object + * @return If true, the window is maximized + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_maximized_get(const Evas_Object *obj); + +/** + * Set the iconified state of a window. + * + * @param obj The window object + * @param iconified If true, the window is iconified + * + * @ingroup Win + */ +EAPI void elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified); + +/** + * Get the iconified state of a window. + * + * @param obj The window object + * @return If true, the window is iconified + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_iconified_get(const Evas_Object *obj); + +/** + * Set the withdrawn state of a window. + * + * @param obj The window object + * @param withdrawn If true, the window is withdrawn + * + * @ingroup Win + */ +EAPI void elm_win_withdrawn_set(Evas_Object *obj, Eina_Bool withdrawn); + +/** + * Get the withdrawn state of a window. + * + * @param obj The window object + * @return If true, the window is withdrawn + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_withdrawn_get(const Evas_Object *obj); + +/** + * Set the array of available profiles to a window. + * + * @param obj The window object + * @param profiles The string array of available profiles + * @param count The number of members in profiles + * + * @ingroup Win + * @since 1.8 + */ +EAPI void elm_win_available_profiles_set(Evas_Object *obj, const char **profiles, unsigned int count); + +/** + * Get the array of available profiles of a window. + * + * @param obj The window object + * @param profiles Where to return the string array of available profiles + * @param count Where to return the number of members in profiles + * @return EINA_TRUE if available profiles exist, EINA_FALSE otherwise + * + * @ingroup Win + * @since 1.8 + */ +EAPI Eina_Bool elm_win_available_profiles_get(Evas_Object *obj, char ***profiles, unsigned int *count); + +/** + * Set the profile of a window. + * + * @param obj The window object + * @param profile The string value of a window profile + * + * @ingroup Win + * @since 1.8 + */ +EAPI void elm_win_profile_set(Evas_Object *obj, const char *profile); + +/** + * Get the profile of a window. + * + * @param obj The window object + * @return The string value of a window profile, or NULL if none exists + * + * @ingroup Win + * @since 1.8 + */ +EAPI const char *elm_win_profile_get(const Evas_Object *obj); + +/** + * Set the urgent state of a window. + * + * @param obj The window object + * @param urgent If true, the window is urgent + * + * @ingroup Win + */ +EAPI void elm_win_urgent_set(Evas_Object *obj, Eina_Bool urgent); + +/** + * Get the urgent state of a window. + * + * @param obj The window object + * @return If true, the window is urgent + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_urgent_get(const Evas_Object *obj); + +/** + * Set the demand_attention state of a window. + * + * @param obj The window object + * @param demand_attention If true, the window is demand_attention + * + * @ingroup Win + */ +EAPI void elm_win_demand_attention_set(Evas_Object *obj, Eina_Bool demand_attention); + +/** + * Get the demand_attention state of a window. + * + * @param obj The window object + * @return If true, the window is demand_attention + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_demand_attention_get(const Evas_Object *obj); + +/** + * Set the modal state of a window. + * + * @param obj The window object + * @param modal If true, the window is modal + * + * @ingroup Win + */ +EAPI void elm_win_modal_set(Evas_Object *obj, Eina_Bool modal); + +/** + * Get the modal state of a window. + * + * @param obj The window object + * @return If true, the window is modal + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_modal_get(const Evas_Object *obj); + +/** + * Set the aspect ratio of a window. + * + * @param obj The window object + * @param aspect If 0, the window has no aspect limits, otherwise it is + * width divided by height + * + * @ingroup Win + */ +EAPI void elm_win_aspect_set(Evas_Object *obj, double aspect); + +/** + * Get the aspect ratio of a window. + * + * @param obj The window object + * @return The aspect ratio set (0 by default) + * + * @ingroup Win + */ +EAPI double elm_win_aspect_get(const Evas_Object *obj); + +/** + * Set the base window size used with stepping calculation + * + * Base size + stepping is what is calculated for window sizing restrictions. + * + * @param obj The window object + * @param w The base width + * @param h The base height + * + * @ingroup Win + * @see elm_win_size_step_set + * @see elm_win_size_base_get + * @since 1.7 + */ +EAPI void elm_win_size_base_set(Evas_Object *obj, int w, int h); + +/** + * Get the base size of a window. + * + * @param obj The window object + * @param w Pointer in which to store returned base width + * @param h Pointer in which to store returned base height + * + * @ingroup Win + * @see elm_win_size_base_set + * @see elm_win_size_step_set + * @since 1.7 + */ +EAPI void elm_win_size_base_get(Evas_Object *obj, int *w, int *h); + +/** + * Set the window stepping used with sizing calculation + * + * Base size + stepping is what is calculated for window sizing restrictions. + * + * @param obj The window object + * @param w The stepping width (0 disables) + * @param h The stepping height (0 disables) + * + * @ingroup Win + * @see elm_win_size_step_get + * @see elm_win_size_base_set + * @since 1.7 + */ +EAPI void elm_win_size_step_set(Evas_Object *obj, int w, int h); + +/** + * Get the stepping of a window. + * + * @param obj The window object + * @param w Pointer in which to store returned stepping width + * @param h Pointer in which to store returned stepping height + * + * @ingroup Win + * @see elm_win_size_base_set + * @see elm_win_size_step_set + * @since 1.7 + */ +EAPI void elm_win_size_step_get(Evas_Object *obj, int *w, int *h); + +/** + * Set the layer of the window. + * + * What this means exactly will depend on the underlying engine used. + * + * In the case of X11 backed engines, the value in @p layer has the + * following meanings: + * @li < 3: The window will be placed below all others. + * @li > 5: The window will be placed above all others. + * @li other: The window will be placed in the default layer. + * + * @param obj The window object + * @param layer The layer of the window + * + * @ingroup Win + */ +EAPI void elm_win_layer_set(Evas_Object *obj, int layer); + +/** + * Get the layer of the window. + * + * @param obj The window object + * @return The layer of the window + * + * @see elm_win_layer_set() + * + * @ingroup Win + */ +EAPI int elm_win_layer_get(const Evas_Object *obj); + +/** + * This pushes (incriments) the norender counter on the window + * + * @param obj The window object + * + * There are some occasions where you wish to suspend rendering on a window. + * You may be "sleeping" and have nothing to update and do not want animations + * or other theme side-effects causing rendering to the window while "asleep". + * You can push (and pop) the norender mode to have this work. + * + * If combined with evas_render_dump(), evas_image_cache_flush() and + * evas_font_cache_flush() (and maybe edje_file_cache_flush() and + * edje_collection_cache_flush()), you can minimize memory footprint + * significantly while "asleep", and the pausing of rendering ensures + * evas does not re-load data into memory until needed. When rendering is + * resumed, data will be re-loaded as needed, which may result in some + * lag, but does save memory. + * + * @see elm_win_norender_pop() + * @see elm_win_norender_get() + * @see elm_win_render() + * @ingroup Win + * @since 1.7 + */ +EAPI void elm_win_norender_push(Evas_Object *obj); + +/** + * This pops (decrements) the norender counter on the window + * + * @param obj The window object + * + * Once norender has gone back to 0, then automatic rendering will continue + * in the given window. If it is already at 0, this will have no effect. + * + * @see elm_win_norender_push() + * @see elm_win_norender_get() + * @see elm_win_render() + * @ingroup Win + * @since 1.7 + */ +EAPI void elm_win_norender_pop(Evas_Object *obj); + +/** + * The retruns how many times norender has been pushed on the window + * @param obj The window object + * @return The number of times norender has been pushed + * + * @see elm_win_norender_push() + * @see elm_win_norender_pop() + * @see elm_win_render() + * @ingroup Win + * @since 1.7 + */ +EAPI int elm_win_norender_get(Evas_Object *obj); + +/** + * This manually asks evas to render the window now + * + * @param obj The window object + * + * You should NEVER call this unless you really know what you are doing and + * why. Never call this unless you are asking for performance degredation + * and possibly weird behavior. Windows get automatically rendered when the + * application goes idle so there is never a need to call this UNLESS you + * have enabled "norender" mode. + * + * @see elm_win_norender_push() + * @see elm_win_norender_pop() + * @see elm_win_norender_get() + * @ingroup Win + * @since 1.7 + */ +EAPI void elm_win_render(Evas_Object *obj); + +/** + * Set the rotation of the window. + * + * Most engines only work with multiples of 90. + * + * This function is used to set the orientation of the window @p obj to + * match that of the screen. The window itself will be resized to adjust + * to the new geometry of its contents. If you want to keep the window size, + * see elm_win_rotation_with_resize_set(). + * + * @param obj The window object + * @param rotation The rotation of the window, in degrees (0-360), + * counter-clockwise. + * + * @ingroup Win + */ +EAPI void elm_win_rotation_set(Evas_Object *obj, int rotation); + +/** + * Rotates the window and resizes it. + * + * Like elm_win_rotation_set(), but it also resizes the window's contents so + * that they fit inside the current window geometry. + * + * @param obj The window object + * @param rotation The rotation of the window in degrees (0-360), + * counter-clockwise. + * + * @ingroup Win + */ +EAPI void elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation); + +/** + * Get the rotation of the window. + * + * @param obj The window object + * @return The rotation of the window in degrees (0-360) + * + * @see elm_win_rotation_set() + * @see elm_win_rotation_with_resize_set() + * + * @ingroup Win + */ +EAPI int elm_win_rotation_get(const Evas_Object *obj); + +/** + * Set the sticky state of the window. + * + * Hints the Window Manager that the window in @p obj should be left fixed + * at its position even when the virtual desktop it's on moves or changes. + * + * @param obj The window object + * @param sticky If true, the window's sticky state is enabled + * + * @ingroup Win + */ +EAPI void elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky); + +/** + * Get the sticky state of the window. + * + * @param obj The window object + * @return If true, the window's sticky state is enabled + * + * @see elm_win_sticky_set() + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_sticky_get(const Evas_Object *obj); + +/** + * Set if this window is an illume conformant window + * + * @param obj The window object + * @param conformant The conformant flag (1 = conformant, 0 = non-conformant) + * + * @ingroup Win + */ +EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant); + +/** + * Get if this window is an illume conformant window + * + * @param obj The window object + * @return A boolean if this window is illume conformant or not + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_conformant_get(const Evas_Object *obj); + +/** + * Set a window to be an illume quickpanel window + * + * By default window objects are not quickpanel windows. + * + * @param obj The window object + * @param quickpanel The quickpanel flag (1 = quickpanel, 0 = normal window) + * + * @ingroup Win + */ +EAPI void elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel); + +/** + * Get if this window is a quickpanel or not + * + * @param obj The window object + * @return A boolean if this window is a quickpanel or not + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_quickpanel_get(const Evas_Object *obj); + +/** + * Set the major priority of a quickpanel window + * + * @param obj The window object + * @param priority The major priority for this quickpanel + * + * @ingroup Win + */ +EAPI void elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority); + +/** + * Get the major priority of a quickpanel window + * + * @param obj The window object + * @return The major priority of this quickpanel + * + * @ingroup Win + */ +EAPI int elm_win_quickpanel_priority_major_get(const Evas_Object *obj); + +/** + * Set the minor priority of a quickpanel window + * + * @param obj The window object + * @param priority The minor priority for this quickpanel + * + * @ingroup Win + */ +EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority); + +/** + * Get the minor priority of a quickpanel window + * + * @param obj The window object + * @return The minor priority of this quickpanel + * + * @ingroup Win + */ +EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj); + +/** + * Set which zone this quickpanel should appear in + * + * @param obj The window object + * @param zone The requested zone for this quickpanel + * + * @ingroup Win + */ +EAPI void elm_win_quickpanel_zone_set(Evas_Object *obj, int zone); + +/** + * Get which zone this quickpanel should appear in + * + * @param obj The window object + * @return The requested zone for this quickpanel + * + * @ingroup Win + */ +EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj); + +/** + * Set the window to be skipped by keyboard focus + * + * This sets the window to be skipped by normal keyboard input. This means + * a window manager will be asked to not focus this window as well as omit + * it from things like the taskbar, pager, "alt-tab" list etc. etc. + * + * Call this and enable it on a window BEFORE you show it for the first time, + * otherwise it may have no effect. + * + * Use this for windows that have only output information or might only be + * interacted with by the mouse or fingers, and never for typing input. + * Be careful that this may have side-effects like making the window + * non-accessible in some cases unless the window is specially handled. Use + * this with care. + * + * @param obj The window object + * @param skip The skip flag state (EINA_TRUE if it is to be skipped) + * + * @ingroup Win + */ +EAPI void elm_win_prop_focus_skip_set(Evas_Object *obj, Eina_Bool skip); + +/** + * Send a command to the windowing environment + * + * This is intended to work in touchscreen or small screen device + * environments where there is a more simplistic window management policy in + * place. This uses the window object indicated to select which part of the + * environment to control (the part that this window lives in), and provides + * a command and an optional parameter structure (use NULL for this if not + * needed). + * + * @param obj The window object that lives in the environment to control + * @param command The command to send + * @param params Optional parameters for the command + * + * @ingroup Win + */ +EAPI void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params); + +/** + * Get the inlined image object handle + * + * When you create a window with elm_win_add() of type ELM_WIN_INLINED_IMAGE, + * then the window is in fact an evas image object inlined in the parent + * canvas. You can get this object (be careful to not manipulate it as it + * is under control of elementary), and use it to do things like get pixel + * data, save the image to a file, etc. + * + * @param obj The window object to get the inlined image from + * @return The inlined image object, or NULL if none exists + * + * @ingroup Win + */ +EAPI Evas_Object *elm_win_inlined_image_object_get(Evas_Object *obj); + +/** + * Determine whether a window has focus + * @param obj The window to query + * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_focus_get(const Evas_Object *obj); + +/** + * Constrain the maximum width and height of a window to the width and height of its screen + * + * When @p constrain is true, @p obj will never resize larger than the screen. + * @param obj The window object + * @param constrain EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction + * + * @ingroup Win + */ +EAPI void elm_win_screen_constrain_set(Evas_Object *obj, Eina_Bool constrain); + +/** + * Retrieve the constraints on the maximum width and height of a window relative to the width and height of its screen + * + * When this function returns true, @p obj will never resize larger than the screen. + * @param obj The window object + * @return EINA_TRUE to restrict the window's maximum size, EINA_FALSE to disable restriction + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_screen_constrain_get(Evas_Object *obj); + +/** + * Get screen geometry details for the screen that a window is on + * @param obj The window to query + * @param x where to return the horizontal offset value. May be NULL. + * @param y where to return the vertical offset value. May be NULL. + * @param w where to return the width value. May be NULL. + * @param h where to return the height value. May be NULL. + * + * @ingroup Win + */ +EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); + +/** + * Get screen dpi for the screen that a window is on + * @param obj The window to query + * @param xdpi Pointer to value to store return horizontal dpi. May be NULL. + * @param ydpi Pointer to value to store return vertical dpi. May be NULL. + * + * @ingroup Win + * @since 1.7 + */ +EAPI void elm_win_screen_dpi_get(const Evas_Object *obj, int *xdpi, int *ydpi); + +/** + * Set the enabled status for the focus highlight in a window + * + * This function will enable or disable the focus highlight only for the + * given window, regardless of the global setting for it + * + * @param obj The window where to enable the highlight + * @param enabled The enabled value for the highlight + * + * @ingroup Win + */ +EAPI void elm_win_focus_highlight_enabled_set(Evas_Object *obj, Eina_Bool enabled); + +/** + * Get the enabled value of the focus highlight for this window + * + * @param obj The window in which to check if the focus highlight is enabled + * + * @return EINA_TRUE if enabled, EINA_FALSE otherwise + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Evas_Object *obj); + +/** + * Set the style for the focus highlight on this window + * + * Sets the style to use for theming the highlight of focused objects on + * the given window. If @p style is NULL, the default will be used. + * + * @param obj The window where to set the style + * @param style The style to set + * + * @ingroup Win + */ +EAPI void elm_win_focus_highlight_style_set(Evas_Object *obj, const char *style); + +/** + * Get the style set for the focus highlight object + * + * Gets the style set for this windows highlight object, or NULL if none + * is set. + * + * @param obj The window to retrieve the highlights style from + * + * @return The style set or NULL if none was. Default is used in that case. + * + * @ingroup Win + */ +EAPI const char *elm_win_focus_highlight_style_get(const Evas_Object *obj); + +/** + * Sets the keyboard mode of the window. + * + * @param obj The window object + * @param mode The mode to set, one of #Elm_Win_Keyboard_Mode + * + * @ingroup Win + */ +EAPI void elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode); + +/** + * Gets the keyboard mode of the window. + * + * @param obj The window object + * @return The mode, one of #Elm_Win_Keyboard_Mode + * + * @ingroup Win + */ +EAPI Elm_Win_Keyboard_Mode elm_win_keyboard_mode_get(const Evas_Object *obj); + +/** + * Sets whether the window is a keyboard. + * + * @param obj The window object + * @param is_keyboard If true, the window is a virtual keyboard + * + * @ingroup Win + */ +EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard); + +/** + * Gets whether the window is a keyboard. + * + * @param obj The window object + * @return If the window is a virtual keyboard + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj); + +/** + * Sets the indicator mode of the window. + * + * @param obj The window object + * @param mode The mode to set, one of #Elm_Win_Indicator_Mode + * + * @ingroup Win + */ +EAPI void elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode); + +/** + * Gets the indicator mode of the window. + * + * @param obj The window object + * @return The mode, one of #Elm_Win_Indicator_Mode + * + * @ingroup Win + */ +EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj); + +/** + * Sets the indicator opacity mode of the window. + * + * @param obj The window object + * @param mode The mode to set, one of #Elm_Win_Indicator_Opacity_Mode + * + * @ingroup Win + */ +EAPI void elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode); + +/** + * Gets the indicator opacity mode of the window. + * + * @param obj The window object + * @return The mode, one of #Elm_Win_Indicator_Opacity_Mode + * + * @ingroup Win + */ +EAPI Elm_Win_Indicator_Opacity_Mode elm_win_indicator_opacity_get(const Evas_Object *obj); + +/** + * Get the screen position of a window. + * + * @param obj The window object + * @param x The int to store the x coordinate to + * @param y The int to store the y coordinate to + * + * @ingroup Win + */ +EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y); + +/** + * Create a socket to provide the service for Plug widget + * + * @param obj The window object + * @param svcname The name of the service to be advertised. ensure that it is unique (when combined with @p svcnum) otherwise creation may fail. + * @param svcnum A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name. + * @param svcsys A boolean that if true, specifies to create a system-wide service all users can connect to, otherwise the service is private to the user id that created the service. + * @return If socket creation is successful + * + * @ingroup Win + */ +EAPI Eina_Bool elm_win_socket_listen(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys); + +/* X specific calls - won't work on non-x engines (return 0) */ +/** + * Get the Ecore_X_Window of an Evas_Object + * + * @param obj The object + * + * @return The Ecore_X_Window of @p obj + * + * @ingroup Win + */ +EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj); + +/* Wayland specific call - returns NULL on non-Wayland engines */ +/** + * Get the Ecore_Wl_Window of and Evas_Object + * + * @param obj the object + * + * @return The Ecore_Wl_Window of @p obj + * + * @ingroup Win + */ +EAPI Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj); + +/** + * Set the floating mode of a window. + * + * @param obj The window object + * @param floating If true, the window is floating mode + * + * @ingroup Win + * @see elm_win_floating_mode_get() + * @since 1.8 + */ +EAPI void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating); + +/** + * Get the floating mode of a window. + * + * @param obj The window object + * @return If true, the window is floating mode + * + * @ingroup Win + * @see elm_win_floating_mode_set() + * @since 1.8 + */ +EAPI Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj); +