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

📄 uiime_lx.c

📁 嵌入工linux开发的源码
💻 C
字号:
/*********************************************************************/
//	文 件 名:	uiIme_lx.cpp
//	程序说明:	联想输入
//	程序设计:	产革宏
//				2002.03.12		设计完成		说明文档:R004-S247-0001
//	程序审查:	宋军霞
//				2002.03.12		审查完成		说明文档:R004-S247-0001
//	项目编号:	R004-S247
//	版	  本:	V1.0
//	版    权:	Reality Plus Technology (ShenZhen) Co.,Ltd.
/*********************************************************************/

#include "pr2k.h"
#include "string.h"

#include "typedefine.h"
#include "uiIme_lx.h"
#include "uiIme_lx.res"

WORD guiIme_lx(WORD code,DWORD *offset)
{
	unsigned char ch1,ch2,*pCode;
	int pos;
	WORD WordCount = 0;

	pCode=(unsigned char *)(&code);
	ch1=pCode[0]-0xb0;
	ch2=pCode[1]-0xa1;
/*tong	
	if( ch1<0 || ch2<0 )
		return 0;
*/
	pos=ch1*94+ch2;

	if( pos<0 || pos>3754 )
		return 0;
	
	*offset = LX_TABLE[pos];

	return (LX_TABLE[pos+1]-LX_TABLE[pos]);	
}

WORD guiGetCandidate_lx(DWORD offset,WORD totalCount,WORD startPos,WORD toReadCount,WORD *pWordText)
{	
	WORD readCount;
	unsigned char *pText;
	int i;
	int pos;

	if(startPos>=totalCount)
		return 0;

	if(startPos+toReadCount>=totalCount)
		readCount=totalCount-startPos;
	else
		readCount=toReadCount;

	pText=(unsigned char *)pWordText;
	
	pos=(offset+startPos)<<1;
	for(i=0; i<readCount*2; i++)
		*pText++ = LX_WORD[pos++];

	return readCount;
}

⌨️ 快捷键说明

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