unitconvertor.h
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:10k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * 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:
- * ---------
- * Unitconvertor.h
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file defines struct, enum, and function prototypes of Unit Convertor application.
- *
- * 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!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *==============================================================================
- *******************************************************************************/
- /**
- * Copyright Notice
- * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
- * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
- * (It is illegal to remove this copyright notice from this software or any
- * portion of it)
- */
- /**********************************************************************************
- Filename: unitconvertor.h
- Author: Vandana M
- Date Created: July-14-2003
- Contains: Unitconvertor
- **********************************************************************************/
- #ifndef __MMI_UNITCONVERTOR_H
- #define __MMI_UNITCONVERTOR_H
- #include "MMI_features.h"
- #if defined (__MMI_UNIT_CONVERTER__) || defined (__MMI_EXTENDED_UNIT_CONVERTER__)
- #include "PixtelDataTypes.h"
- /*
- * Define
- */
- /*
- * Typedef
- */
- typedef enum
- {STR_UNITCONVERTOR_WEIGHT = UNIT_CONVERTER + 1,
- STR_UNITCONVERTOR_LENGTH,
- STR_UNITCONVERTOR_CAPTION,
- STR_UNITCONVERTOR_CAPTION1,
- STR_ID_UNITCONVERTOR_RESET,
- #ifndef __MMI_EXTENDED_UNIT_CONVERTER__
- STR_UNITCONVERTOR_KGPOUND,
- STR_UNITCONVERTOR_KG,
- STR_UNITCONVERTOR_POUND,
- STR_UCONV_OUNCE,
- STR_UCONV_KGOUNCE,
- STR_UNITCONVERTOR_KMMILE,
- STR_UNITCONVERTOR_MYARD,
- STR_UNITCONVERTOR_MFOOT,
- STR_UNITCONVERTOR_CMINCH,
- STR_UNITCONVERTOR_KM,
- STR_UNITCONVERTOR_METER,
- STR_UNITCONVERTOR_CM,
- STR_UNITCONVERTOR_MILE,
- STR_UNITCONVERTOR_YARD,
- STR_UNITCONVERTOR_FOOT,
- STR_UNITCONVERTOR_INCH,
- #else /* __MMI_EXTENDED_UNIT_CONVERTER__ */
- STR_ID_UNITCONVERTOR_VOLUME,
- STR_ID_UNITCONVERTOR_MILLILITER,
- STR_ID_UNITCONVERTOR_LITER,
- STR_ID_UNITCONVERTOR_CUBICMM,
- STR_ID_UNITCONVERTOR_CUBICCM,
- STR_ID_UNITCONVERTOR_CUBICMETER,
- STR_ID_UNITCONVERTOR_CUBICINCH,
- STR_ID_UNITCONVERTOR_GALLON,
- STR_ID_UNITCONVERTOR_LIQPT,
- STR_ID_UNITCONVERTOR_LIQOZ,
- STR_ID_UNITCONVERTOR_FLOZ,
- STR_ID_UNITCONVERTOR_BARREL,
- STR_ID_UNITCONVERTOR_TEMPERATURE,
- STR_ID_UNITCONVERTOR_CELSIUS,
- STR_ID_UNITCONVERTOR_FAHRENHEIT,
- STR_ID_UNITCONVERTOR_VELOCITY,
- STR_ID_UNITCONVERTOR_KMH,
- STR_ID_UNITCONVERTOR_METERSEC,
- STR_ID_UNITCONVERTOR_MPH,
- STR_ID_UNITCONVERTOR_FEETSEC, /* Autumn { *//* Sophie { */
- STR_ID_UNITCONVERTOR_LENGTH_MM,
- STR_ID_UNITCONVERTOR_LENGTH_CM,
- STR_ID_UNITCONVERTOR_LENGTH_M,
- STR_ID_UNITCONVERTOR_LENGTH_KM,
- STR_ID_UNITCONVERTOR_LENGTH_INCH,
- STR_ID_UNITCONVERTOR_LENGTH_FEET,
- STR_ID_UNITCONVERTOR_LENGTH_YARD,
- STR_ID_UNITCONVERTOR_LENGTH_MILES,
- STR_ID_UNITCONVERTOR_WEIGHT_MG,
- STR_ID_UNITCONVERTOR_WEIGHT_G,
- STR_ID_UNITCONVERTOR_WEIGHT_KG,
- STR_ID_UNITCONVERTOR_WEIGHT_TON,
- STR_ID_UNITCONVERTOR_WEIGHT_OUNCE,
- STR_ID_UNITCONVERTOR_WEIGHT_POUND,
- STR_ID_UNITCONVERTOR_SHOES,
- STR_ID_UNITCONVERTOR_SHOES_USA,
- STR_ID_UNITCONVERTOR_SHOES_EUROPE,
- STR_ID_UNITCONVERTOR_SHOES_KOREA,
- STR_ID_UNITCONVERTOR_CLOTHES,
- STR_ID_UNITCONVERTOR_CLOTHES_EUROPE,
- STR_ID_UNITCONVERTOR_CLOTHES_KOREA1,
- STR_ID_UNITCONVERTOR_CLOTHES_KOREA2,
- STR_ID_UNITCONVERTOR_CLOTHES_JAPAN,
- STR_ID_UNITCONVERTOR_CLOTHES_USA,
- STR_ID_UNITCONVERTOR_CLOTHES_UK,
- STR_ID_UNITCONVERTOR_SURFACE,
- STR_ID_UNITCONVERTOR_SURFACE_ACRE,
- STR_ID_UNITCONVERTOR_SURFACE_HECTARE,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_MM,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_CM,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_M,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_KM,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_IN,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_FEET,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_YD,
- STR_ID_UNITCONVERTOR_SURFACE_SQUARE_MILES,
- UC_ERROR_UNCORRECT_INPUT,
- #endif /* __MMI_EXTENDED_UNIT_CONVERTER__ */
- UC_ERROR_EMPTY_STRING,
- EXTRA_MENU_UNITSCONVERTOR_STRINGID
- } STR_ID_UCONV_ENUM;
- typedef enum
- {
- SCR_ID_UCONV_MENU = UNIT_CONVERTER + 1, /* do not change order */
- SCR_ID_UCONV_WEIGHT, /* do not change order */
- SCR_ID_UCONV_LENGTH /* do not change order */
- #ifdef __MMI_EXTENDED_UNIT_CONVERTER__
- , SCR_ID_UCONV_VOLUME,
- SCR_ID_UCONV_TEMPERATURE,
- SCR_ID_UCONV_VELOCITY,
- SCR_ID_UCONV_SHOES,
- SCR_ID_UCONV_CLOTHES,
- SCR_ID_UCONV_SURFACE
- #endif /* __MMI_EXTENDED_UNIT_CONVERTER__ */
- } SCR_ID_UCONV_ENUM;
- typedef enum
- {
- EXTRA_MENU_UNITSCONVERTOR_IMAGEID = UNIT_CONVERTER + 1,
- IMG_ID_UNITCONVERTOR_RESET
- } IMG_ID_UCONV_ENUM;
- typedef enum
- {
- UCONV_UNIT = 0,
- UCONV_METRIC_CAP, /* metric caption */
- UCONV_METIRC, /* metric */
- UCONV_ENG_CAP, /* English caption */
- UCONV_ENG, /* English */
- UCONV_INLINE_TOTAL
- } UCONV_INLINE_ITEM_ENUM;
- typedef enum
- {
- UCONV_CAPTION = 0,
- UCONV_UNIT1,
- UCONV_INPUT1,
- UCONV_UNIT2,
- UCONV_RESULT,
- UCONV_INLINE_TOTAL2
- } UCONV_INLINE_ITEM_ENUM2;
- typedef enum
- {
- UCONV_WEIGHT = 0,
- UCONV_LENGTH
- #ifdef __MMI_EXTENDED_UNIT_CONVERTER__
- ,
- UCONV_VOLUME,
- UCONV_TEMPERATURE,
- UCONV_VELOCITY,
- UCONV_SHOES,
- UCONV_CLOTHES,
- UCONV_SURFACE
- #endif /* __MMI_EXTENDED_UNIT_CONVERTER__ */
- } UCONV_UNIT_TYPE;
- /*
- * Extern Global Variable
- */
- /*
- * Extern Global Function
- */
- extern void UconvInit(void);
- extern void UconvDeInit(void);
- extern void EntryUConvMenu(void);
- extern void UConvCustomInlineFunction(void);
- extern void HighlightUconvMenu(void);
- #ifdef __MMI_EXTENDED_UNIT_CONVERTER__
- extern void mmi_uconv_goto_compute_screen_lg(void);
- extern void mmi_uconv_exit_compute_lg(void);
- extern void mmi_uconv_entry_compute_lg(void);
- extern void mmi_uconv_highlight_inline_item_lg(S32 nIndex);
- extern void mmi_uconv_highlight_inline_select1(S32 index);
- extern void mmi_uconv_highlight_inline_select2(S32 index);
- extern void mmi_uconv_compute_result(U8 *text, U8 *cursor, S32 text_length);
- extern void mmi_uconv_compute_temperature_result(U8 *text, U8 *cursor, S32 text_length);
- extern void mmi_uconv_compute_shoes_result(void);
- extern void mmi_uconv_compute_clothes_result(void);
- extern void mmi_uconv_verify_shoes_input(U16 *input);
- extern void mmi_uconv_verify_clothes_input(U16 *input);
- #else /* __MMI_EXTENDED_UNIT_CONVERTER__ */
- extern void HighlightUConvInlineLenghSelect(S32 index);
- extern void ComputeLengthResult(void);
- extern void UConvGoToComputeScreen(void);
- extern void EntryUConvCompute(void);
- extern void HighlightUConvInlineItem(S32 nIndex);
- extern void HighlightUConvInlineWeightSelect(S32 index);
- #endif /* __MMI_EXTENDED_UNIT_CONVERTER__ */
- #endif /* defined (__MMI_UNIT_CONVERTER__) || defined (__MMI_EXTENDED_UNIT_CONVERTER__) */ /* __MMI_UNITCONVERTOR_H */
- #endif /* __MMI_UNITCONVERTOR_H */