All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

editor-pane-default-composition-callback Function

Summary

The default composition callback of the editor. Composition here means composing input characters into other characters by an input method.

Package

capi

Signature

editor-pane-default-composition-callback editor-pane what

Arguments
editor-pane
what
One of :start, :end or a plist.
Description

The function editor-pane-default-composition-callback is the default composition-callback of editor-pane. It may also be called by your program.

editor-pane is the editor-pane that is currenltly being used for composition.

When what is :start, editor-pane-default-composition-callback sets the composition placement in the editor by calling set-composition-placement, and also makes it move the composition window following the user's mouse cursor movement.

When what is :end, it stops the following of the mouse cursor.

When what is a list (which needs to be a plist), editor-pane-default-composition-callback checks if it contains a keyword/value pair for :string-face-lists, and if it does displays it in the editor temporarily (until the next call to it). See the entry for output-pane for the description of the value string-face-lists.

By default, editor-pane-default-composition-callback uses the faces that are supplied in string-face-lists, but if the plist contains :selection-needs-face and :selected-range, it displays the selected range with a different face, by merging *editor-pane-composition-selected-range-face-plist* into the given face of the selected range.

This can be overridden by setting the composition-face in the editor-pane, or the global *editor-pane-default-composition-face* if the composition-face of the pane is :default. If composition-face is a true value then the exact behavior depends on its type:

A plist
This is appended to each face plist in the the string-face-lists. In other words, it provides default values for the attributes of the face.

Overrides the supplied face completely.

A function or a symbol

For string-face-list, funcalls it with two arguments, the pane and the supplied face plist, and uses the result (which may be an editor:face or a face plist).

editor-pane-default-composition-callback is the default value of composition-callback for editor-pane. This can be overridden by passing :composition-callback or using output-pane-composition-callback (see entry for output-pane).

The user-supplied callback may call editor-pane-default-composition-callback to do the actual display, potentially after modifying the argument when it is a plist.

See also

set-composition-placement


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:33:57