2 * Copyright (C) 2012 Samsung Electronics
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
22 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 * @file ewk_popup_menu_item.h
28 * @brief Describes the Ewk Popup Menu Item API.
31 #ifndef ewk_popup_menu_item_h
32 #define ewk_popup_menu_item_h
41 /** Enum values containing type of popup menu item. */
43 EWK_POPUP_MENU_SEPARATOR,
45 EWK_POPUP_MENU_UNKNOWN = -1
46 } Ewk_Popup_Menu_Item_Type;
48 /** Creates a type name for Ewk_Popup_Menu_Item */
49 typedef struct Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
52 * Returns type of the popup menu item.
54 * @param item the popup menu item instance
56 * @return the type of the @a item or @c EWK_POPUP_MENU_UNKNOWN in case of error.
58 EAPI Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_Item *item);
61 * Returns text of the popup menu item.
63 * @param item the popup menu item instance
65 * @return the text of the @a item or @c NULL in case of error. This pointer is
66 * guaranteed to be eina_stringshare, so whenever possible
67 * save yourself some cpu cycles and use
68 * eina_stringshare_ref() instead of eina_stringshare_add() or
71 EAPI const char *ewk_popup_menu_item_text_get(const Ewk_Popup_Menu_Item *item);
74 * Returns text direction of the popup menu item.
76 * @param item the popup menu item instance
78 * @return the text direction of the @a item.
80 EAPI Ewk_Text_Direction ewk_popup_menu_item_text_direction_get(const Ewk_Popup_Menu_Item *item);
83 * Returns whether the popup menu item has text direction override.
85 * @param item the popup menu item instance
87 * @return @c EINA_TRUE if the popup menu item has text direction override,
88 * @c EINA_FALSE otherwise.
90 EAPI Eina_Bool ewk_popup_menu_item_text_direction_override_get(const Ewk_Popup_Menu_Item *item);
93 * Returns tooltip of the popup menu item.
95 * @param item the popup menu item instance
97 * @return the tooltip of the @a item or @c NULL in case of error. This pointer is
98 * guaranteed to be eina_stringshare, so whenever possible
99 * save yourself some cpu cycles and use
100 * eina_stringshare_ref() instead of eina_stringshare_add() or
103 EAPI const char *ewk_popup_menu_item_tooltip_get(const Ewk_Popup_Menu_Item *item);
106 * Returns accessibility text of the popup menu item.
108 * @param item the popup menu item instance
110 * @return the accessibility text of the @a item or @c NULL in case of error.
111 * This pointer is guaranteed to be eina_stringshare, so whenever
112 * possible save yourself some cpu cycles and use
113 * eina_stringshare_ref() instead of eina_stringshare_add() or
116 EAPI const char *ewk_popup_menu_item_accessibility_text_get(const Ewk_Popup_Menu_Item *item);
119 * Returns whether the popup menu item is enabled or not.
121 * @param item the popup menu item instance
123 * @return @c EINA_TRUE if ther popup menu item is enabled, @c EINA_FALSE otherwise.
125 EAPI Eina_Bool ewk_popup_menu_item_enabled_get(const Ewk_Popup_Menu_Item *item);
128 * Returns whether the popup menu item is label or not.
130 * @param item the popup menu item instance
132 * @return @c EINA_TRUE if the popup menu item is label, @c EINA_FALSE otherwise.
134 EAPI Eina_Bool ewk_popup_menu_item_is_label_get(const Ewk_Popup_Menu_Item *item);
137 * Returns whether the popup menu item is selected or not.
139 * @param item the popup menu item instance
141 * @return @c EINA_TRUE if the popup menu item is selected, @c EINA_FALSE otherwise.
143 EAPI Eina_Bool ewk_popup_menu_item_selected_get(const Ewk_Popup_Menu_Item *item);
148 #endif // ewk_popup_menu_item_h