Revert "[CherryPick] Input Method upversion"
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_popup_menu_item.h
1 /*
2  * Copyright (C) 2012 Samsung Electronics
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.h
28  * @brief   Describes the Ewk Popup Menu Item API.
29  */
30
31 #ifndef ewk_popup_menu_item_h
32 #define ewk_popup_menu_item_h
33
34 #include <Eina.h>
35 #include "ewk_view.h"
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /** Enum values containing type of popup menu item. */
42 typedef enum {
43     EWK_POPUP_MENU_SEPARATOR,
44     EWK_POPUP_MENU_ITEM,
45     EWK_POPUP_MENU_UNKNOWN = -1
46 } Ewk_Popup_Menu_Item_Type;
47
48 /** Creates a type name for _Ewk_Popup_Menu_Item */
49 typedef struct _Ewk_Popup_Menu_Item Ewk_Popup_Menu_Item;
50
51 /**
52  * Returns type of the popup menu item.
53  *
54  * @param item the popup menu item instance
55  *
56  * @return the type of the @a item or @c EWK_POPUP_MENU_UNKNOWN in case of error.
57  */
58 EAPI Ewk_Popup_Menu_Item_Type ewk_popup_menu_item_type_get(const Ewk_Popup_Menu_Item *item);
59
60 /**
61  * Returns text of the popup menu item.
62  *
63  * @param item the popup menu item instance
64  *
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
69  *         strdup()
70  */
71 EAPI const char *ewk_popup_menu_item_text_get(const Ewk_Popup_Menu_Item *item);
72
73 /**
74  * Returns text directionality of the popup menu item.
75  *
76  * @param item the popup menu item instance
77  *
78  * @return the text directionality of the @a item.
79  */
80 EAPI Ewk_Text_Direction ewk_popup_menu_item_text_direction_get(const Ewk_Popup_Menu_Item *item);
81
82 /**
83  * Returns whether the popup menu item has text direction override.
84  *
85  * @param item the popup menu item instance
86  *
87  * @return @c EINA_TRUE if the popup menu item has text direction override,
88  *         @c EINA_FALSE otherwise.
89  */
90 EAPI Eina_Bool ewk_popup_menu_item_text_direction_override_get(const Ewk_Popup_Menu_Item *item);
91
92 /**
93  * Returns tooltip of the popup menu item.
94  *
95  * @param item the popup menu item instance
96  *
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
101  *         strdup()
102  */
103 EAPI const char *ewk_popup_menu_item_tooltip_get(const Ewk_Popup_Menu_Item *item);
104
105 /**
106  * Returns accessibility text of the popup menu item.
107  *
108  * @param item the popup menu item instance
109  *
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
114  *         strdup()
115  */
116 EAPI const char *ewk_popup_menu_item_accessibility_text_get(const Ewk_Popup_Menu_Item *item);
117
118 /**
119  * Returns whether the popup menu item is enabled or not.
120  *
121  * @param item the popup menu item instance
122  *
123  * @return @c EINA_TRUE if ther popup menu item is enabled, @c EINA_FALSE otherwise.
124  */
125 EAPI Eina_Bool ewk_popup_menu_item_enabled_get(const Ewk_Popup_Menu_Item *item);
126
127 /**
128  * Returns whether the popup menu item is label or not.
129  *
130  * @param item the popup menu item instance
131  *
132  * @return @c EINA_TRUE if the popup menu item is label, @c EINA_FALSE otherwise.
133  */
134 EAPI Eina_Bool ewk_popup_menu_item_is_label_get(const Ewk_Popup_Menu_Item *item);
135
136 #ifdef __cplusplus
137 }
138 #endif
139 #endif // ewk_popup_menu_item_h