IME 개요

키보드 궁금하니? 2008. 12. 4. 19:52
출처: http://www.redwiki.net/wiki/wiki.php/IME%20%B0%B3%BF%E4



IME 개요

  • MSDN에서 퍼왔습니다.

Contents

[-]
1 IME에 대하여
1.1 상태(Status), 조합(Composition), 그리고 후보글자(Candidate) 윈도우
1.2 IME Window Class
1.3 IME Messages

1 IME에 대하여 #

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.

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.

IMM은 단지 아시아권(중국,일본,한국)에 로컬라이징된 윈도우즈버전에서만 사용가능합니다. 이들 시스템에서는 IMM이 사용가능한지 여부를 GetSystemMetrics 메소드에 SM_DBCSENABLED 옵션을 걸어 호출하여 확인해볼 수 있습니다. 윈도우즈 2000에는 모든 기능을 갖춘 IME 기능지원을 모든 지역 언어 윈도우버전에 지원하지만, IMM은 아시아 언어팩을 설치할경우에만 사용가능하다는 점에 주의하십시요. IME사용가능한 어플리케이션인지 여부는 GetSystemMetrics 메소드에 SM_IMMENABLED 옵션을 걸어 호출하여 확인해볼 수 있습니다.

1.1 상태(Status), 조합(Composition), 그리고 후보글자(Candidate) 윈도우 #

IME을 위한 사용자 인터페이스는 status, composition, candidate 윈도우로 구성되어있습니다. 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.

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.

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.

1.2 IME Window Class #

The "IME" window class is a predefined system global class that defines the appearance and behavior of the standard IME windows. The class is similar to common control classes in that you create a window of this class by using the CreateWindowEx function. Like static controls, an IME window does not respond to user input by itself. Instead, it notifies the IME of user input actions and processes control messages sent to it by the IME or applications to carry out a response to the user action.

IME-aware applications sometimes create their own IME windows using the IME class. This allows the application to take advantage of the default processing of the IME window while having control of the positioning of the window.

1.3 IME Messages #

The system sends IME window messages to the window procedure of the application when certain events occur that affect the IME windows. For example, the system sends the WM_IME_SETCONTEXT message to the application when a window is activated. IME-unaware application pass these messages to the DefWindowProc function which sends them to the corresponding default IME window. IME-aware applications either process these messages or forward them to their own IME windows.

You can direct an IME window to carry out a command, such as change the position of composition window, by using the WM_IME_CONTROL message. The IME notifies the application about changes to the composition string by using the WM_IME_COMPOSITION message and about general changes to the status of the IME windows by sending the WM_IME_NOTIFY message.


AND