Partager via


IInputMethod3 (Compact 2013)

3/28/2014

This interface extends the functionality of the IInputMethod2 interface to include notification of software-based input panel (SIP) input context changes.

Methods in Vtable Order

Like all Component Object Model (COM) interfaces, this interface inherits the methods for the IUnknown interface. The following table lists the methods for this interface in the order in which they appear in the Vtable following the methods inherited from IUnknown.

Method

Description

IInputMethod3::Select

Creates the windows and image list for the input method.

IInputMethod3::Deselect

Selects the input method from the SIP window and destroys the input method windows.

IInputMethod3::Showing

Initializes display-related parameters, structures, and functions before an SIP window appears.

IInputMethod3::Hiding

Saves data before hiding the SIP.

IInputMethod3::GetInfo

Returns information about the current input method to the operating system.

IInputMethod3::ReceiveSipInfo

Receives information about the size, placement, and docked status of the SIP for the input method.

IInputMethod3::RegisterCallback

Receives a pointer to an IIMCallback interface.

IInputMethod3::GetImData

Sends data from the current input method to the current application.

IInputMethod3::SetImData

Responds to an application's request to set input method-specific data within the input method.

IInputMethod3::UserOptionsDlg

Displays a dialog box that presents configurable options to the user that are specific to the input method.

IInputMethod3::SetIMMActiveContext

Receives the current state of the input method editor (IME).

IInputMethod3::RegisterCallback2

Receives a pointer to an IIMCallback2 interface.

IInputMethod3::InputContextChange

Receives notifications from the SIP when the input context changes.

IInputMethod3::RegisterCallback3

Receives a pointer to an IIMCallback3 interface.

Remarks

The SIP calls the methods of this interface to notify the input method of state changes and to request action and information from the input method. Before an input method renders the SIP window space or responds to user actions, it receives method calls in the following sequence:

  1. Select
  2. RegisterCallback
  3. GetInfo
  4. ReceiveSipInfo

An input method receives user input and passes the input data to the SIP through the IIMCallback3 interface. When you create the input method, you only call IIMCallback3 methods in response to a call coming through an IInputMethod3 interface method.

Do not create a separate thread with your input method to implement a user interface (UI). Create and manipulate windows only in the thread that responds to IInputMethod3 method calls. Instead of creating a separate thread for the UI, the input method can create process threads to implement a UI. However, these process threads must not call IIMCallback3, because certain Graphics, Windowing, and Events Subsystem (GWES) window functions work properly only if they are created from the same thread that created the window.

When to Implement

Use this interface to add notification of SIP input context changes to an input-method component. An input context stores information about the status of the input environment, such as input scopes and the input language.

When you create a new input-method COM component that implements this extended interface, you can add the new component to Windows Embedded Compact by creating standard COM registry keys. We recommend that your setup application self-register the new component by calling the DllRegisterServer and DllUnregisterServer functions. Implement these functions in the input-method server dynamic-link library (DLL). Optionally, you can set the registry values directly. The Input PanelProperties dialog box does not provide any UI elements for the self-registration service. For more information, see Input Method Registry Settings.

Obtaining a Pointer

When a user first selects a registered input method from the SIP dialog box or the Input Panel, the SIP obtains a pointer to the input-method interface by calling the CoCreateInstance function. The SIP then calls IInputMethod3 methods to notify the input method of events and to request data.

When the user selects a different input method, the SIP frees the existing input method by calling the IUnknown::Release method on the interface pointer.

See Also

Reference

Software-based Input Panel Interfaces
IIMCallback3
IInputMethod

Other Resources

Software-based Input Panel
Graphics, Windowing, and Events (GWES)