[M67 Dev][EWK] Classify EWK APIs by public, internal, or product
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / public / ewk_popup_menu_item_internal.h
1 /*
2  * Copyright (C) 2012 Samsung Electronics. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
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.
12  *
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.
24  */
25
26 /**
27  * @file    ewk_popup_menu_item_internal.h
28  * @brief   Describes the Ewk Popup Menu Item API.
29  */
30
31 #ifndef ewk_popup_menu_item_internal_h
32 #define ewk_popup_menu_item_internal_h
33
34 #include <Eina.h>
35 #include <tizen.h>
36 #include "ewk_view.h"
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 /** Enum values containing type of popup menu item. */
43 typedef enum {
44     EWK_POPUP_MENU_SEPARATOR,
45     EWK_POPUP_MENU_ITEM,
46     EWK_POPUP_MENU_UNKNOWN = -1
47 } Ewk_Popup_Menu_Item_Type;
48
49 /** Creates a type name for Ewk_Popup_Menu_Item */
50 typedef struct Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
51
52 /**
53  * Returns type of the popup menu item.
54  *
55  * @param item the popup menu item instance
56  *
57  * @return the type of the @a item or @c EWK_POPUP_MENU_UNKNOWN in case of error.
58  */
59 EXPORT_API Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_Item *item);
60
61 /**
62  * Returns text of the popup menu item.
63  *
64  * @param item the popup menu item instance
65  *
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
70  *         strdup()
71  */
72 EXPORT_API const char *ewk_popup_menu_item_text_get(const Ewk_Popup_Menu_Item *item);
73     
74 /**
75  * Returns whether the popup menu item is selected or not.
76  *
77  * @param item the popup menu item instance
78  *
79  * @return @c EINA_TRUE if the popup menu item is selected, @c EINA_FALSE otherwise.
80  */
81 EXPORT_API Eina_Bool ewk_popup_menu_item_selected_get(const Ewk_Popup_Menu_Item *item);
82
83 #ifdef __cplusplus
84 }
85 #endif
86 #endif // ewk_popup_menu_item_internal_h