AppListDraw.h
9.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* AppListDraw.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* AppList Draw
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
/****************************************************************************
* Include Files
*****************************************************************************/
#ifndef _MMI_APPLIST_DRAW_H_
#define _MMI_APPLIST_DRAW_H_
#include "mmi_features.h"
#ifdef __MMI_LAUNCHER_APP_LIST__
#include "gdi_linear_transform.h"
/*****************************************************************************
* Define
*****************************************************************************/
#define GET_CELL_X(type, cell_x) \
((type == MMI_APPLIST_CELL_TYPE_SHORTCUT) ? cell_x : (cell_x - applist_p->slide_region.x))
#define GET_FINAL_CELL_X(type, cell_x) \
((type == MMI_APPLIST_CELL_TYPE_SHORTCUT) ? cell_x : (applist_p->slide_region.anima_node_p ? (cell_x - applist_p->slide_region.anima_node_p->to.pos_x) : (cell_x - applist_p->slide_region.x)))
#define GET_G_CELL_X(type, cell_x) \
((type == MMI_APPLIST_CELL_TYPE_SHORTCUT) ? cell_x : (cell_x + applist_p->slide_region.x))
#define GET_FINAL_G_CELL_X(type, cell_x) \
((type == MMI_APPLIST_CELL_TYPE_SHORTCUT) ? cell_x : (applist_p->slide_region.anima_node_p ? (cell_x + applist_p->slide_region.anima_node_p->to.pos_x) : (cell_x + applist_p->slide_region.x)))
#define MMI_APPLIST_DRAW_INFO_NUM (MMI_APPLIST_APP_COUNT_PER_PAGE * 2)
/* Float, Fixed conversion */
#define APPLIST_X_TO_F(x) ((float)x / 65536.0f)
#define APPLIST_F_TO_X(x) (S32)((x) * 65536.0f)
#define APPLIST_PI (3.1415926f)
#define APPLIST_DEG_TO_RAD(x) ((float)((float)(x)) * APPLIST_PI / 180.0f)
#define APPLIST_RAD_TO_DEG(x) ((float)((float)(x)) * 180.0f / APPLIST_PI)
#ifdef __MMI_FTE_SUPPORT__
#define APPLIST_PIXES_PER_POINT (3)
#else //__MMI_FTE_SUPPORT__
#define APPLIST_PIXES_PER_POINT (4)
#endif //__MMI_FTE_SUPPORT__
/*****************************************************************************
* Enum
*****************************************************************************/
typedef enum
{
MMI_APPLIST_ANIMA_TYPE_POSITION_X,
MMI_APPLIST_ANIMA_TYPE_POSITION,
MMI_APPLIST_ANIMA_TYPE_OPACITY,
MMI_APPLIST_ANIMA_TYPE_RESIZE,
MMI_APPLIST_ANIMA_TYPE_ROTATE,
}mmi_applist_anima_type_enum;
typedef enum
{
MMI_APPLIST_DIR_UP,
MMI_APPLIST_DIR_DOWN,
MMI_APPLIST_DIR_LEFT,
MMI_APPLIST_DIR_RIGHT
}mmi_applist_dir_enum;
/*****************************************************************************
* Structure
*****************************************************************************/
typedef struct
{
S32 x;
S32 y;
}mmi_applist_position;
typedef struct
{
S32 x1;
S32 y1;
S32 x2;
S32 y2;
}mmi_applist_rect;
typedef struct
{
mmi_applist_position pos;
U8 opacity;
float resize;
S32 cache_idx;
srv_appmgr_app_package_type_enum type;
#ifndef __MMI_APPLIST_ONLY_ICON_SUPPORT__
U8 name_len;
#endif
/* image icon */
mmi_image_src_type_enum image_type;
U8 *image_ptr;
U32 image_len;
union
{
MMI_ID res_id;
WCHAR path[MMI_MAX_FILE_NAME_LEN+1];
} image;
U32 app_id;
/* app name */
mmi_app_package_name_struct name;
}mmi_applist_cell_struct;
typedef struct mmi_applist_anima_node_struct_t
{
mmi_applist_anima_type_enum type;
union
{
S32 pos_x;
mmi_applist_position pos;
U8 opacity;
float resize;
float rotate;
}from;
union
{
S32 pos_x;
mmi_applist_position pos;
U8 opacity;
float resize;
float rotate;
}to;
union
{
S32 *pos_x;
mmi_applist_position *pos;
U8 *opacity;
float *resize;
float *rotate;
}target;
U32 duration;
U32 start_time;
struct mmi_applist_anima_node_struct_t *next;
}mmi_applist_anima_node_struct;
typedef struct
{
S32 x;
mmi_applist_anima_node_struct *anima_node_p;
mmi_applist_dir_enum slide_dir;
}mmi_applist_slide_region_info_struct;
#ifdef G2D_SUPPORT
typedef struct
{
float angle;
mmi_applist_anima_node_struct *anima_node_p;
}mmi_applist_shake_info_struct;
#endif
typedef struct
{
gdi_lt_matrix_struct transform;
float pos_z;
U8 opacity;
}mmi_applist_draw_info_struct;
/*****************************************************************************
* Function
*****************************************************************************/
void mmi_applist_reset_anima_queue(void);
void mmi_applist_update_anima_data(void);
void mmi_applist_remove_slide_x_anima(void);
void mmi_applist_change_slide_x_anima(S32 x);
void mmi_applist_change_pos_anima(
mmi_applist_position *target_pos,
mmi_applist_position *new_pos,
U32 cur_time);
void mmi_applist_change_cell_resize_anima(
mmi_applist_cell_struct *cell_p,
float new_resize,
U32 cur_time);
#ifdef __MMI_APPLIST_EDIT_WITH_BG__
void mmi_applist_draw_icon_bg_in_cache(void);
#else
void mmi_applist_add_shake_anima(U32 cur_time);
void mmi_applist_remove_shake_anima(void);
#endif
void mmi_applist_draw_panel(void);
void mmi_applist_draw_app_download_icon_in_cache(void);
void mmi_applist_draw_indicator_in_cache(void);
#ifdef __MMI_APPLIST_APP_UNINSTALL_SUPPORT__
void mmi_applist_draw_app_uninstall_icon_in_cache(void);
#endif
#ifdef __MMI_APPLIST_KEY_SUPPORT__
void mmi_applist_draw_highlight_frame_in_cache(void);
#ifdef __MMI_APPLIST_ONLY_ICON_SUPPORT__
void mmi_applist_draw_title(void);
#endif /* __MMI_APPLIST_ONLY_ICON_SUPPORT__ */
#endif //__MMI_APPLIST_KEY_SUPPORT__
#endif /* __MMI_LAUNCHER_APP_LIST__ */
#endif /* _MMI_APPLIST_DRAW_H_ */