2 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
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_internal.h
28 * @brief Describes the Ewk Popup Menu Item API.
31 #ifndef ewk_popup_menu_item_internal_h
32 #define ewk_popup_menu_item_internal_h
42 /** Enum values containing type of popup menu item. */
44 EWK_POPUP_MENU_SEPARATOR,
46 EWK_POPUP_MENU_UNKNOWN = -1
47 } Ewk_Popup_Menu_Item_Type;
49 /** Creates a type name for Ewk_Popup_Menu_Item */
50 typedef struct Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
53 * Returns type of the popup menu item.
55 * @param item the popup menu item instance
57 * @return the type of the @a item or @c EWK_POPUP_MENU_UNKNOWN in case of error.
59 EXPORT_API Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_Item *item);
62 * Returns text of the popup menu item.
64 * @param item the popup menu item instance
66 * @return the text of the @a item or @c NULL in case of error. This pointer is
67 * guaranteed to be eina_stringshare, so whenever possible
68 * save yourself some cpu cycles and use
69 * eina_stringshare_ref() instead of eina_stringshare_add() or
72 EXPORT_API const char *ewk_popup_menu_item_text_get(const Ewk_Popup_Menu_Item *item);
75 * Returns whether the popup menu item is selected or not.
77 * @param item the popup menu item instance
79 * @return @c EINA_TRUE if the popup menu item is selected, @c EINA_FALSE otherwise.
81 EXPORT_API Eina_Bool ewk_popup_menu_item_selected_get(const Ewk_Popup_Menu_Item *item);
86 #endif // ewk_popup_menu_item_internal_h