Text services: Vista Extensions (UI Elements)

The TSF tour ends here, with a brief discussion of UI Elements in Vista If your text service wishes to be available in full-screen applications like games, it must implement ITfUIElement, and call the ITfUIElementMgr whenever the text service wants to display some UI. (See the discussion of UILess mode in MSDN.) Interface How Obtained…


Text Services: Vista Extensions

In Windows Vista, TSF added the ability to run in locations where it had previously been disabled.  For example, TSF is now available on secure desktops, in full screen (DirectX) applications, and in MTA threads.  However, text services have to be aware of these new environments, and must tell TSF that it is aware of…


Text Services: Candidates

If your text service supports multiple interpretations of the same input, and you wish to allow users to correct the initial interpretation (for dictation, we call this ‘correction’; IMEs tend to call it ‘reconversion’), your text service will need to implement these interfaces.  Your service will also need to implement ITfFnReconversion (so that applications can…


Text Services: Function Providers

TSF allows text services to offer optional extension points through the ITfFunctionProvider interface.  Indirection through the function provider allows text services to minimize memory usage and startup time by instantiating services when requested, rather than when loaded. Interface How Obtained ITfFunctionProvider Obtained by QI from ITfTextInputProcessor ITfFunction Returned from ITfFunctionProvider::GetFunction Text services that implement ITfFunctionProvider…


Text Services: Language Bar

If your text service wishes to display some UI on the language bar, then your service will need to create objects that implement one (or more) of the following interfaces: Interface How Obtained ITfLangBarItem Pass this base interface to ITfLangBarItemMgr::AddItem ITfLangBarItemButton Derived from ITfLangBarItem ITfLangBarItemBitmapButton Derived from ITfLangBarItem ITfLangBarItemBitmap Derived from ITfLangBarItem ITfLangBarItemBalloon Derived from…


Text Service: Display Attributes

If your text service wishes to display text in different colors (e.g., displaying the current composition in red), then your text service needs to implement these interfaces: Interface How Obtained ITfDisplayAttributeProvider Obtained by QI from ITfTextInputProcessor IEnumTfDisplayAttributeInfo Returned from ITfDisplayAttributeProvider::EnumDisplayAttributeInfo ITfDisplayAttributeInfo Returned from ITfDisplayAttributeProvider::GetDisplayAttributeInfo If you implement ITfDisplayAttributeProvider, you must also understand how properties work…


Text Service Properties

The next thing that I’d like to talk about are properties.  While the TSF manager implements basic property handling (via ITfProperty), a text service has the ability to customize the way TSF handles properties. If your text service wishes to attach private information to the inserted text, it can do so by calling ITfProperty::SetValue.  If…


Text Service Basics

 We have finally finished looking at the interfaces that TSF implements for you.  Now we start looking at the interfaces that text services must implement.  The first step are the essential interfaces. Every text service must implement these two interfaces.  It may optionally implement other interfaces (described in future posts). Interface How Created ITfTextInputProcessor TSF…


A Tour through TSF: Miscellaneous Functions

The last set of interfaces implemented by the TSF manager are the ‘odd-ball’ interfaces that don’t really fall into any other logical groups.  Helpers The interfaces in this category provide auxiliary services for applications or text services.  Interface How to Obtain ITextStoreACPServices QI on ITextStoreACPSink ITextStoreACPSink Passed to ITextStoreACP::AdviseSink ITfEditRecord Passed to ITfTextEditSink::OnEndEdit  MSAA interoperability…


A Tour through TSF: Language Bar

These interfaces manage the language bar and the items that display on the language bar.  These interfaces are used exclusively by text services, and will be discussed further in a future post. Interface How to Obtain ITfLangBarMgr CoCreateInstance(CLSID_TF_LangBarMgr) ITfMenu Passed to: ITfLangBarItemBitmapButton::InitMenu ITfLangBarItemButton::InitMenu ITfSystemDeviceTypeLangBarItem QI on ITfLangBarItem ITfSystemLangBarItem QI on ITfMenu ITfTransitoryExtensionUIElement QI on ITfUIElement