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

📄 addrtools.h

📁 我的Palm OS 5 SDK zhCN_PIMApps代码。 使用codewarrior 开发环境
💻 H
字号:
/******************************************************************************
 *
 * Copyright (c) 1995-2003 PalmSource, Inc. All rights reserved.
 *
 * File: addrtools.h
 *
 * Release: Palm OS 5 SDK (68K) R3.
 *
 *****************************************************************************/

#ifndef ADDRTOOLS_H
#define ADDRTOOLS_H

#include "AddressDB.h"

#include <UIColor.h>
#include <Form.h>
#include <ExgMgr.h>

/************************************************************
 * Defines
 *************************************************************/
#define ListLayoutFieldMapRscType		'LLFM'		// Resource type for the list layout field map.
#define kNumListLayoutFieldMapItems 	4			// Number of fields being mapped for the list layout.	


typedef struct ListLayoutFieldMapType {
	
	// Two sets of fields for display :
	// Each set has at most 3 fields; the last entry is a guard field that must be 
	// set to addressFieldsCount.  If any other field is not being used it should
	// also be set to addressFieldsCount.
	
	// The first set allows for two non-empty fields to be displayed on a line.
	UInt16 fieldNameChoiceList[4];
	// The second set allows only the first non-empty field to be displayed.
	UInt16 altFieldNameChoiceList[4];
} ListLayoutFieldMapType;



#define NameLayoutFieldMapRscType	'NLFM'

typedef struct NameLayoutFieldMapType {
	UInt16	firstFieldNum;
	UInt16	secondFieldNum;
	UInt16	separatorStrID;
} NameLayoutFieldMapType;

/************************************************************
 * Function Prototypes
 *************************************************************/

Boolean		ToolsIsDialerPresent( void );
void		ToolsSetDBAttrBits(DmOpenRef dbP, UInt16 attrBits);
Err			ToolsCreateDefaultDatabase(void);
void		ToolsRegisterLocaleChangingNotification(void);
Boolean 	ToolsDetermineRecordName(AddrDBRecordPtr recordP, Int16 *shortenedFieldWidth, Int16 *fieldSeparatorWidth, Boolean sortByCompany, Char **name1, Int16 *name1Length, Int16 *name1Width, Char **name2, Int16 *name2Length, Int16 *name2Width, Char **unnamedRecordStringPtr, MemHandle* unnamedRecordH, Int16 nameExtent);
void		ToolsDrawRecordName (Char *name1, Int16 name1Length, Int16 name1Width, Char *name2, Int16 name2Length, Int16 name2Width, Int16 nameExtent, Int16 *x, Int16 y, Int16 shortenedFieldWidth, Int16 fieldSeparatorWidth, Boolean center, Boolean priorityIsName1, Boolean inTitle);
Int16		ToolsDrawRecordNameAndPhoneNumber (AddrDBRecordPtr record, RectanglePtr bounds, WChar * phoneLabelLetters, Boolean sortByCompany, Char **unnamedRecordStringPtr, MemHandle* unnamedRecordStringH);
UInt16		ToolsGetLabelColumnWidth (AddrAppInfoPtr appInfoPtr, FontID labelFontID);
void		ToolsLeaveForm();
void		ToolsChangeCategory (UInt16 category);
Boolean		ToolsSeekRecord (UInt16 * indexP, Int16 offset, Int16 direction);
void		ToolsDirtyRecord (UInt16 index);
FontID		ToolsSelectFont (FontID currFontID);
void		ToolsDeleteRecord (Boolean archive);
Err			ToolsCustomAcceptBeamDialog(DmOpenRef dbP, ExgAskParamPtr askInfoP);
void*		ToolsGetObjectPtr (UInt16 objectID);
void*		ToolsGetFrmObjectPtr( FormType* frmP, DmResID id );
Boolean		ToolsAddrBeamBusinessCard (DmOpenRef dbP);
void		ToolsInitPhoneLabelLetters(AddrAppInfoPtr appInfoPtr, WChar *phoneLabelLetters);
UInt16		ToolsDuplicateCurrentRecord (UInt16 *numCharsToHilite, Boolean deleteCurrentRecord);
char*		ToolsGetStringResource (UInt16 stringResource, char * stringP);
Boolean		ToolsIsPhoneIndexSupported( AddrDBRecordType* addrP, UInt16 phoneIndex );
UInt16		ToolsGetLineIndexAtOffset( Char* textP, UInt16 offset );
Int16		ToolsGetPhoneLabelWidth( void );
Boolean  	ToolsMatchAlternateEncoding(Char *textP, CharEncodingType altEncoding);
Boolean 	ToolsGetDisplayNameLayout(Char* str1, Char* str2, NameLayoutFieldMapType *outFieldMap);
void 		ToolsSetupSeparators(Char* name1, Char* name2,  Char* fieldSeparatorStrP, Int16 *fieldSeparatorLen, Boolean name1HasPriority);

#endif // ADDRTOOLS_H

⌨️ 快捷键说明

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