Reference

XDisplayOfIM(3) on Linux

The text 73c8df1a2a9c, as Debian 11 (Bullseye) shipped it.

open, close, and obtain input method information

XDisplayOfIM(3) on Linux now