2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_ATTACH_PANEL_INTERNAL_H__
18 #define __TIZEN_ATTACH_PANEL_INTERNAL_H__
20 #include <Elementary.h>
21 #include <app_control.h>
23 #define DATA_KEY_ATTACH_PANEL "__dkap__"
24 #define DATA_KEY_ATTACH_PANEL_INFO "__dkapi__"
25 #define DATA_KEY_EDGE_TOP "__dket__"
26 #define DATA_KEY_PAGE "__dkpg__"
27 #define DATA_KEY_UG "__dkug__"
29 #define SELECTION_MODE_SINGLE "single"
30 #define SELECTION_MODE_MULTIPLE "multiple"
32 #define MODE_ENABLE "enable"
33 #define MODE_DISABLE "disable"
34 #define MODE_TRUE "true"
35 #define MODE_FALSE "false"
37 #define TABBAR_NAME_MORE "More"
41 * attach-panel(Caller) <-> UGs & Apps operations
43 * - ATTACH_PANEL_CONTENT_CATEGORY_IMAGE
44 * appid : "attach-panel-gallery"
45 * operation : APP_CONTROL_OPERATION_PICK
46 * mime : "image/(asterisk)"
47 * extra_data : See below
48 * 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
49 * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
50 * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
51 * return data : See below
52 * 1) "http://tizen.org/appcontrol/data/selected"
54 * - ATTACH_PANEL_CONTENT_CATEGORY_CAMERA
55 * appid : "attach-panel-camera"
56 * operation : APP_CONTROL_OPERATION_CREATE_CONTENT
58 * extra_data : See below
59 * 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
60 * 2) "http://tizen.org/appcontrol/data/total_size" : any bytes
61 * return data : See below
62 * 1) "http://tizen.org/appcontrol/data/selected"
64 * - ATTACH_PANEL_CONTENT_CATEGORY_VOICE
65 * appid : "attach-panel-voicerecorder"
66 * operation : APP_CONTROL_OPERATION_CREATE_CONTENT
68 * extra_data : See below
69 * 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
70 * 2) "http://tizen.org/appcontrol/data/total_size" : any bytes
71 * return data : See below
72 * 1) "http://tizen.org/appcontrol/data/selected"
74 * - ATTACH_PANEL_CONTENT_CATEGORY_VIDEO
76 * operation : APP_CONTROL_OPERATION_PICK
77 * mime : "video/(asterisk)"
78 * extra_data : See below
79 * 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
80 * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
81 * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
82 * return data : See below
83 * 1) "http://tizen.org/appcontrol/data/selected"
85 * - ATTACH_PANEL_CONTENT_CATEGORY_AUDIO
87 * operation : APP_CONTROL_OPERATION_PICK
88 * mime : "audio/(asterisk)"
89 * extra_data : See below
90 * 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
91 * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
92 * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
93 * return data : See below
94 * 1) "http://tizen.org/appcontrol/data/selected"
96 * - ATTACH_PANEL_CONTENT_CATEGORY_CALENDAR
98 * operation : APP_CONTROL_OPERATION_PICK
99 * mime : "application/vnd.tizen.calendar"
100 * extra_data : See below
101 * 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
102 * 2) "http://tizen.org/appcontrol/data/mode" : 1
103 * 3) "http://tizen.org/appcontrol/data/type" : "vcs"
104 * 4) "http://tizen.org/appcontrol/data/total_count" : any numbers
105 * return data : See below
106 * 1) "http://tizen.org/appcontrol/data/selected"
108 * - ATTACH_PANEL_CONTENT_CATEGORY_CONTACT
110 * operation : APP_CONTROL_OPERATION_PICK
111 * mime : "application/vnd.tizen.contact"
112 * extra_data : See below
113 * 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
114 * 2) "http://tizen.org/appcontrol/data/type" : "vcf"
115 * return data : See below
116 * 1) "http://tizen.org/appcontrol/data/selected"
118 * - ATTACH_PANEL_CONTENT_CATEGORY_MYFILES
120 * operation : APP_CONTROL_OPERATION_PICK
122 * extra_data : See below
123 * 1) APP_CONTROL_DATA_SELECTION_MODE : "multiple"
124 * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
125 * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
126 * return data : See below
127 * 1) "http://tizen.org/appcontrol/data/selected"
129 * - ATTACH_PANEL_CONTENT_CATEGORY_VIDEO_RECORDER
131 * operation : APP_CONTROL_OPERATION_CREATE_CONTENT
133 * extra_data : See below
134 * 1) APP_CONTROL_DATA_SELECTION_MODE : "single"
135 * 2) "http://tizen.org/appcontrol/data/total_count" : any numbers
136 * 3) "http://tizen.org/appcontrol/data/total_size" : any bytes
137 * return data : See below
138 * 1) "http://tizen.org/appcontrol/data/selected"
144 * attach-panel(Caller) <-> ui-gadgets(Callee) protocol
147 * key : "__CALLER_PANEL__"
148 * value : "attach-panel"
151 * key : APP_CONTROL_DATA_SELECTION_MODE
152 * value : SELECTION_MODE_MULTIPLE
154 * how : ug_send_message()
156 * key : APP_CONTROL_DATA_SELECTION_MODE
157 * value : SELECTION_MODE_SINGLE
159 * how : ug_send_message()
161 * key : "__ATTACH_PANEL_INITIALIZE__"
163 * when : attach_panel_show()
164 * how : ug_send_message()
166 * key : "__ATTACH_PANEL_SHOW_CONTENT_CATEGORY__"
167 * value : "true" or "false"
168 * when : set as true when the content category is shown, and false when it is hidden.
169 * how : ug_send_message()
172 * key : "__ATTACH_PANEL_FLICK_DOWN__"
173 * value : "enable" or "disable"
174 * when : ug is full, then ug has events.
175 * how : ug_send_result()
177 * key : "__ATTACH_PANEL_FULL_MODE__"
179 * when : ug needs to be shown on the full mode
180 * how : ug_send_result()
182 * key : "__ATTACH_PANEL_SHOW_TOOLBAR__"
183 * value : "true" or "false"
184 * when : set as true when the panel's tabbar needs to be shown, and false when it needs to be hidden.
185 * how : ug_send_result()
187 * key : "__ATTACH_PANEL_SHOW_PANEL__"
188 * value : "true" or "false"
189 * when : set as true when the panel it needs to be shown, and false when it needs to be hidden.
190 * how : ug_send_result()
196 ATTACH_PANEL_CONTENT_CATEGORY_APP = 0,
197 ATTACH_PANEL_CONTENT_CATEGORY_UG,
203 ATTACH_PANEL_STATE_HIDE,
204 ATTACH_PANEL_STATE_HALF,
205 ATTACH_PANEL_STATE_FULL,
206 } attach_panel_state_e;
210 struct _attach_panel {
212 Evas_Object *attach_panel_rect;
213 Evas_Object *conformant;
214 Evas_Object *ui_manager;
215 Evas_Object *toolbar;
216 Evas_Object *scroller;
217 Evas_Object *gesture;
219 Evas_Object *grid_page;
220 Elm_Object_Item *grid_tabbar_item;
222 Eina_List *content_list;
224 Ecore_Idler *append_idler;
226 attach_panel_state_e attach_panel_port_state;
227 attach_panel_state_e attach_panel_land_state;
228 attach_panel_result_cb result_cb;
230 attach_panel_event_cb event_cb;
233 Evas_Coord transit_width;
234 Evas_Coord transit_height;
243 typedef struct _attach_panel attach_panel_s;
247 struct _innate_content {
248 /* default information */
252 const char *tabbar_name;
253 int content_category;
256 /* launching features */
257 const char *operation;
259 const char *item_type;
260 const char *selection_mode;
265 typedef struct _innate_content innate_content_s;
270 attach_panel_s *attach_panel;
271 innate_content_s *innate_content_info;
272 Elm_Object_Item *tabbar_item;
273 Elm_Object_Item *grid_item;
274 Evas_Object *content;
280 typedef struct _content content_s;
284 extern void _attach_panel_del(attach_panel_s *attach_panel);
288 #endif // __TIZEN_ATTACH_PANEL_INTERNAL_H__