7300d2477ef29ce747f291aba321ec5e5ce66e51
[platform/framework/web/crosswalk-tizen.git] /
1 // Copyright 2014-17 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EWK_EFL_INTEGRATION_BROWSER_SELECT_PICKER_SELECT_PICKER_H_
6 #define EWK_EFL_INTEGRATION_BROWSER_SELECT_PICKER_SELECT_PICKER_H_
7
8 #include <Elementary.h>
9
10 #include "browser/select_picker/form_navigable_picker.h"
11 #include "ui/gfx/geometry/point.h"
12 #include "ui/gfx/geometry/rect.h"
13
14 class EWebView;
15 class GenlistCallbackData;
16
17 class SelectPickerEfl : public FormNavigablePicker {
18  public:
19
20   explicit SelectPickerEfl(EWebView* web_view,
21                            int selected_index,
22                            bool is_multiple_selection);
23   ~SelectPickerEfl() override;
24
25   gfx::Rect GetGeometryDIP() const override;
26
27  protected:
28
29   void Init(const std::vector<content::MenuItem>& items,
30             const gfx::Rect& bounds) override;
31   void ItemSelected(GenlistCallbackData* data, void* event_info) override;
32   void ClearData() override;
33   void CreateAndPopulatePopupList(
34       const std::vector<content::MenuItem>& items) override;
35
36  private:
37   static Evas_Object* IconGetCallback(void*, Evas_Object*, const char*);
38   void DestroyRadioList();
39 #if defined(TIZEN_ATK_SUPPORT)
40   void AddAtkObject();
41   void RemoveAtkObject();
42
43   static Eina_Bool AccessNavigateToPrevCallback(
44       void* data,
45       Evas_Object* obj,
46       Elm_Access_Action_Info* action_info);
47   static Eina_Bool AccessNavigateToNextCallback(
48       void* data,
49       Evas_Object* obj,
50       Elm_Access_Action_Info* action_info);
51   static Eina_Bool AccessDoneCallback(void* data,
52                                       Evas_Object* obj,
53                                       Elm_Access_Action_Info* action_info);
54 #endif
55
56   Evas_Object* radio_main_;
57 #if defined(TIZEN_ATK_SUPPORT)
58   Evas_Object* prev_button_;
59   Evas_Object* next_button_;
60   Evas_Object* done_button_;
61   Evas_Object* ao_prev_button_;
62   Evas_Object* ao_next_button_;
63   Evas_Object* ao_done_button_;
64 #endif
65 };
66
67 #endif  // EWK_EFL_INTEGRATION_BROWSER_SELECT_PICKER_SELECT_PICKER_H_