Remove the devider of genlist for IOT profile
[apps/native/ug-bluetooth-efl.git] / standard / bt-widget.h
1 /*
2 * ug-bluetooth-efl
3 *
4 * Copyright 2012 Samsung Electronics Co., Ltd
5 *
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 *           GirishAshok Joshi <girish.joshi@samsung.com>
8 *           DoHyun Pyun <dh79.pyun@samsung.com>
9 *
10 * Licensed under the Flora License, Version 1.1 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.tizenopensource.org/license
15 *
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 *
22 */
23
24 #ifndef __BT_WIDGET_H__
25 #define __BT_WIDGET_H__
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #include "Elementary.h"
32 #include <efl_extension.h>
33
34 #include "bt-util.h"
35
36 typedef enum {
37         BT_GENLIST_GROUP_SINGLE = 0,
38         BT_GENLIST_GROUP_TOP,
39         BT_GENLIST_GROUP_MIDDLE,
40         BT_GENLIST_GROUP_BOTTOM,
41 } bt_genlist_group_style_t;
42
43 typedef enum {
44         BT_GENLIST_1LINE = 0,
45         BT_GENLIST_2LINE_TOP,
46         BT_GENLIST_2LINE_BOTTOM,
47 } bt_genlist_type_t;
48
49 static inline char* get_genlist_style(bt_genlist_type_t type)
50 {
51         if (type == BT_GENLIST_2LINE_BOTTOM)
52                 return TIZEN_COMMON ? "2line" : "type2";
53         else if (type == BT_GENLIST_2LINE_TOP)
54                 return TIZEN_COMMON ? "2line" : "type1";
55         else
56                 return TIZEN_COMMON ? "1line" : "type1";
57 }
58
59 #define BT_GENLIST_1LINE_TEXT_STYLE get_genlist_style(BT_GENLIST_1LINE)
60 #define BT_GENLIST_1LINE_TEXT_ICON_STYLE get_genlist_style(BT_GENLIST_1LINE)
61 #define BT_GENLIST_2LINE_TOP_TEXT_STYLE get_genlist_style(BT_GENLIST_2LINE_TOP)
62 #define BT_GENLIST_2LINE_TOP_TEXT_ICON_STYLE get_genlist_style(BT_GENLIST_2LINE_TOP)
63 #define BT_GENLIST_2LINE_BOTTOM_TEXT_STYLE get_genlist_style(BT_GENLIST_2LINE_BOTTOM)
64 #define BT_GENLIST_2LINE_BOTTOM_TEXT_ICON_STYLE get_genlist_style(BT_GENLIST_2LINE_BOTTOM)
65 #define BT_GENLIST_MULTILINE_TEXT_STYLE "multiline"
66 #define BT_GENLIST_GROUP_INDEX_STYLE "group_index"
67 #define BT_GENLIST_FULL_CONTENT_STYLE "full"
68
69 #define BT_GENLIST_ONOFF_ICON_PART "elm.swallow.end"
70 #define BT_GENLIST_ONOFF_ICON_PART_COMMON "elm.icon"
71
72 #define BT_POPUP_STR_MAX_LEN 512
73
74 Evas_Object *_bt_create_naviframe(Evas_Object *parent);
75
76 Evas_Object *_bt_create_icon(Evas_Object *parent, char *img);
77
78 Evas_Object *_bt_create_progressbar(Evas_Object *parent,
79                                 const char *style);
80
81 void _bt_update_genlist_item(Elm_Object_Item *item);
82
83 Evas_Object *_bt_main_base_layout_create(Evas_Object *parent, void *data);
84
85 void _bt_set_popup_text(void *data, Evas_Object *popup);
86
87 Evas_Object *_bt_create_popup(void *data, void *cb, void *cb_data,
88                                         int timer_val);
89 #ifdef __cplusplus
90 }
91 #endif
92 #endif                          /* __BT_WIDGET_H__ */