⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmiunitconversion.c

📁 是一个手机功能的模拟程序
💻 C
📖 第 1 页 / 共 5 页
字号:
/*******************************************************************************

					CONDAT (UK)

********************************************************************************                                                                              

 This software product is the property of Condat (UK) Ltd and may not be
 disclosed to any third party without the express permission of the owner.                                 
                                                                              
********************************************************************************

 $Project name:	Basic MMI                                                      
 $Project code:	BMI (6349)                                                           
 $Module:		timer
 $File:		    MmiUnitConversion.c
 $Revision:		1.0                                                       
                                                                              
 $Author:		Condat(UK)                                                         
 $Date:		    25/10/00                                                      
                                                                               
********************************************************************************
                                                                              
 Description

    This provides the unit converting functionality

  
********************************************************************************
 $History: MmiToolkit.c

	25/10/00			Original Condat(UK) BMI version.
	06/09/02            gdy add
	   
 $End

*******************************************************************************/

/******************************************************************************
                                                                              
                                Include Files
                                                                              
*******************************************************************************/
#define ENTITY_MFW

/* includes */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#if defined (NEW_FRAME)

#include "typedefs.h"
#include "vsi.h"
#include "pei.h"
#include "custom.h"
#include "gsm.h"

#else

#include "stddefs.h"
#include "custom.h"
#include "gsm.h"
#include "vsi.h"

#endif
#include "MmiBookShared.h"
#include "MmiEditor.h"
#include "MmiEditor.h"
#include "Mfw_edt.h"
#include "MmiDialogs.h"


#include "p_sim.h"

#include "mfw_mfw.h"
#include "mfw_win.h"
#include "mfw_edt.h"
#include "mfw_tim.h"
#include "mfw_phb.h"
#include "ksd.h"
#include "psa.h"
#include "mfw_icn.h"
#include "mfw_mnu.h"
#include "mfw_lng.h"
#include "mfw_sat.h"
#include "mfw_kbd.h"
#include "mfw_nm.h"
#include "mfw_sms.h"

#include "dspl.h"

#include "MmiMmi.h"
#include "MmiDummy.h"
#include "MmiDialogs.h"
#include "MmiLists.h"
#include "MmiIdle.h"
#include "MmiSoftkeys.h"
#include "MmiIcons.h"
#include "MmiMenu.h"
#include "MmiMain.h"
#include "MmiStart.h"
#include "MmiPins.h"
#include "MmiSettings.h"

#include "MmiEditor.h"
#include "MmiBookShared.h"
#include "MmiSmsMenu.h"
#include "Mmieditor.h"
#include "Mmieditor_i.h"
#include "Mmisounds.h"
#include "Mmilists.h"
#include "Mmitoolkit.h"
#include "Mmitimedate.h"
//#include "BmiEastAPI.h"
#include "GameDisplay.h"

#include "gdi.h"
#include "Audio.h"
#include "MmiSounds.h"
#include "MmiResources.h"

#include "cus_aci.h"
#include "p_sim.h"
#include "pcm.h"
#include "..\bmi\icons\ToolKitIcn.h"
#include "MmiUnitConversion.h"
/******************************************************************************
                                                                              
                                                                                                              
*******************************************************************************/
#define MAX_CHANGE_VALUE 99999999
#define MAX_STRING_LENGTH 15
static BOOL pointflag=FALSE;
static BOOL afterpointflag=FALSE;
static int afterpointcount1=0;
extern const unsigned char left_right[];

static const char SoftLeft_key_bmp[]={
0xff,0xff,0xbf,0xff,0x7f,0xff,0x5f,0xff,0x5f,0xff,0x5f,0xff,0x7f,0xff,0x7f,0xff,0x9f,0xff,0xbf,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,
0x1f,0xff,0x1f,0xff,0x1f,0xff,0x3f,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xfe,0xdf,0xfe,0xdf,0xfe,0xdf,0xfe,
0xdf,0xfe,0xdf,0xfe,0xdf,0xfe,0xdf,0xfe,0xdf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,0x1b,0xed,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x1b,0xed,0x1b,0xed,0x1b,0xed,0x1b,0xed,0x1b,0xed,0x1b,0xed,0x1b,0xed,0x1b,0xed,0x7d,0xef,0x9e,0xf7,0xbe,0xf7,
0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0xbb,0xed,0xba,0xe4,0xba,0xe4,0xba,0xe4,0xba,0xe4,0xba,0xe4,
0xba,0xe4,0xba,0xe4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xba,0xe4,0xba,0xe4,0xba,0xe4,0xba,0xe4,0xba,0xe4,
0xba,0xe4,0xba,0xe4,0x3c,0xe7,0x7d,0xef,0x9e,0xf7,0xdf,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0x9e,0xf7,0xfb,0xe5,
0x59,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x39,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0x39,0xdc,0xb9,0xdc,0x1c,0xe7,0x7d,0xef,0xbe,0xf7,0xdf,0xff,0xff,0xff,
0xff,0xff,0xdf,0xff,0xbe,0xf7,0x7d,0xef,0x9b,0xe6,0x78,0xd4,0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,
0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,0xff,0xff,0xff,0xff,0xff,0xff,0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,0xd8,0xd3,0xba,0xd6,
0x1c,0xe7,0x7d,0xef,0xbe,0xf7,0xdf,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0x9e,0xf7,0x5d,0xef,0x1c,0xe7,0x79,0xd5,0xd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,0xdf,0xff,0xbe,0xf7,0x9e,0xf7,0x5d,0xef,0x1c,0xe7,0xdb,0xde,0xba,0xd6,0x79,0xce,0x38,0xc6,0xf7,0xbd,
0xd7,0xbd,0x96,0xb5,0x96,0xb5,0x75,0xad,0x96,0xb5,0x96,0xb5,0xf7,0xbd,0x38,0xc6,0xba,0xd6,0x3c,0xe7,0x9e,0xf7,0xdf,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0x9e,0xf7,0x9e,0xf7,0x5d,0xef,
0x3c,0xe7,0xfb,0xde,0xdb,0xde,0x9a,0xd6,0x79,0xce,0x38,0xc6,0x18,0xc6,0x18,0xc6,0x18,0xc6,0x38,0xc6,0x79,0xce,0xba,0xd6,
0x1c,0xe7,0x7d,0xef,0xbe,0xf7,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xdf,0xff,0xbe,0xf7,0xbe,0xf7,0x9e,0xf7,0x7d,0xef,0x5d,0xef,0x3c,0xe7,0x1c,0xe7,0xfb,0xde,0xdb,0xde,0xdb,0xde,
0xdb,0xde,0xdb,0xde,0x1c,0xe7,0x3c,0xe7,0x7d,0xef,0xbe,0xf7,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0xbe,0xf7,0xbe,0xf7,0x9e,0xf7,
0x7d,0xef,0x7d,0xef,0x5d,0xef,0x5d,0xef,0x5d,0xef,0x5d,0xef,0x7d,0xef,0x9e,0xf7,0xbe,0xf7,0xdf,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0xbe,0xf7,0xbe,0xf7,0xbe,0xf7,0xbe,0xf7,0xbe,0xf7,0xdf,0xff,0xdf,0xff,
0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};

static const char blue_left_bmp[]={
0xff,0xdf,0xff,0xdf,0xff,0xdf,0x1f,0x03,0xff,0xdf,0xff,0xdf,0x1f,0x03,0x1f,0x03,0xff,0xdf,0x1f,0x03,0x1f,0x03,0x1f,0x03,
0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0xff,0xdf,0x1f,0x03,0x1f,0x03,0x1f,0x03,
0xff,0xdf,0xff,0xdf,0x1f,0x03,0x1f,0x03,0xff,0xdf,0xff,0xdf,0xff,0xdf,0x1f,0x03
};

static const char blue_right_bmp[]={
0x1f,0x03,0xff,0xdf,0xff,0xdf,0xff,0xdf,0x1f,0x03,0x1f,0x03,0xff,0xdf,0xff,0xdf,0x1f,0x03,0x1f,0x03,0x1f,0x03,0xff,0xdf,
0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0xff,0xdf,
0x1f,0x03,0x1f,0x03,0xff,0xdf,0xff,0xdf,0x1f,0x03,0xff,0xdf,0xff,0xdf,0xff,0xdf
};

static const char yellow_left_bmp[]={
0xfb,0xff,0xfb,0xff,0xfb,0xff,0x1f,0x03,0xfb,0xff,0xfb,0xff,0x1f,0x03,0x1f,0x03,0xfb,0xff,0x1f,0x03,0x1f,0x03,0x1f,0x03,
0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0xfb,0xff,0x1f,0x03,0x1f,0x03,0x1f,0x03,
0xfb,0xff,0xfb,0xff,0x1f,0x03,0x1f,0x03,0xfb,0xff,0xfb,0xff,0xfb,0xff,0x1f,0x03
};

static const char yellow_right_bmp[]={
0x1f,0x03,0xfb,0xff,0xfb,0xff,0xfb,0xff,0x1f,0x03,0x1f,0x03,0xfb,0xff,0xfb,0xff,0x1f,0x03,0x1f,0x03,0x1f,0x03,0xfb,0xff,
0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0x1f,0x03,0xfb,0xff,
0x1f,0x03,0x1f,0x03,0xfb,0xff,0xfb,0xff,0x1f,0x03,0xfb,0xff,0xfb,0xff,0xfb,0xff
};

int conversion(MfwMnu* m, MfwMnuItem* i);
static T_MFW_HND conversion_create(MfwHnd parent_window);
static int  conversion_win_cb (T_MFW_EVENT event, T_MFW_WIN * win);
void conversionDisplay(convertdata* data);
static void conversion_DialogCB(T_MFW_HND win, USHORT event,  SHORT value, void * parameter);
static int conversion_kbd_cb (MfwEvt e, MfwKbd *kc);
void conversion_destroy (T_MFW_HND own_window);
double change(char* s);
int handle(char* s);



int conversion(MfwMnu* m, MfwMnuItem* i)
{
   T_MFW_HND	    	parent_win = mfwParent( mfw_header());
   T_MFW_HND       	win    = conversion_create(parent_win);
    
		
   if (win NEQ NULL)
      {
       	SEND_EVENT (win, CONVERT_INIT, 0, 0);
      } 
  
   return MFW_EVENT_CONSUMED;
}

static T_MFW_HND conversion_create(MfwHnd parent_window)
{
	convertdata     * data = (convertdata *)ALLOC_MEMORY (sizeof (convertdata));
	T_MFW_WIN  * win;
	
    
      TRACE_EVENT("conversion_create");
	if (data EQ NULL)
	{
		return NULL;
	}

	// Create window handler
	data->win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)conversion_win_cb);
	if (data->win EQ NULL)
	{
		
		return NULL;
	}
	// connect the dialog data to the MFW-window
	data->mmi_control.dialog = (T_DIALOG_FUNC)conversion_DialogCB;
	data->mmi_control.data   = data;
	win                      = ((T_MFW_HDR *)data->win)->data;
	win->user                = (void *)data;
	data->parent_win         = parent_window;

	winShow(data->win);
	return data->win;
}


static int  conversion_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
{
    convertdata* data = (convertdata *)win->user;
            
    TRACE_EVENT ("conversion_win_cb()");


    if (data EQ 0)
     return 1;

    switch (event)
      {
       case E_WIN_VISIBLE:
           if (win->flags & E_WIN_VISIBLE)
            {
                  /*
                   * Clear Screen
                   */
              dspl_ClearAll();   
              conversionDisplay(data);             
           	}
              break;
         default:
              return 0;
    	}
    return 1;
}


void conversionDisplay(convertdata* data)
{  
  int old_color;
  char str[MAX_STRING_LENGTH];
  char handle_str[MAX_STRING_LENGTH];
  char string[14];
  char s[2];  
  char string1[14];
  char str1[MAX_STRING_LENGTH];  
  int i,j;
  BOOL unit2point=FALSE;
  game_Rectangle rectangle;
  game_Line line;
    
  TRACE_EVENT("conversionDisplay");
  //display title
 // if(Mmi_getCurrentLanguage()==CHINESE_LANGUAGE)
 // 	{
 // old_color=dspl_GetBkgColor();
 // dspl_SetBkgColor(0x0000ff);
 // dspl_Clear(0, 0, 120, 19);
 // PROMPT_COLOR(35, 0, 0, data->unit_id, 0xff0000);
 // dspl_BitBlt(90, 0, 28, 20, 0, (void *)Hash, 0);
 // dspl_SetBkgColor(old_color); 
  //display the second line content
  /*dspl_BitBlt( menuup[FlashSettingData.theme].area.px,menuup[FlashSettingData.theme].area.py,
      menuup[FlashSettingData.theme].area.sx,menuup[FlashSettingData.theme].area.sy,
      menuup[FlashSettingData.theme].nIcons,menuup[FlashSettingData.theme].icons,0);*/
  DRAW_ICON(ICON_MENUUP);
  if(Mmi_getCurrentLanguage()==CHINESE_LANGUAGE)
	  dspl_colorTextOut(28,0,DSPL_TXTATTR_TRANSPARENT,MmiRsrcGetText(TxtConversion),0xffffff);
  else
	  dspl_colorTextOut(0,0,DSPL_TXTATTR_TRANSPARENT,MmiRsrcGetText(TxtConversion),0xffffff);  	  
  dspl_BitBlt(5, 29, 28, 20, 0, (void *)SoftLeft_key_bmp, 0);
  rectangle.x1=33;
  rectangle.y1=26;
  rectangle.x2=73;
  rectangle.y2=49;
  rectangle.color=0xf8e0ee;
  rectangle.fillcolor=0xf8e0ee;
  DrawRectagle(rectangle);
  rectangle.x1=33;
  rectangle.y1=26;
  rectangle.x2=33;
  rectangle.y2=49;
  rectangle.color=0x95668a;
  rectangle.fillcolor=0x95668a;
  DrawRectagle(rectangle);
  rectangle.x1=34;
  rectangle.y1=25;
  rectangle.x2=72;
  rectangle.y2=25;
  rectangle.color=0x95668a;
  rectangle.fillcolor=0x95668a;
  DrawRectagle(rectangle);
  rectangle.x1=34;
  rectangle.y1=50;
  rectangle.x2=72;
  rectangle.y2=50;
  rectangle.color=0xcdaac5;
  rectangle.fillcolor=0xcdaac5;
  DrawRectagle(rectangle);
  rectangle.x1=73;
  rectangle.y1=26;
  rectangle.x2=73;
  rectangle.y2=49;
  rectangle.color=0xcdaac5;
  rectangle.fillcolor=0xcdaac5;
  DrawRectagle(rectangle);
  if(Mmi_getCurrentLanguage()==ENGLISH_LANGUAGE)
  	{
  	set_font_type(UNI12X12_FONT);  	
    dspl_TextOut(34+(38-6*wstrBitlen(MmiRsrcGetText(data->unit_id)))/2,32,DSPL_TXTATTR_TRANSPARENT,MmiRsrcGetText(data->unit_id));
  	}
  else
  	{
  	dspl_TextOut(30+(38-6*wstrBitlen(MmiRsrcGetText(data->unit_id)))/2,30,DSPL_TXTATTR_TRANSPARENT,MmiRsrcGetText(data->unit_id));
  	}
#if(MAIN_LCD_SIZE==3)
  dspl_BitBlt(86,28, 28, 20, 0, (void *)Hash, 0);    
#endif
  memset((char*)str,0,sizeof(str)); 
  memset((char*)string,0,sizeof(string));
  memset((char*)string1,0,sizeof(string1));
 // strcpy((char*)s,":");
  switch(data->unit_type)
  	{
  	case LENGTH:  
  		 if(Mmi_getCurrentLanguage()==CHINESE_LANGUAGE)
  	        {
             switch(data->unit1.unit)
     	      {  	       
        	   	case METER:
                  strcpy((char*)string,"\x80\x7c\x73\x00\x00");//米
                  break;
                case DECIMETER:
        	      strcpy((char*)string,"\x80\x52\x06\x7c\x73\x00\x00");//分米
                  break;
                case CENTIMETER:
        	      strcpy((char*)string,"\x80\x53\x98\x7c\x73\x00\x00");//厘米
        	      break;
                case MILLIMETER:
        	      strcpy((char*)string,"\x80\x6b\xeb\x7c\x73\x00\x00");//毫米
        	      break;
                case INCH:
        	      strcpy((char*)string,"\x80\x82\xf1\x5b\xf8\x00\x00");//英寸
        	      break;
                case FOOT:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -