XCreateOC(3)

✨ XCreateOC(3) ✨

Okay bestie, this is the XCreateOC(3) page from the XLIB FUNCTIONS manual, and it is literally all about making and managing output contexts. Main character energy only. πŸ‘‘


🌸 NAME 🌸

XCreateOC, XDestroyOC, XSetOCValues, XGetOCValues, XOMOfOC β€” create output contexts. These are the output-context besties, fr fr.

πŸ¦‹ SYNTAX πŸ¦‹

XOC XCreateOC(XOM om, ...);
void XDestroyOC(XOC oc);
char * XSetOCValues(XOC oc, ...);
char * XGetOCValues(XOC oc, ...);
XOM XOMOfOC(XOC oc);

πŸ’… ARGUMENTS πŸ’…

  • oc β€” specifies the output context. That's the one we're working with, bestie.
  • om β€” specifies the output method. It's giving "which method are we using" energy.
  • ... β€” specifies the variable length argument list to set or get XOC values. Yes, the mysterious little dots are doing real work here.

πŸŽ€ DESCRIPTION πŸŽ€

XCreateOC is the moment: it creates an output context within the specified output method.

Heads up, bestie: the base font names argument is mandatory at creation time, and the output context will not be created unless it is provided. Every other output context value can be set later. No base font names, no output context β€” periodt. πŸ’…

XCreateOC returns NULL if no output context could be created. NULL can come back for any of the following reasons:

  • A required argument was not set.
  • A read-only argument was set.
  • An argument name is not recognized.
  • The output method encountered an output method implementation-dependent error.

XDestroyOC destroys the specified output context. Poof. Gone. πŸ’€

XSetOCValues returns NULL if no error occurred; otherwise, it returns the name of the first argument that could not be set. An argument might not be set for any of the following reasons:

  • The argument is read-only.
  • The argument name is not recognized.
  • An implementation-dependent error occurs.

Each value to be set must be an appropriate datum, matching the data type imposed by the semantics of the argument. Like, match the vibe and the type, okay? 🫢

XGetOCValues returns NULL if no error occurred; otherwise, it returns the name of the first argument that could not be obtained. An argument might not be obtained for any of the following reasons:

  • The argument name is not recognized.
  • An implementation-dependent error occurs.

Each argument value following a name must point to a location where the value is to be stored. So make sure those pointers are pointing somewhere cute and valid. ✨

XOMOfOC returns the output method associated with the specified output context. It's literally telling you which output method this output context belongs to.

🌈 SEE ALSO 🌈


mwah πŸ’– this page is from X Version 11, libX11 1.8.14 β€” byeee, go create some iconic output contexts! πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from