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 getXOCvalues. 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 π
XCreateOM(3)XCreateFontSet(3)Xlib - C Language X Interface
mwah π this page is from X Version 11, libX11 1.8.14 β byeee, go create some iconic output contexts! ππ¦
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms