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

📄 mmiicons.c

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

 $Arguments:	iconId, the id of the icon to be deleted
 
*******************************************************************************/

void iconsDeleteState( int iconId )
{
    TRACE_FUNCTION("iconsDeleteState()");
    /* Only set the state if the iconId is valid, ie in range
    */
    if( ( iconId >= 0 ) && ( iconId < idlIdMax ) )
    {
        state[iconId].state = ICON_INVISIBLE;

        //2004/03/11 Sunny add
        state_Outer[iconId].state = ICON_INVISIBLE;     
        //2004/03/11 Sunny add end
    }
}




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

 $Function:    	iconsShow

 $Description:	Show the current set of icons on the display
 
 $Returns:		None

 $Arguments:	None
 
*******************************************************************************/

void iconsShow( void )
{
    /*2003/11/13,talcon modify */
    drawIdelIcons();

}



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

 $Function:    	iconsShowBattery

 $Description:	Show battery status icons
 
 $Returns:		0 if error detected, otherwise 1

 $Arguments:	batterystatus, the current battery icon to be displayed
 
*******************************************************************************/

int iconsShowBattery( U8 batterystatus )
{
    int i;

    /* If we have an error, ie invalid id then return 0
    */
    if( ( batterystatus < 0 ) || ( batterystatus >= iconBattMax ) )
        return 0;

    /* Otherwise clear all of the battery icons, and then set the
       selected value to be visible
    */
    for( i = 0; i < iconBattMax; i++ )
        battstate[ i ].state = ICON_INVISIBLE;
    battstate[ batterystatus ].state = ICON_VISIBLE;

    /* and display the current selection
    */
    icnShow( battstate[ batterystatus ].h );

    return 1;
}

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

 $Function:    	iconShowGoodbye

 $Description:	
 
 $Returns:		

 $Arguments:	
 
*******************************************************************************/

void iconShowGoodbye( void)
{
    //	iconsShowIcon( &state[ iconGoodbye ] );
}


/* 2004/06/15 sunsj modify */
/*******************************************************************************

 $Function:    	iconsShowSignal

 $Description:	Shows the signal status icons
 
 $Returns:		0 if error detected, otherwise 1

 $Arguments:	signalstatus, the current signal icon to be displayed
 
*******************************************************************************/

int iconsShowSignal (U8 signalstatus)
{
    if( signalstatus <0 )
    {
        /* 2004/06 sunsj modify for picture manage */
        DRAW_ICON_MASK(ICON_IDLESIGNAL,0);
        //drawIconByIcnAttr((MfwIcnAttr*)&sign_Attr[0],(MfwIcnAttr*)&signMask_Attr[0]);		
    }
    else if( signalstatus >= iconSignalMax )
    {
        /* 2004/06 sunsj modify for picture manage */
        DRAW_ICON_SEL_MASK(ICON_IDLESIGNAL, iconSignalMax-1);
        //drawIconByIcnAttr((MfwIcnAttr*)&sign_Attr[iconSignalMax -1],(MfwIcnAttr*)&signMask_Attr[iconSignalMax -1]);				
    }
    else
    {
        /* 2004/06 sunsj modify for picture manage */
        DRAW_ICON_SEL_MASK(ICON_IDLESIGNAL, (unsigned char)signalstatus);
        //drawIconByIcnAttr((MfwIcnAttr*)&sign_Attr[signalstatus],(MfwIcnAttr*)&signMask_Attr[signalstatus]);
    }

    return 1;
}
/****************************
$Description:外屏
2004/05/21 yhf modify for outeridle
*************************************************************/
int iconsShowSignal_Sub (U8 signalstatus)
{
    //2004-03-21 Sunny remove
    //if ( ( signalstatus < 0 ) || ( signalstatus >= iconSignalMax ) )
    //return 0;

    /* 2004/06 sunsj modify for picture manage */
    if( signalstatus < 0 )
    {
        DRAW_ICON_SEL_MASK(ICON_OUTERSIGNAL, 0);
        //drawIconByIcnAttr((MfwIcnAttr*)&outersign_Attr[0],(MfwIcnAttr*)&outersignMask_Attr[0]);		
    }
    else if( signalstatus >= iconSignalMax )
    {
        DRAW_ICON_SEL_MASK(ICON_OUTERSIGNAL, iconSignalMax -1);
        //drawIconByIcnAttr((MfwIcnAttr*)&outersign_Attr[iconSignalMax -1],(MfwIcnAttr*)&outersignMask_Attr[iconSignalMax -1]);				
    }
    else
    {
        DRAW_ICON_SEL_MASK(ICON_OUTERSIGNAL, signalstatus);
    }
    return 1;
}


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

 $Function:    	iconsShowScene

 $Description:	Shows the scene mode icons
 
 $Returns:		0 if error detected, otherwise 1

 $Arguments:	scenestatus, the current scene icon to be displayed
 
*******************************************************************************/

int iconsShowScenemode (U8 scenestatus)
{
    int i;

    /* If we have an error, ie invalid id then return 0
    */
    if( ( scenestatus < 0 ) || ( scenestatus >= iconSceneMax ) )
        return 0;
    // Otherwise clear all of the scene icons, and then set the selected value to be visible
    /* 2004/06 sunsj modify for picture manage */
    DRAW_ICON_SEL_MASK(ICON_SCENE, scenestatus);
    //drawIconByIcnAttr(&scene_Attr[scenestatus],&sceneMask_Attr[scenestatus]);
#if 0	
    for( i = 0; i < iconSceneMax; i++ )
        scenestate[ i ].state = ICON_INVISIBLE;
    scenestate[ scenestatus ].state = ICON_VISIBLE;

    // and display the current selection

    icnShow( scenestate[ scenestatus ].h );
#endif   
    //xsf changed to display transparent bmp 2002.09.25
    /* switch(scenestatus)
     {
      case NORMAL_ENV:
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)normalbmp, DSPL_BMPXOR);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)normalmask,  DSPL_BMPAND);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)normalbmp, DSPL_BMPXOR);
       break;
      case OUTDOOR_ENV:
       dspl_BitBlt( 36, 2, 15, 12 0, (void *)outbmp, DSPL_BMPXOR);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)outdoormask,  DSPL_BMPAND);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)outbmp, DSPL_BMPXOR);
       break;
      case MEETING_ENV:
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)meetingbmp, DSPL_BMPXOR);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)meetingmask,  DSPL_BMPAND);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)meetingbmp, DSPL_BMPXOR);
       break;
      case INCAR_ENV:
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)incarbmp, DSPL_BMPXOR);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)incarmask,  DSPL_BMPAND);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)incarbmp, DSPL_BMPXOR);
       break;
      case MUTE_ENV:
       dspl_BitBlt( 36, 2, 15, 12, (void *)mutebmp, DSPL_BMPXOR);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)mutemask,  DSPL_BMPAND);
       dspl_BitBlt( 36, 2, 15, 12, 0, (void *)mutebmp, DSPL_BMPXOR);
       break;
      default:
       break;
      }*/
    return 1;
}


/*void iconsShowAlarmIcon()
{
     if(state[iconIdAlarm].state == ICON_VISIBLE)
        {
           dspl_BitBlt( 104, 125, 11, 12, 0, (void *)alarmBit, DSPL_BMPXOR);
           dspl_BitBlt( 104, 125, 11, 12, 0, (void *)alarmBitMask,  DSPL_BMPAND);
           dspl_BitBlt( 104, 125, 11, 12, 0, (void *)alarmBit, DSPL_BMPXOR);
        }
}*/
#if 0

void iconsShowTimerIcon()
{
    if( state[iconIdTimer].state == ICON_VISIBLE )
    {
        dspl_BitBlt( 105,  110, 12, 12, 0, (void *)TimerBit, DSPL_BMPXOR);
        dspl_BitBlt( 105,  110, 12, 12, 0, (void *)TimerBitMask,  DSPL_BMPAND);
        dspl_BitBlt( 105,  110, 12, 12, 0, (void *)TimerBit, DSPL_BMPXOR);
    }
}
#endif
/*******************************************************************************

 $Function:    	iconsShowVolume

 $Description:	Shows the melody volume's adjusting  bmp
 
 $Returns:		0 if error detected, otherwise 1

 $Arguments:	volume, the current volume to be displayed

 $Author:    xsf add for display adjust melody volume'bmp 2002.08.27
 
 $History:
 ********2003/12/02,talcon modify
 
*******************************************************************************/
int iconsShowVolume (U8 volumestatus)
{
    int i;
    // char debug[20];

    //sprintf(debug, "iconsShowVolume: %d", volumestatus);
    //TRACE_EVENT(debug);
    /* If we have an error, ie invalid id then return 0
    */
    if( ( volumestatus < 0 ) || ( volumestatus > 6 ) )
        return 0;

#if (MAIN_LCD_SIZE==3)//jhxu720
	DRAW_ICON(ICON_VOLUME_BKG);//shiheng for pic manage
	DRAW_ICON(ICON_VOLUME);
	for( i = 0; i < volumestatus; i++ )
    {
		//drawIconByIcnAttr((MfwIcnAttr*)&volume_Attr[i],NULL);
		DRAW_ICON_SEL(ICON_VOLUME_ADJUST,i);//shiheng for pic manage
    }
#elif ( MAIN_LCD_SIZE==4 )
    DRAW_ICON(ICON_VOLUME_BK);
    DRAW_ICON(ICON_VOLUME_BAR);
    //dspl_BitBlt(37, 69, 58, 57, 0, (void *)volume_icon, 0);
    //dspl_BitBlt(15, 36,  99, 12,  0, (void *)volume_process, 0);
    for( i = 0; i < volumestatus; i++ )
    {
        DRAW_ICON_LOCATION(ICON_VOLUME_RATE, 17+16*i, 38);
        //dspl_BitBlt(17+16*i, 38, 15, 8, 0, (void *)volume_play, 0);
    }

#elif ( MAIN_LCD_SIZE==2 )
    // 2004.3.18 WYJ modify
    dspl_BitBlt(0, 13, 102, 52, 0, (void *)volumeBkg , 0);
    dspl_BitBlt(3, 48, 15, 17, 0, (void *)icnVolume , 0);


    for( i = 0; i < volumestatus; i++ )
    {
        drawIconByIcnAttr((MfwIcnAttr*)&volume_Attr[i],NULL);
    }
#endif
    return 1;
}

//xsf add 2002.08.27 about adjust melody volume

/* melody volume icons    //xsf add 2002.08.27 

   */
#if 0/*2003/12/03,talcon commit it*/
void  VolumeIconInit(void)
{
    int i;
    for( i = 0; i < volumebmp; i++ )
    {
        volumestate[i].state = ICON_INVISIBLE;
        volumestate[i].h = icnCreate( 0, (MfwIcnAttr *)&volume_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsSignEvent );
    }
}
void  VolumeIconDel(void)
{  
    int i; 
    for( i = 0; i < volumebmp; i++ )
        icnDelete( volumestate[i].h );
}
#endif
/*******************************************************************************

 $Function:    	iconsInputShow

 $Description:	show current input icons
 
 $Returns:		None

 $Arguments:	IconInputId, id of icon to be displayed
 
*******************************************************************************/

void iconsInputShow (int IconInputId)
{
    CLEAR_BOTTOM_ZONE_ICON;
    //	icnShow( inputstate[ IconInputId ].h );
}


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

 $Function:    	iconsMainIconsAreaSet

 $Description:	sets the current main icons area
 
 $Returns:		None

 $Arguments:	None
 
*******************************************************************************/

void iconsMainIconsAreaSet (MfwRect selected_area)
{
#if 0/*2003/11/19,talcon comment it*/
    mainIconSimToolkit.area   =    selected_area;
    mainIconCalculator.area   = selected_area;
    mainIconSettings.area   =   selected_area;
    mainIconWAP.area      =     selected_area;
    mainIconRecentCalls.area   =   selected_area;
    mainIconSettings.area   =   selected_area;
    mainIconCallDivert.area   = selected_area;
    mainIconSecurity.area   =   selected_area;
    mainIconMessages.area   =   selected_area;
    mainIconPhonebook.area   =  selected_area;
#endif
}
/*2003/12/15,talcon delete*/

⌨️ 快捷键说明

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