267 lines
8.0 KiB
C
267 lines
8.0 KiB
C
/* Copyright Statement:
|
|
*
|
|
* This software/firmware and related documentation ("MediaTek Software") are
|
|
* protected under relevant copyright laws. The information contained herein is
|
|
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
|
|
* the prior written permission of MediaTek inc. and/or its licensors, any
|
|
* reproduction, modification, use or disclosure of MediaTek Software, and
|
|
* information contained herein, in whole or in part, shall be strictly
|
|
* prohibited.
|
|
*
|
|
* MediaTek Inc. (C) 2010. All rights reserved.
|
|
*
|
|
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
|
|
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
|
|
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
|
|
* 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 RECEIVER AGREES
|
|
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
|
|
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
|
|
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
|
|
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
|
|
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
|
|
* STANDARD OR OPEN FORUM. RECEIVER'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 RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
|
|
*
|
|
* The following software/firmware and/or related documentation ("MediaTek
|
|
* Software") have been modified by MediaTek Inc. All revisions are subject to
|
|
* any receiver's applicable license agreements with MediaTek Inc.
|
|
*/
|
|
|
|
#ifndef _SHOW_ANIMATION_COMMON_H
|
|
#define _SHOW_ANIMATION_COMMON_H
|
|
|
|
#include "charging_animation.h"
|
|
#include "show_logo_common.h"
|
|
#include "decompress_common.h"
|
|
#include "cust_display.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
int logonum;
|
|
unsigned int logolen;
|
|
uint64_t inaddr;
|
|
} LOGO_PARA_T;
|
|
|
|
/********** show_animationm_ver: charging animation version ************/
|
|
/* */
|
|
/* version 0: show 4 recatangle growing animation without battery number */
|
|
/* version 1: show wave animation with battery number */
|
|
/* version 2: show wireless charging animation */
|
|
/* */
|
|
/*** ***/
|
|
#define MAX_SUPPORT_ANIM_VER 2
|
|
|
|
#define VERION_OLD_ANIMATION 0
|
|
#define VERION_NEW_ANIMATION 1
|
|
#define VERION_WIRELESS_CHARGING_ANIMATION 2
|
|
|
|
// version_0 animation
|
|
#define ANIM_V0_REGIONS 4
|
|
#define ANIM_V0_SPACE_AFTER_REGION 4
|
|
|
|
struct charging_anim_ui_dimension
|
|
{
|
|
int cap_left;
|
|
int cap_top;
|
|
int cap_right;
|
|
int cap_bottom;
|
|
int num_left;
|
|
int num_top;
|
|
int num_right;
|
|
int num_bottom;
|
|
int percent_left;
|
|
int percent_top;
|
|
int percent_right;
|
|
int percent_bottom;
|
|
int top_anim_left;
|
|
int top_anim_top;
|
|
int top_anim_right;
|
|
int top_anim_bottom;
|
|
int bar_left;
|
|
int bar_top;
|
|
int bar_right;
|
|
int bar_bottom;
|
|
int num_width_fast;
|
|
int num_height_fast;
|
|
int top_margin_fast;
|
|
};
|
|
|
|
// Enum for LCD
|
|
enum lcd_name_by_res{
|
|
//LCD enum to used to access elements in logo parameter table
|
|
//lower resolution
|
|
RES_240_240,
|
|
RES_320_480,
|
|
// QHD resolution
|
|
QHD_382_720,
|
|
// WVGA resolution
|
|
WVGA_480_800,
|
|
WVGA_480_854,
|
|
WVGA_480_960,
|
|
WVGA_540_960,
|
|
// HD resolution
|
|
HD_600_1024,
|
|
HD_720_1280,
|
|
HD_720_1440,
|
|
HD_720_1500,
|
|
HD_720_1520,
|
|
HD_720_1560,
|
|
HD_720_1600,
|
|
HD_768_1024,
|
|
HD_800_1280,
|
|
HD_1024_600,
|
|
HD_1056_1068,
|
|
HD_1280_800,
|
|
// FHD resolution
|
|
FHD_1080_1920,
|
|
FHD_1080_2160,
|
|
FHD_1080_2280,
|
|
FHD_1080_2300,
|
|
FHD_1080_2340,
|
|
FHD_1080_2400,
|
|
FHD_1080_2408,
|
|
FHD_1080_2412,
|
|
FHD_1080_2460,
|
|
FHD_1080_2520,
|
|
FHD_1080_2550,
|
|
FHD_1080_2640,
|
|
FHD_1200_1920,
|
|
FHD_1200_2000,
|
|
FHD_1220_2712,
|
|
FHD_1260_2800,
|
|
FHD_1440_2560,
|
|
FHD_1440_3200,
|
|
FHD_1440_3216,
|
|
FHD_1920_1200,
|
|
// WQHD resolution
|
|
WQHD_2000_2296,
|
|
WQHD_2296_2000,
|
|
WQHD_2560_1536,
|
|
WQHD_2944_1840,
|
|
WQHD_3000_1876,
|
|
// End of Enum
|
|
TOTAL_LCD_RES
|
|
};
|
|
//enum for logo parameters
|
|
enum logo_params{
|
|
//club same params - same in many
|
|
//capacity - fill area inside logo
|
|
CAP_LEFT,
|
|
CAP_RIGHT,
|
|
//number - depicting charge percentage
|
|
NUM_LEFT,
|
|
NUM_RIGHT,
|
|
//percentage - symbol drawn after number
|
|
PERCENT_LEFT,
|
|
PERCENT_RIGHT,
|
|
//top - top of battery picture
|
|
TOP_ANIM_LEFT,
|
|
TOP_ANIM_RIGHT,
|
|
//bar - small rectangle just below number & percentage
|
|
BAR_LEFT,
|
|
BAR_TOP,
|
|
BAR_RIGHT,
|
|
BAR_BOTTOM,
|
|
//fast charge animation parameters
|
|
NUM_WIDTH_FAST,
|
|
NUM_HEIGHT_FAST,
|
|
TOP_MARGIN_FAST,
|
|
//club different param
|
|
CAP_TOP,
|
|
CAP_BOTTOM,
|
|
NUM_TOP,
|
|
NUM_BOTTOM,
|
|
PERCENT_TOP,
|
|
PERCENT_BOTTOM,
|
|
TOP_ANIM_TOP,
|
|
TOP_ANIM_BOTTOM,
|
|
//charging animation logo parameters end
|
|
TOTAL_LOGO_PARAM
|
|
};
|
|
// enum for logo dimensions - index of lcd_info_array[][]
|
|
enum lcd_info_array_enum{
|
|
LCD_WIDTH,
|
|
LCD_HEIGHT,
|
|
LCD_RES_ENUM_NAME,
|
|
TOTAL_LOGO_DIMENSIONS
|
|
};
|
|
|
|
int get_actual_logo_index(int index);
|
|
void init_charging_animation_ui_dimension();
|
|
int getValue(char* key, char* defValue);
|
|
|
|
void fill_animation_logo(int index, void *fill_addr,
|
|
void *dec_logo_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen);
|
|
|
|
void fill_animation_prog_bar(RECT_REGION_T rect_bar,
|
|
unsigned int fgColor,
|
|
unsigned int start_div, unsigned int occupied_div,
|
|
void *fill_addr, LCM_SCREEN_T phical_screen);
|
|
|
|
void fill_animation_dynamic(int index, RECT_REGION_T rect,
|
|
void *fill_addr,
|
|
void *dec_logo_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen);
|
|
void fill_animation_number(int index, unsigned int number_position,
|
|
void *fill_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen);
|
|
|
|
void fill_animation_line(int index, unsigned int capacity_grids,
|
|
void *fill_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen);
|
|
|
|
void fill_animation_battery_old(int capacity,
|
|
void *fill_addr,
|
|
void *dec_logo_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen);
|
|
|
|
void fill_animation_battery_new( int capacity,
|
|
void *fill_addr,
|
|
void *dec_logo_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen);
|
|
|
|
void fill_animation_battery_wireless_charging(int capacity,
|
|
void *fill_addr,
|
|
void *dec_logo_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen);
|
|
|
|
void fill_animation_battery_fast_charging(int capacity,
|
|
void *fill_addr,
|
|
void *dec_logo_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen,
|
|
int draw_anim_mode);
|
|
|
|
/* public interface function */
|
|
void fill_animation_battery_by_ver(int capacity,
|
|
void *fill_addr,
|
|
void *dec_logo_addr,
|
|
void *logo_addr,
|
|
LCM_SCREEN_T phical_screen,
|
|
int version);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|