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

📄 uiime_cj.h

📁 嵌入工linux开发的源码
💻 H
字号:
#ifndef _UIIME_CJ_H
#define _UIIME_CJ_H

#define _DEBUG_IME_CJ	1

#include <pr2k.H>
#include <typedefine.h>

// by zhangxueping
#define  MAX_CANDIDATE_COUNT    6
#define MAX_COMPOSITION_COUNT   5
#define MAX_IME_AVAILABLE       5

typedef union
{	
	unsigned short w;	
	struct	
	{
#ifdef __WIN32__
		unsigned char l, h;
#else		
		unsigned char h, l;
#endif			
	}b;
} CC;


typedef struct tagIMM_CANDIDATE
{	
	unsigned short count;	          // buffer里现有的候选字数
	unsigned short pos;	              // 内部使用, 指示候选字区是由buffer的那个位置开始显示候选字, 第一个候选字位置为0
	CC   buff[MAX_CANDIDATE_COUNT];   // 候选字buffer, 输入法可将候选字填进此buffer
} IMM_CANDIDATE;                      
    

// 组字buffer, 软件键盘内部用之来储存使用者所点选的字根
typedef struct tagIMM_COMPOSITION
{	
	unsigned char count;              // 目前buffer里几个字根
	char buff[MAX_COMPOSITION_COUNT]; // 字根buffer, 依序储存使用者点选的键的index。
                                      // 注意, 此buffer储存的是index而不是要显示的字符。 
} IMM_COMPOSITION;
                  

typedef struct tagIMM_OBJ
{	
//	char            IME_LIST[MAX_IME_ON_PANEL];	
//	IMM_OBJ	        IME_TOTAL[MAX_IME_AVAILABLE];	
	char            iCurIme;	
	char            cIme;	
	IMM_CANDIDATE	cdd;	
	IMM_COMPOSITION cmp;
} IMM_OBJ;


/***********************************************
* wbStr:  code of wb                           *
* offset: offset of candidate word             *
* return: total count of candidate word        *
************************************************/
int guiIme_cj(char *wbStr, unsigned short *pBig5Code);

/******************************************************************
* offset: offset of candidate word, get from guiIme_wb()          *
* totalCount: total count of candidate word, get form guiIme_wb() *
* startPos: start position of word to read                        *
* toReadCount: number of word to read                             *
* pWordText: buffer of word                                       *
* return: actual number of word read                              *
*******************************************************************/
int guiGetCandidate_cj(DWORD offset, unsigned short totalCount,\
		unsigned short startPos, unsigned short toReadCount, \
		unsigned short *pWordText);

int KeyIsCJCode(unsigned short key);

void ConvertNumberToCode(char *numStr, unsigned short *codeStr);

#endif

⌨️ 快捷键说明

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