XMIMGETXIC(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– XmImGetXIC πŸ’–

ok so bestie, welcome to the XmImGetXIC page β€” it's a library call, part of the Xm input manager family, and it's literally the one that goes and gets you an XIC for a widget. yes that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

XmImGetXIC β€” an input manager function that obtains an XIC for a widget

like. that's it. that's the job. it gets you an XIC. for a widget. slay πŸ’…


🌸 SYNOPSIS 🌸

#include <Xm/XmIm.h>
XIC XmImGetXIC(
Widget widget,
XmInputPolicy input_policy,
ArgList args,
Cardinal num_args);

ok the way you call it is exactly like that, no notes, copy it character for character or it will not work and i will know 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

ok so here's the tea: XmImGetXIC creates and registers an X Input Context (XIC) with the arguments you hand it, for the widget you point at. main character behavior fr fr ✨

and here's the part you actually need to know β€” if you pass XmINHERIT_POLICY as the input_policy, a new XIC gets created only if it's actually required to be, either because of the arguments or because of the VendorShell input policy. like, it's not out here making XICs for fun. it's discerning. it has standards. πŸ‘‘

also, and this is important: any existing XIC registered with widget is unregistered. so if your widget already had one, bestie... it's gone. replaced. out with the old πŸ’€

go read the VendorShell reference page if you want the full lore, it has further details.

now the parameters, one by one, no skipping:

  • widget β€” the ID of a widget for which an Input Context is to be created. yes, the ID. not the name, not the vibe, the ID 🎯
  • input_policy β€” the type of input policy. it accepts the following values:
    • XmINHERIT_POLICY β€” inherits the policy from VendorShell. it's giving "i'll do what the shell does" 🌈
    • XmPER_WIDGET β€” creates a new XIC for this widget. just for them. special treatment. per widget, periodt πŸ’–
    • XmPER_SHELL β€” creates a new XIC for the shell, if needed. note the "if needed" β€” it's not out here doing extra work for no reason 🧚
  • args β€” an XtArgList parameter to use for creating the XIC. this is where you put your little settings πŸŽ€
  • num_args β€” the number of arguments in the args parameter. yes you have to count them. yes it's annoying. yes it's required πŸ™ˆ

⭐ RETURN ⭐

it returns the created XIC. πŸŽ‰

⚠️ okay listen, this part is on YOU: the application is responsible for freeing the returned XIC by calling XmImFreeXIC. do not just walk away from it. it is not a gift, it is a loan. free your XIC bestie 😭


ok that's the whole page, you ate it, i'm obsessed πŸ’…βœ¨ go forth and free your XICs, and remember β€” this was the XmImGetXIC library call page from the Xm manual, so if you see the header and footer floating around somewhere in your man viewer, that's just the manual name doing its thing. mwah πŸ«ΆπŸŽ€