XpGetAttributes(3Xp)
π NAME π
XpGetAttributes β gets an attribute pool from the specified print context. This one is from the XPRINT FUNCTIONS chapter, page 3Xp, and it's basically here to hand you the whole attribute-pool vibe β¨
π¦ SYNOPSIS π¦
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>
char *XpGetAttributes ( display, context, type )
Display *display;
XPContext context;
XPAttributes type;
π ARGUMENTS π
displayβ a pointer to theDisplaystructure, bestie; you get it back fromXOpenDisplay.contextβ the print context you're pulling the attribute pool out of.typeβ specifies which attribute pool you want.
πΈ DESCRIPTION πΈ
XpGetAttributes returns a pool, which is a COMPOUND_TEXT resource string representing the attribute pool specified by type. The caller is expected to free pool when it's no longer needed, using XFree. Don't leave your girl hanging, okay? π
The attribute pool β and therefore the resource string β consists of many name-value pairs (for example, "copy-count: 3"). The syntax of an attribute pool is the same as an X resource file (see "Resource File Syntax" in the Xlib specification).
Valid characters for each name (the left hand side) are derived from the Posix which is "a"-"z" and "A"="Z" and "0"-"9" and "_" and "-". Yes, the page really has that "A"="Z" moment β I'm copying it exactly, no cap π
Valid characters for each value (the right hand side) are all characters except NULL and unescaped NEWLINE, though all predefined values in the X Print Service are confined to X Portable Character Set (XPCS) characters. Non-XPCS values are typically limited to localized "description" strings. See XpCreateContext regarding the locale hint for more information on localized values.
If any errors occur, XpGetAttributes returns NULL.
π§ STRUCTURES π§
The values for the typedef XPAttributes in <X11/extensions/Print.h> are:
#define XPJobAttr 1 /β get/set */
#define XPDocAttr 2 /β get/set */
#define XPPageAttr 3 /β get/set-subset of XPDocAttr */
#define XPPrinterAttr 4 /β get only (library) */
#define XPServerAttr 5 /β get only (library), no context needed */
π₯ DIAGNOSTICS π₯
BadAllocβ insufficient memory πBadValueβ the value specified fortypeis not validXPBadContextβ the specified print context-id is not valid
π FILES π
<X11/extensions/Print.h>
π SEE ALSO π
XpCreateContext(3Xp)
okay that's the whole page, bestie β X Version 11, libXp 1.0.4, and the footer didn't give me a date to quote, so I'm not inventing one ππ
π¦ 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