ImeNotifyEvent
This entry is called when the IME related event occurred, e.g., the user inputs the character. IME can call ImRequestEvent in response to the notified event to originate the display requests.
Format:
APIRET APIENTRY ImeNotifyEvent( HIMI hImi, PNOTIFYEVENT pNotifyEvent )
Parameters:
hImi(input) : IMInstance handle pNotifyEvent(input/output) : NotifyEvent structure as follows: NotifyEvent { ULONG ulEventType; ULONG ulInput1; ULONG ulInput2; ULONG ulInput3; ULONG ulOutput; } where ulEventType(input) : Event type, which has one of the following value IME_NE_ATTACHIME : When the IME is attached to hImi, this event is notified to IME. It includes that the case that hImi is newly created. ulInput1 is used as a bool value as TRUE : ATTACHIME, FALSE : DETACHIME. ulInput2, ulInput3 and ulOutput are 0. IME_NE_BROADCASTDATA : This event is generated as the result of calling ImBroadcastData API. ulInput1 contains the type index of passed data, ulInput2 is the pointer to the BROADCASTDATA, ulInput3 and ulOutput are reserved 0. IME_NE_CHANGECANDIDATELIST : This event is generated when the application requested to change the candidate list. ulInput1 contains the index of the candidate list, ulInput2, ulInput3 and ulOutput are reserved 0. IME_NE_CONVERSIONSTRING : The application requests to process the conversion part in the IMInstance. ulInput1 holds one of the following values. IME_NE_CS_CANCEL IME_NE_CS_COMPLETE IME_NE_CS_CONVERT IME_NE_CS_REVERT ulInput2, ulInput3 and ulOutput are reserved 0. IME_NE_FOCUS : The window(or session) which is related to hImi gets/loses the input focus. ulInput1 is used as a bool value as TRUE : gets focus, FALSE : lose focus. ulInput2, ulInput3 and ulOutput are reserved 0. IME_NE_INSTANCEUPDATED : The application or system updated the contents of the IMInstance. ulInput1 contains one of the following values which is corresponding to the IMInstance content. IME_NE_IU_SESSIONTYPE IME_NE_IU_HWND IME_NE_IU_SESSIONID IME_NE_IU_CLIENTINFO IME_NE_IU_CODEPAGE IME_NE_IU_INPUTMODE IME_NE_IU_CONVERSIONMODE IME_NE_IU_STATUSPOS IME_NE_IU_CONVERSIONFONT IME_NE_IU_CONVERSIONPOS IME_NE_IU_CANDIDATEPOS ulInput2 contains the previous instance value when ulInput1 is one of IME_NE_IU_SESSIONTYPE, IME_NE_IU_HWND, IME_NE_IU_SESSIONID, IME_NE_IU_CLIENTINFO, IME_NE_IU_CODEPAGE, IME_NE_IU_INPUTMODE, or IME_NE_IU_CONVERSIONMODE. ulInput3 and ulOutput reserved 0. IME_NE_KEYEVENT : The user presses keyboards. ulInput1 and ulInput2 are identical to the mparam1 and mparam2 of WM_CHAR. Low word of ulInput3 contains the IMEVKEY which is described in IMEVKEY definition. ulOutput is used as a bool value, which specifies that the eyevent is passed to the application(TRUE) or not(FALSE). In PM environment, if ulOutput is FALSE, that key event is not passed to the application. IME_NE_SELECTCANDIDATE : The application selected an item in the candidate window. ulInput1 contains the index of the candidatelist. ulInput2 contains the selected index of the candidate string. ulInput3 and ulOutput are reserved 0. IME_NE_SHOWCANDIDATE : The application requested to show/hide the candidate window. ulInput1 contains the index of the candidate list. ulInput2 is used as a bool value as TRUE : show candidate window, FALSE : hide candidate window. ulInput3 and ulOutput are reserved 0. IME_NE_SETCANDIDATEPAGESIZE : The application requested to set the candidate item counts which are shown within one page. ulInput1 contains the index of the candidate list. ulInput2 contains the new page. ulInput3 and ulOutput are reserved 0. IME_NE_SETTOPCANDIDATE : The application requested to set the requested candidate as a top candidate in that page. ulInput1 contains the index of the candidate list. ulInput2 contains the candidate string index which is set to the top candidate. ulOutput are reserved 0. IME_NE_SHOWSTATUSWINDOW : The application requested to show/hide the status window. ulInput1 is used as a bool value as TRUE : show status window, FALSE : hide status window. ulInput2, ulInput3 and ulOutput are reserved 0. ulInput1(input) : Input parameter 1 of the specified ulEventType. The contents depend on each event type. ulInput2(input) : Input parameter 2 of the specified ulEventType. The contents depend on each event type. ulInput3(input) : Input parameter 3 of the specified ulEventType. The contents depend on each event type. ulOutput(ouput) : Output parameter of the specified ulEventType. The contents depend on each event type.
Returns:
Success indicator 0 : Successful completion other : Error occurred
Remarks:
IME needs to call ImRequestEvent with request type which corresponds to the event type. Because IME is attached at each frame window creation, IME should minimize the work at IME_NE_ATTACHIME, otherwise the performance gets significantly worse. If IME eats the key event in reply to IME_NE_KEYEVENT with ulOutput == FALSE, Application will get an internal keyevent message(WM_CHARX1) instead of WM_CHAR.