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

📄 mmibookdetailswindow.c

📁 GSM手机设计软件代码
💻 C
📖 第 1 页 / 共 2 页
字号:
/*******************************************************************************

					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:		PhoneBook
 $File:		    MmiBookDetailsWindow.h
 $Revision:		1.0                                                       
                                                                              
 $Author:		Condat(UK)                                                         
 $Date:		    25/10/00                                                      
                                                                               
********************************************************************************
                                                                              
 Description:

	Provides the details handlig for the phone book
 
                        
********************************************************************************
 $History: MmiBookDetailsWindow.h

	25/10/00			Original Condat(UK) BMI version.	
	   
 $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 "mfw_sys.h"

#include "mfw_mfw.h"
#include "mfw_win.h"
#include "mfw_kbd.h"
#include "mfw_lng.h"
/* SPR#1428 - SH - New Editor changes */
#ifndef NEW_EDITOR
#include "mfw_edt.h"
#endif
#include "mfw_icn.h"
#include "mfw_mnu.h"
#include "mfw_tim.h"

#include "mfw_sim.h"
#include "mfw_cm.h"
#include "mfw_nm.h"
#include "mfw_phb.h"
#include "mfw_mme.h"
#include "mfw_sat.h"
#include "mfw_sms.h"

#include "dspl.h"

#include "ksd.h"
#include "psa.h"

#include "MmiMain.h"
#include "MmiBookController.h"
#include "MmiDummy.h"
#include "MmiDialogs.h"
#include "MmiLists.h"



#include "MmiMenu.h"
#include "MmiCall.h"
#include "MmiIcons.h"
#include "MmiIdle.h"

#include "MmiSoftKeys.h"
#include "MmiSounds.h"
#include "MmiIdle.h"
#include "MmiNetwork.h"
#include "MmiSat_i.h"
#include "MmiAoc.h"

#include "gdi.h"
#include "audio.h"

#include "cus_aci.h"
#include "p_sim.h"
#include "mfw_ffs.h"
#include "MmiTimers.h"

#include "MmiBookShared.h"

#include "mmiColours.h"



/*******************************************************************************
                                                                              
                                Private Methods
                                                                              
*******************************************************************************/


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

 $Function:    	bookDetailsDialog

 $Description:	Dialog function for the details window, doesn't currently do
				anything
 
 $Returns:		None

 $Arguments:	win, window handle
                event, event to be handled
				value, not used
				parameter, not used
 
*******************************************************************************/

static void bookDetailsDialog ( T_MFW_HND win, USHORT event, SHORT value, void *parameter )
{
	T_MFW_WIN		*win_data	= ((T_MFW_HDR *)win)->data;
	tBookStandard	*data = (tBookStandard *)win_data->user;
	T_MFW_PHB_ENTRY *entry;
	/* SPR#1428 - SH - New Editor changes
	 * Insert the ascii or unicode name into the buffer */
#ifdef NEW_EDITOR
	T_ATB_TEXT		nameText;
	T_ATB_TEXT		numberText;

	TRACE_FUNCTION("bookDetailsDialog");

	entry = &data->phbk->current.entry[ data->phbk->current.selectedName ];
	/*SPR 1752, don't do any conversions on Unicode strings!*/
	if ( entry->name.data[0] !=0x80)
		bookGsm2Alpha( (UBYTE *) entry->name.data );

	numberText.dcs = ATB_DCS_ASCII;
	numberText.data = entry->number;
	ATB_string_Length(&numberText);

	if ( entry->name.data[0] ==0x80)
	{
		
		/* UNICODE */
		TRACE_EVENT("***UNICODE OUTPUT***");
		nameText.dcs = ATB_DCS_UNICODE;
		nameText.data = &entry->name.data[2];
	}
	else
	{
		nameText.dcs = ATB_DCS_ASCII;
		nameText.data = entry->name.data;
	}

	ATB_string_Length(&nameText);

	ATB_edit_ResetMode(data->editor, ED_MODE_READONLY);		/* Switch off read only to add text */
	ATB_edit_InsertString(data->editor, &nameText);			/* Insert name string */
	ATB_edit_Char(data->editor, ctrlEnter, FALSE);			/* Insert carriage return */
	ATB_edit_InsertString(data->editor, &numberText);		/* Insert number string */
	ATB_edit_SetMode(data->editor, ED_MODE_READONLY);		/* Switch on read only again */

	/* Text has changed, so refresh word wrap */
	ATB_edit_Refresh(data->editor);

	win_show(data->win);

#endif /* NEW_EDITOR */

}




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

 $Function:    	bookDetailsWindowCB

 $Description:	Window event handler
 
 $Returns:		MFW_EVENT_CONSUMED for the window visible event,
				MFW_EVENT_PASSED otherwise

 $Arguments:	e, event, w, window handle
 
*******************************************************************************/

static int bookDetailsWindowCB ( MfwEvt e, MfwWin *w )
{
	tBookStandard	*data = (tBookStandard *)w->user;
	T_MFW_PHB_ENTRY *ptr; // dat;
	char debug[50];

	TRACE_FUNCTION("bookDetailsWindowCB");
	switch( e )
    {
        case MfwWinVisible:
		{
			/* handle the visible event, start by shoing the default information
			*/
			MmiBookShowDefault();

			/* SPR#1428 - SH - New Editor: display editor here rather than filling up the information.  Do that in
			 * dialog function above. */
			 
#ifdef NEW_EDITOR
			ATB_edit_Show(data->editor);
			resources_setTitleColour(COLOUR_EDITOR);

			/* TITLE */
		
			dspl_Clear(0,0, SCREEN_SIZE_X-1, data->editor->attr->win_size.py-1);
			PROMPT(0,0,0,TxtDetails);
#else /* NEW_EDITOR */
			/* Build and show the editor
			*/
			ptr = &data->phbk->current.entry[ data->phbk->current.selectedName ];
#ifdef NO_ASCIIZ

#ifdef EASY_TEXT_ENABLED
				/*MC SPR 1242, changed macros to function calls e.g FIRST_LINE_CHINESE->Mmi_layout_first_line()*/
				if ( ptr->name.data[0] ==0x80)//if unicode
				{
					TRACE_EVENT("***UNICODE OUTPUT***");
					dspl_TextOut(0,0,DSPL_TXTATTR_UNICODE,(char *)&ptr->name.data[2]);
					if ((ptr->name.data[MAX_LINE+2] != 0) && ptr->name.data[MAX_LINE+3] != 0)
						dspl_TextOut(0,Mmi_layout_line(1),DSPL_TXTATTR_UNICODE,(char *)&(ptr->name.data[MAX_LINE+2]));
					dspl_TextOut(0,Mmi_layout_line(2),0,(char *)ptr->number);
					if (strlen((char*)ptr->number) > MAX_LINE)
						dspl_TextOut(0,Mmi_layout_line(1)+numberLineHeight(),0, (char*)&ptr->number[MAX_LINE]);
				}
				else
#endif /* EASY_TEXT_ENABLED */
				{
					// convert from GSM to Alpha characters
					bookGsm2Alpha( (UBYTE *) ptr->name.data );

					sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name.data, "\n", (char *) ptr->number);
					edtShow(data->edt);
				}	
#else /* NO_ASCIIZ */	
				{
					sprintf( data->edtBuf,"%s%s%s", (char *) ptr->name, "\n", (char *) ptr->number);
					edtShow(data->edt);
				}
#endif /* NO_ASCIIZ */
#endif /* NEW_EDITOR */

⌨️ 快捷键说明

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