XpSetContext(3Xp)
π XpSetContext π
From the XPRINT FUNCTIONS section, manual page 3Xp β yes bestie, we're hanging out with the X Print Server today. π
β¨ NAME β¨
XpSetContext β sets or unsets a print context with the specified display connection to the X Print Server. That's the whole assignment. π
π SYNOPSIS π
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>
void XpSetContext ( display, print_context )
Display *display;
XPContext print_context;
π ARGUMENTS π
displayβ a pointer to theDisplaystructure; you get this back fromXOpenDisplay, bestie.print_contextβ a pre-existing print context on the same X Server. Same server, okay? Don't get cute with it. π
πΈ DESCRIPTION πΈ
Okay so XpSetContext sets the print context for a display connection. All subsequent print operations that do not explicitly take a print context-id β for example, XpStartJob β on display will use and act upon the print context set by this call, until the print context is unset or XpDestroyContext is called. The print context can be set and used on multiple jobs, if not destroyed. Reuse era, honestly. β»οΈ
If print_context is None, XpSetContext will unset (disassociate) the print context previously associated with display. If there was no previously associated print context, no action is taken. The content of the formerly associated print context is not affected by this call, and other display connections may continue to use the print context. No messy aftermath, we love that. β¨
Since font capabilities can vary from printer to printer, XpSetContext may modify the list of available fonts (see XListFonts) on display, and the actual set of usable fonts (see XLoadFont). A unique combination of fonts may be available from within a given print context; a client should not assume that all the fonts available when no print context is set will be available when a print context is set. Font lineup can change, bestie β do not assume. π
When a print context is set on a display connection, the default behavior of ListFonts and ListFontsWithInfo is to list all of the fonts normally associated with the X print server (i.e. fonts containing glyphs) as well as any internal printer fonts defined for the printer. The xp-listfonts-modes attribute is provided so that applications can control the behavior of ListFonts and ListFontsWithInfo and is typically used to show just internal printer fonts. Using only internal printer fonts is useful for performance reasons; the glyphs associated with the font are contained within the printer and do not have to be downloaded. Performance queen behavior. π
If the value of xp-listfonts-modes includes xp-list-glyph-fonts, ListFonts and ListFontsWithInfo will include all of the fonts available to the server that have glyphs associated with them. If the value of xp-listfonts-modes includes xp-list-internal-printer-fonts, then ListFonts and ListFontsWithInfo will include all of the fonts defined as internal printer fonts. Literally just follow the mode names, iykyk. π¦
When the print context is unset or XpDestroyContext is called, the available fonts on display revert back to what they were previously. Iconic revert-to-default moment. πΈ
π©Ί DIAGNOSTICS π©Ί
XPBadContextβ a valid print context-id has not been set prior to making this call. So likeβ¦ set it first, bestie. π
π SEE ALSO π
XpDestroyContext(3Xp)XpStartJob(3Xp)
Cute sign-off time: this is the XpSetContext(3Xp) page from X Version 11, libXp 1.0.4 β that's the source/version footer energy, periodt. π«Άπ
π¦ where this page comes from
- arch rolling: libxp 1.0.4-3 Β· X11 AND X11-distribute-modifications-variant
- nixos 26.05: libxp 1.0.4
- nixpkgs unstable: libxp 1.0.4
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- Copyright 1996 Hewlett-Packard Company
- Copyright 1996 International Business Machines Corp
- Copyright 1996, 1999, 2004, Oracle and/or its affiliates. All rights reserved
- Copyright 1996 Novell, Inc
- Copyright 1996 Digital Equipment Corp
- Copyright 1996 Fujitsu Limited
- Copyright 1996 Hitachi, Ltd
- Copyright 1996 X Consortium, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms