EWebKit  1.0
ewk_popup_menu_item_private.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 #ifndef ewk_popup_menu_item_private_h
27 #define ewk_popup_menu_item_private_h
28 
29 #include "WKEinaSharedString.h"
30 #include "WKRetainPtr.h"
31 #include "ewk_popup_menu_item.h"
32 #include <WebKit/WKBase.h>
33 
34 namespace WebKit {
35 class WebPopupItem;
36 }
37 
43 public:
44  explicit EwkPopupMenuItem(const WebKit::WebPopupItem& item);
45 
46  Ewk_Popup_Menu_Item_Type type() const;
47  Ewk_Text_Direction textDirection() const;
48 
49  bool hasTextDirectionOverride() const;
50  bool isEnabled() const;
51  bool isLabel() const;
52  bool isSelected() const;
53 
54  const char* text() const;
55  const char* tooltipText() const;
56  const char* accessibilityText() const;
57 
58 private:
59  WebKit::WebPopupItem m_item;
60 
61  // Lazily initialized.
62  mutable WKEinaSharedString m_text;
63  mutable WKEinaSharedString m_tooltipText;
64  mutable WKEinaSharedString m_accessibilityText;
65 };
66 
67 #endif // ewk_popup_menu_item_private_h
Definition: ewk_context_private.h:37
Ewk_Text_Direction
Enum values containing text directionality values.
Definition: ewk_view.h:93
Describes the Ewk Popup Menu Item API.
Definition: ewk_popup_menu_item_private.h:42
Ewk_Popup_Menu_Item_Type
Definition: ewk_popup_menu_item.h:42