0112dbc5b54921d1c541f85c876cf1da8acf5731
[apps/core/preloaded/video-player.git] / include / mp-video-value-define.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.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
7  * 
8  *     http://www.tizenopensource.org/license
9  * 
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.
15  */
16
17
18 #ifndef _VIDEO_VALUE_DEFINE_
19 #define  _VIDEO_VALUE_DEFINE_
20
21 #include <utilX.h>
22
23
24 //PLAY_TIME_FORMAT
25 #define PLAY_TIME_FORMAT "02u:%02u:%02u"
26
27
28 //PLAY_TIME_ARGS
29 #define PLAY_TIME_ARGS(t) \
30         (t) / (60 * 60), \
31         ((t) / 60) % 60, \
32         (t) % 60
33
34 #define PLAY_TIME_LENGTH 9
35
36
37 #define _EDJ(x) elm_layout_edje_get(x)
38
39
40 #ifdef PREFIX
41 #undef PREFIX
42 #endif
43
44 #ifdef LOCALEDIR
45 #undef LOCALEDIR
46 #endif
47
48 #define PREFIX                                          "/opt/apps/org.tizen.video-player"
49 #define EDJ_PATH                                        "/opt/apps/org.tizen.video-player/res/edje"
50 #define LOCALEDIR                                       "/opt/apps/org.tizen.video-player/res/locale"
51
52 #define VIDEO_HEAD_ICON_ADD                             PREFIX"/res/images/01_header_icon_add.png"
53 #define VIDEO_HEAD_ICON_DEL                             PREFIX"/res/images/01_header_icon_cancel.png"
54 #define VIDEO_HEAD_ICON_OTHERS                          PREFIX"/res/images/01_header_icon_others.png"
55
56 #define VIDEO_HEAD_ICON_SOUNDPATH                       PREFIX"/res/images/T01_icon_soundPath_h.png"
57
58 #define VIDEO_PLAYER_MAIN_EDJ                           EDJ_PATH"/main.edj"
59 #define VIDEO_PLAYER_CONTROL_EDJ                        EDJ_PATH"/control.edj"
60 #define VIDEO_PLAYER_PANEL_EDJ                          EDJ_PATH"/panel.edj"
61 #define VIDEO_PLAYER_PROGRESS_EDJ                       EDJ_PATH"/progress.edj"
62 #define VIDEO_PLAYER_ADD_TAG                            EDJ_PATH"/add_tag.edj"
63 #define VIDEO_PLAYER_ANIMATION_EDJ                      EDJ_PATH"/animation.edj"
64 #define VIDEO_PLAYER_DETAIL_EDJ                         EDJ_PATH"/detail.edj"
65 #define VIDEO_PLAYER_SUBTITLE_EDJ                       EDJ_PATH"/subtitle.edj"
66 #define VIDEO_CUSTOM_THEME                              EDJ_PATH"/vp-custom-winset-style.edj"
67 #define VIDEO_PLAYER_HIDDEN_PANEL_EDJ                   EDJ_PATH"/hidden_button_panel.edj"
68 #define VIDEO_PLAYER_OPTION_BUTTON_EDJ                  EDJ_PATH"/option_button.edj"
69
70 #define MAIN_EDJ_GROUP                                  "main"
71 #define CONTROL_EDJ_GROUP                               "control"
72 #define PROGRESS_EDJ_GROUP                              "progress"
73 #define PANEL_EDJ_GROUP                                 "panel"
74 #define FAVORITE_EDJ_GROUP                              "favorite"
75 #define ANIMATION_EDJ_GROUP                             "animation"
76 #define DETAIL_EDJ_GROUP                                "detail"
77 #define SUBTITLE_EDJ_GROUP                              "subtitle"
78 #define HIDDEN_PANEL_EDJ_GROUP                  "hidden_panel"
79 #define OPTION_EDJ_GROUP                                "option"
80
81 #define SWALLOW_MAIN_CONTROL                            "main.panel"
82 #define SWALLOW_MAIN_ANIMATION                          "main.animation"
83 #define SWALLOW_MAIN_HIDDEN_BUTTON                      "main.hidden.button"
84 #define SWALLOW_MAIN_OPTION_BUTTON                      "main.option.button"
85
86
87 #define SWALLOW_PANEL_CONTROL                           "panel.control"
88 #define SWALLOW_PANEL_PROGRESS_BAR                      "panel.progress"
89
90 #define SWALLOW_DETAIL_LIST                             "detail.list"
91 #define SUBTITLE_TEXT                                   "subtitle.txt"
92 #define PART_BUTTON_ICON                                "icon"
93
94
95 #define SIGNAL_CONTROL_PART_PLAY_BUTTON                 "control.play.button"
96 #define SIGNAL_CONTROL_PART_BACK_BUTTON                 "control.back.button"
97 #define SIGNAL_CONTROL_PART_VOL_BUTTON                  "control.volume.button"
98 #define SIGNAL_CONTROL_PART_SOUNDPATH_BUTTON            "control.soundpath.button"
99 #define SIGNAL_CONTROL_PART_SCREENSIZE_BUTTON           "control.screensize.button"
100 #define SIGNAL_CONTROL_PART_FF_BUTTON                   "control.normal.ff.button"
101 #define SIGNAL_CONTROL_PART_REW_BUTTON                  "control.normal.rew.button"
102 #define SIGNAL_CONTROL_PART_HQ_BUTTON                   "control.streaming.hq.button"
103 #define SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH            "hidden.button.panel.soundpath"
104
105 #define SIGNAL_CONTROL_MODE_NORMAL                      "signal.control.mode.normal"
106 #define SIGNAL_CONTROL_MODE_STREAMING                   "signal.control.mode.streaming"
107 #define SIGNAL_CONTROL_MODE_VISIBLE_OFF                 "signal.control.mode.visible.off"
108 #define SIGNAL_CONTROL_BACK_BUTTON_DOWN                 "signal.control.back.button.down"
109
110 #define SIGNAL_CONTROL_FF_MODE_NORMAL                   "signal.control.ff.normal"
111 #define SIGNAL_CONTROL_FF_MODE_EXTEND                   "signal.control.ff.extend"
112
113 #define SIGNAL_CONTROL_REW_MODE_NORMAL                  "signal.control.rew.normal"
114 #define SIGNAL_CONTROL_REW_MODE_EXTEND                  "signal.control.rew.extend"
115
116 #define SIGNAL_CONTROL_VOL_BUTTON_DOWN                  "signal.control.volume.button.down"
117 #define SIGNAL_CONTROL_VOL_BUTTON_UP                    "signal.control.volume.button.up"
118 #define SIGNAL_CONTROL_SOUNDPATH_BUTTON_DOWN            "signal.control.soundpath.button.down"
119 #define SIGNAL_CONTROL_SOUNDPATH_BUTTON_UP              "signal.control.soundpath.button.up"
120 #define SIGNAL_CONTROL_SCREENSIZE_NORMAL                "signal.control.screensize.normal"
121 #define SIGNAL_CONTROL_SCREENSIZE_EXPAND                "signal.control.screensize.expand"
122 #define SIGNAL_CONTROL_NORMAL_FF_BUTTON_DOWN            "signal.control.normal.ff.button.down"
123 #define SIGNAL_CONTROL_NORMAL_FF_BUTTON_UP              "signal.control.normal.ff.button.up"
124 #define SIGNAL_CONTROL_NORMAL_REW_BUTTON_DOWN           "signal.control.normal.rew.button.down"
125 #define SIGNAL_CONTROL_NORMAL_REW_BUTTON_UP             "signal.control.normal.rew.button.up"
126 #define SIGNAL_CONTROL_HQ_BUTTON_DOWN                   "signal.control.streaming.hq.button.down"
127 #define SIGNAL_CONTROL_HQ_BUTTON_UP                     "signal.control.streaming.hq.button.up"
128 #define SIGNAL_HIDDEN_PANEL_SOUNDPATH_DOWN              "signal.hidden.button.panel.soundpath.down"
129 #define SIGNAL_HIDDEN_PANEL_SOUNDPATH_UP                "signal.hidden.button.panel.soundpath.up"
130
131 #define SIGNAL_CONTROL_VOL_BUTTON_MUTE                  "signal.control.volume.button.mute"
132 #define SIGNAL_CONTROL_VOL_BUTTON_UNMUTE                "signal.control.volume.button.unmute"
133 #define SIGNAL_CONTROL_SOUNDPATH_BUTTON_ACTIVE          "signal.control.soundpath.button.active"
134 #define SIGNAL_CONTROL_SOUNDPATH_BUTTON_UNACTIVE        "signal.control.soundpath.button.unactive"
135 #define SIGNAL_CONTROL_STREAMING_QUALITY_HIGH           "signal.control.streaming.quality.high"
136 #define SIGNAL_CONTROL_STREAMING_QUALITY_NORMAL         "signal.control.streaming.quality.normal"
137 #define SIGNAL_CONTROL_STREAMING_QUALITY_HIDE           "signal.control.streaming.quality.hide"
138
139
140 #define SIGNAL_OPTION_PART_SCREEN_SIZE                  "option.screensize"
141 #define SIGNAL_OPTION_PART_DETAIL                       "option.detail"
142
143 #define SIGNAL_OPTION_SCREEN_SIZE_DOWN                  "signal.option.screensize.down"
144 #define SIGNAL_OPTION_DETAIL_DOWN                       "signal.option.detail.down"
145
146 #define SIGNAL_OPTION_SCREEN_SIZE_NORMAL                "signal.option.screensize.normal"
147 #define SIGNAL_OPTION_SCREEN_SIZE_EXPAND                "signal.option.screensize.expand"
148
149 // Callback signals.
150 #define SIGNAL_CONTROL_PLAY_BUTTON_DOWN                 "signal.control.play.button.down"
151 #define SIGNAL_CONTROL_PLAY_BUTTON_UP                   "signal.control.play.button.up"
152 #define SIGNAL_CONTROL_PLAY_PAUSE_PRESS                 "signal.control.play.pause.press"
153 #define SIGNAL_CONTROL_PLAY_RESUME_PRESS                "signal.control.play.resume.press"
154
155 // Emit signals.
156 #define SIGNAL_CONTROL_PLAY_RESUME                      "signal.control.play.resume"
157 #define SIGNAL_CONTROL_PLAY_PAUSE                       "signal.control.play.pause"
158
159 #define SIGNAL_CONTROL_SCREENSIZE_BUTTON_NORMAL         "signal.control.screensize.button.normal"
160 #define SIGNAL_CONTROL_SCREENSIZE_BUTTON_EXPAND         "signal.control.screensize.button.expand"
161
162 #define SIGNAL_OPTION_MODE_STREAMING                            "signal.option.mode.streaming"
163
164
165 #define SIGNAL_MAIN_MUTE_SHOW                           "signal.main.mute.show"
166 #define SIGNAL_MAIN_MUTE_HIDE                           "signal.main.mute.hide"
167
168 #define SIGNAL_MAIN_NOCONTENTS_SHOW                                     "signal.main.nocontents.show"
169 #define SIGNAL_MAIN_NOCONTENTS_HIDE                                     "signal.main.nocontents.hide"
170
171 #define SIGNAL_MAIN_SCREEN_TOUCH_PRESS                  "signal.main.screen.touch.press"
172 #define SIGNAL_MAIN_SCREEN_TOUCH_TOGGLE                 "main.screen.touch.toggle"
173 #define SIGNAL_MAIN_ANIMATION_SHOW                      "signal.main.animation.show"
174 #define SIGNAL_MAIN_ANIMATION_HIDE                      "signal.main.animation.hide"
175
176 #define SIGNAL_MAIN_OPTION_BUTTON_BG_HIDE               "signal.main.option.button.bg.hide"
177
178 #define SIGNAL_ANIMATION_IMAGE_LOADING                  "signal.loading.image.step"
179
180 #define SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH_SHOW       "signal.hidden.button.panel.soundpath.show"
181 #define SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH_HIDE       "signal.hidden.button.panel.soundpath.hide"
182
183 #define TAG_FAVOURITES                                  "Favourites"
184 #define PACKAGE                                         "video-player"
185 #define PAUSE_KEY                                       "XF86AudioPause"
186 #define PLAY_KEY                                        "XF86AudioPlay"
187 #define STOP_KEY                                        "XF86AudioStop"
188 #define NEXT_KEY                                        "XF86AudioNext"
189 #define PREV_KEY                                        "XF86AudioPrev"
190 #define FORWARD_KEY                                     "XF86AudioForward"
191 #define REWIND_KEY                                      "XF86AudioRewind"
192 #define END_KEY                                         KEY_END
193 #define HOME_KEY                                        KEY_SELECT
194 #define KEY_CANCLE                                      KEY_CANCEL
195 #define POWER_KEY                                       "XF86PowerOff"
196 #define VOLUME_DOWN_KEY                                 KEY_VOLUMEDOWN
197 #define VOLUME_MUTE                                     0
198 #define KEY_GRAB_SHARED                                 SHARED_GRAB
199 #define KEY_GRAB_EXCLUSIVE                              EXCLUSIVE_GRAB
200 #define KEY_GRAB_TOP_POSITION                           TOP_POSITION_GRAB
201 #define KEY_GRAB_OR_EXCLUSIVE                           OR_EXCLUSIVE_GRAB
202 #define STR_LEN_MAX                                     4096 * 3
203
204 #define XML_ITEM_NUM                                    6
205 #define _WIFI_MODE_                                     1
206 #define _3G_MODE_                                       2
207 #define USE_STREAMING_ANI                               1
208 #define LONG_PRESS_INTERVAL                             0.5
209
210 #define SCREEN_TOUCH_TOGGLE_AREA_Y_START                0.065
211 #define SCREEN_TOUCH_TOGGLE_AREA_Y_END                  0.78
212
213 #define TAG_LIST_SIZE                                   256
214
215 #define ANIMATION_TIMER_INTERVAL                        0.05
216 #define ANIMATION_MAX_COUNT                             30
217
218 #define BOOSTER_STEP_DISTANCE                           30
219 #define SIGNAL_TEXT_MAX_LEN                             64
220 #define CAPTION_TEXT_MAX_LEN                            16
221 #define STR_UUID_LEN_MAX                                37
222
223 #endif //_VIDEO_VALUE_DEFINE_