Reference

XDisplayOfIM(3) on Linux

The text 637633ccff7a, as Debian 12 (Bookworm) shipped it.

open, close, and obtain input method information

XDisplayOfIM(3) on Linux now