69a69196b661d77a44691348078b6944dd3c2326
[platform/framework/web/crosswalk-tizen.git] /
1 // Copyright 2016 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_UTIL_H_
6 #define EWK_EFL_INTEGRATION_BROWSER_SELECT_PICKER_SELECT_PICKER_UTIL_H_
7
8 #include <Elementary.h>
9
10 #include "base/strings/string16.h"
11 #include "content/public/common/menu_item.h"
12
13 class SelectPickerBase;
14
15 class GenlistCallbackData {
16  public:
17   GenlistCallbackData(int index,
18                       SelectPickerBase* select_picker,
19                       content::MenuItem menu_item,
20                       Evas_Object* genlist,
21                       const Elm_Genlist_Item_Class* item_class,
22                       const Elm_Genlist_Item_Class* group_class,
23                       bool is_multiple_selection,
24                       Evas_Smart_Cb item_selected_cb
25 #if defined(TIZEN_ATK_SUPPORT)
26                       ,
27                       bool atk_enabled
28 #endif
29                       );
30   ~GenlistCallbackData();
31
32   void SetSelection(bool selected);
33   void ScrollToTop();
34   int GetIndex() const;
35   const base::string16& GetLabel() const;
36 #if defined(TIZEN_ATK_SUPPORT)
37   Elm_Object_Item* GetElmItem() const;
38 #endif
39   SelectPickerBase* GetSelectPicker() const;
40   bool IsEnabled() const;
41
42  private:
43   int index_;
44   SelectPickerBase* select_picker_;
45   Elm_Object_Item* elm_item_;
46   content::MenuItem menu_item_;
47 #if defined(TIZEN_ATK_SUPPORT)
48   bool atk_enabled_;
49 #endif
50 };
51
52 #endif  // EWK_EFL_INTEGRATION_BROWSER_SELECT_PICKER_SELECT_PICKER_UTIL_H_