Freigeben über


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 must register the interface with the TSF manager by QueryInterface'ing the ITfThreadMgr object for ITfSourceSingle, and then calling ITfSourceSingle::AdviseSingleSink().

Standard Functions

These interfaces are implemented by a text service, and are all optional.  These interfaces are returned from a call to ITfFunctionProvider::GetFunction, and all derive from ITfFunction.  Note that your text service can implement other functions via ITfFunctionProvider; these are just the predefined interfaces.

Interface

When should a text service implement this?

ITfFnShowHelp

Implement this if your service has a help dialog.

ITfFnReconversion

Implement this if your service supports candidates (ITfCandidateList, et. al.)

ITfFnPropertyUIStatus

Implement this if you want to serialize your custom properties.

ITfFnConfigure

Implement this if your text service has a configuration dialog.

ITfFnBalloon

Think about implementing this if your text service implements ITfLangBarItemBalloon.