`
luliangok
  • 浏览: 780606 次
文章分类
社区版块
存档分类
最新评论

输入法编辑器(IME)程序设计(1)

 
阅读更多
转记:游戏的登录窗口需要制作自定义的输入法编辑器,以控制只输入英文和数字(考虑国际化的问题)以及一些特定的字符,找了下输入法编辑器方面的资料,找到这个翻译系列,于是可以乘凉了~~~
原作者:刘铁猛
输入法编辑器(IME)程序设计(1)
头一次发译的东西,肯定会有不少错误,请大家多多斧正。
本人志在编写中国最出色的输入法,解放中国人的双手。
今从零起步,朝成夕可死也。

Input Method Editor

An input method editor (IME) is a program that allows computer users to enter complex characters and symbols, such as Japanese Kanji characters, by using a standard keyboard.
输入法编辑器(IME)是一个程序,这个程序允许计算机用户使用标准键盘就能输入复杂的字符与符号,例如日文中的汉字(严重反对!中文是世界上使用人口最多的文字,这里应该是中文才好!)字符。

This overview describes the IME and explains how to use the input method manager functions to create and manage IME windows.

本预览描述了IME,并且解释说明了如何使用输入法管理程序(IMM)函数来创建和管理IME窗口。

¨ 关于输入法编辑器

¨ 使用输入法编辑器

¨ 输入法编辑器参考

About Input Method Editor

The input method editor relieves users of the need to remember all possible character values. Instead, the IME monitors the user's keystrokes, anticipates the characters the user may want, and presents a list of candidate characters from which to choose.

输入法编辑器减轻了用户记住所有可能字符值的需要,取而代之,IME监控用户的击键、预见用户可能期望的字符,并且提供一个可选字符的列表,用户可以从中选择想要的字符。

By default, the IME provides an IME window through which users enter keystrokes and view and select candidates. Applications can use the input method manager (IMM) functions and messages to create and manage their own IME windows, providing a custom interface while using the conversion capabilities of the IME.

默认情况下,IME提供了一个IME窗口,通过这个窗口,用户可以用键盘输入并且查看和选择想要的字符。应用程序可以使用输入法管理器(IMM)函数和消息来创建并且管理其自己的IME窗口(比如QQ里是五笔而Word里却是拼音),并在使用IME的转换功能时提供一个自定义接口(不太明白)。

IMM is only enabled on East Asian (Chinese, Japanese, Korean) localized Windows. On these systems, call GetSystemMetrics with SM_DBCSENABLED to determine if IMM is enabled. Note that Windows 2000 provides full-featured IME support in all localized language versions, however, that IMM is enabled only when an Asian language pack is installed. An IME-enabled application can call GetSystemMetrics with SM_IMMENABLED to determine if IMM is enabled.

IMM只在东亚(中国,日本,韩国)本地化的Windows中才可用。在这些系统中,以SM_DBCSENABLED消息调用GetSystemMetrics函数来确定IMM是否可用。注意,Windows 2000在所有本地化版本中都提供了全功能的IME支持,然而仅在安装了亚洲语言包的时候IMM才可用。一个IME-enabledIME可用)的程序会以SM_IMMENABLED调用GetSystemMetrics函数来确定IMM是否可用。

Status, Composition, and Candidates Windows

The status, composition, and candidates windows form the user interface for the IME. The status window indicates that the IME is open and provides the user the means to set the conversion modes. The composition window appears when the user enters text and, depending on the conversion mode, either displays the text as entered or displays converted text. The candidates window appears in conjunction with the composition window. It contains a list of "candidates" (alternative characters) for the selected character or characters in the composition window. The user can scroll through the candidates list and select the desired characters, then return to the composition window. The user can compose the desired text in this way until the composition string is finalized and the window is closed. The IME sends the composed characters to the application in the form of WM_IME_CHAR or WM_IME_COMPOSITION/GCS_RESULT messages. If the application does not process these messages, the DefWindowProc function translates them into one or more WM_CHAR messages.

状态窗口、字母组合窗口和列选窗口构成了IME的用户界面。状态窗口指示出IME处于开启状态并且提供给用户设置转换模式的方法。字母组合窗口会在用户输入字符的时候出现,其形式基于转换模式,同时显示已经输入的字母或者是已经转换了的字符。(conversion mode转换模式=输入法,比如微软拼音、五笔字型……其实不同的输入法的本质是不同的转换规则。)列选窗口会紧挨着字母组合窗口显示。它包含了一个由“候选条目”构成的列表,此列表匹配选中字符或者是字母组合窗口中的字符。用户可以滚动列选窗口并且选择想要的字符,然后(焦点)返回到字母组合窗口。借此用户可以组合想要的文本直到字符组合成的字符串结束,窗口会关闭。IME将使用WM_IME_CHAR WM_IME_COMPOSITION/GCS_RESULT消息把组合好的字符发送给窗体中的应用程序。如果应用程序没有处理这些消息,DefWindowProc函数会把它们翻译成一条或多条WM_CHAR消息。

By default, the system automatically creates and manages status, composition, and candidates windows for all windows that require text input. For many applications, this default processing is sufficient. These applications rely entirely on the system for IME support and are said to be IME-unaware because they are unaware of the many tasks the system carries out to manage the IME windows.

默认情况下,系统会为所有要求输入文本的窗口自动生成并管理状态窗口、字母组合窗口和列选窗口。对于许多程序,这一默认处理已经足够了。这些完全依赖于系统提供IME支持的应用程序称为IME-unawareIME无感知)程序,原因在于它们对系统为管理IME窗口所完成的诸多任务毫无感觉。

An IME-aware application, on the other hand, participates in the creation and management of IME windows. Such applications control the operation, position, and appearance of the default windows by sending messages to and by intercepting and processing messages intended for these windows. In some cases, applications create their own IME windows and provide complete processing for their custom status, composition and candidates windows.

相反,一个IME-awareIME感知)程序会参与IME窗口的创建与管理。例如程序可能通过发送或截取消息并且有目的地对这些(IME)窗口消息进行处理,来控制默认(IME)窗口的选项、位置和外观。有些情况下,应用程序会创建它们自己的IME窗口并且对其自定义的状态、字母组合和列选窗口提供完全的控制处理。
分享到:
评论

相关推荐

    WIN7韩文输入法 KRO_IME x64位

    WIN7韩文输入法 KRO_IME x64位,纯净系统,换电脑 必备良药

    微软日本语输入法2007(IME2007-JPN).rar

    通过windows XP环境验证的输入法程序,下载解压后可通过查看文件属性检查签名是否存在。若签名信息存在则可放心使用,若签名信息与下列不符则建议不要安装,因为签名消失说明文件已经更改。 转载本程序请在醒目位置...

    微软朝鲜语输入法2007(IME2007-KOR)

    通过windows XP环境验证的输入法程序,验证后由网站eiiwa.vicp.net签署数字签名,下载解压后可通过查看文件属性检查签名是否存在。若签名信息存在则可放心使用,若签名信息与下列不符则建议不要安装,因为签名消失...

    输入法设置工具 IME TOOL 2.6.5

    注:在设计 IMETool 时,为了简单起见,在选择“输入法指示器”风格时,相应的切换输入法选项直接套用了“高级文字服务”的“切换输入语言”选项,见图一中④⑤处。 8、问:在使用 IMETool 后,有时输入法的指示条会...

    韩文输入法 IME2007

    IME KOREAN 2007 韩文输入法 GHOST版本的XP要想输入韩文就装这个补丁

    输入法设置工具 IME TOOL

    1、用 IME Tool 设置的一些热键在 Windows 本身的输入法设置中会无法正确显示,但不影响使用。 2、繁体、韩文、日文系统下的打开关闭输入法等切换键设置在注册表中的位置不同,因条件所限我没有做进一步测试功能是否...

    输入法修复工具ime-show

    输入法修复工具ime-show 任务栏输入法不见了,通过控制面板修改依旧不行,可以考虑用本输入法修复工具修复.

    输入法设置工具 IME TOOL v2.8.2

    输入法设置工具 IME TOOL v2.8.2。

    IME输入法编程指南

    讲述IME框架下开发输入法的基本原理和基本思路,以微软拼音为例,详细描述各种API函数的使用方法和源代码,很有指导意义。

    输入法设置工具 IME TOOL 2.8.3

    1、用 IME Tool 设置的一些热键在 Windows 本身的输入法设置中会无法正确显示,但不影响使用。 2、繁体、韩文、日文系统下的打开关闭输入法等切换键设置在注册表中的位置不同,因条件所限我没有做进一步测试功能是否...

    QQ拼音输入法皮肤编辑器 v2015.zip

    QQ拼音输入法皮肤编辑器,皮肤文件为qpys格式,是由QQ拼音皮肤编辑器采用加密压缩生成的。为保护作者版权,网友无法直接解压打开该文件获取资源图片。 QQ拼音2.3以后的版本支持皮肤文件的直接安装。用户下载qpys...

    百度输入法皮肤编辑器V2.3.2.49绿色免费版

    百度输入法皮肤编辑器,制作一款百度输入法皮肤主要需要经过以下四个步骤: 一. 设计产出效果图 二. 结合皮肤编辑器素材要求,对效果图进行切分 三. 利用皮肤编辑器使用生成的切分图编辑皮肤 四. 皮肤文件生成及检测 ...

    百度输入法皮肤编辑器 v2015.zip

    百度输入法皮肤编辑器设计产出效果图,结合皮肤编辑器素材要求,对效果图进行切分,利用皮肤编辑器使用生成的切分图编辑皮肤, 皮肤文件生成及检测。 百度输入法皮肤编辑器文件说明 1. 百度输入法皮肤文件为bps...

    wince 中文输入法编辑器

    CE包含了一种简体中文输入法编辑器,如果不想编写自己的输入法编辑器,那么可以直接调用默认的。在讲解中文输入法编辑器之前顺便提一下国际化(Internationalization),中文输入法及输入法编辑器只是国际化组件的一...

    ime-show输入法工具

    ime-show 输入法工具 输入法修复工具

    易语言源码易语言IME输入法源码.rar

    易语言源码易语言IME输入法源码.rar

    实用的 输入法 程序设计

    对于想自己开发一个输入法的朋友,是一个非常好的参考,里面有详细的源程序,附有详细的注解和程序设计思想在里面

    搜狗输入法皮肤编辑器

    搜狗输入法皮肤编辑器 搜狗输入法皮肤编辑 搜狗输入法皮肤编辑器器 好好用的

    ime.rar系统输入法

    输入法、日文输入法,C:\WINDOWS\ime 覆盖就OK了

    手心输入法皮肤编辑器 v2015.zip

    手心输入法皮肤编辑器是官方提供的一款皮肤编辑工具,可以自行设计输入法的字体大小、字型、拼音串颜色、焦点候选词颜色、光标颜色以及状态栏、横排窗口、竖排窗口等元素。如果厌倦了或者对官方提供的皮肤不满意,...

Global site tag (gtag.js) - Google Analytics