XpGetPrinterList(3Xp)
π NAME π
Okay bestie, this is XpGetPrinterList(3Xp) from the XPRINT FUNCTIONS manual, and it's literally the function that retrieves a list of all printers supported on an X Print Server. Iconic. β¨
πΈ SYNOPSIS πΈ
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>
XPPrinterList XpGetPrinterList ( display, printer_name,
list_count_return )
Display *display;
char *printer_name;
int *list_count_return;
π¦ ARGUMENTS π¦
displayβ a pointer to theDisplaystructure; you get it back fromXOpenDisplay. That's the plug, bestie. πprinter_nameβ the name of the printer you want info about. If it'sNULL, then information is returned for all printers associated with the server. No cap.list_count_returnβ this one returns the number of printers in the list. It's giving "count goes here." π
π DESCRIPTION π
XpGetPrinterList returns a list of printer records, and each record describes a printer supported by the X Print Server β or NULL if any errors occur. π
If printer_name is NULL, then a list of all printers supported is returned. If printer_name is non-NULL, only print records matching printer_name are returned, and if no records match printer_name, then NULL is returned.
printer_name is a COMPOUND_TEXT string, and the name and desc fields in the returned list will be in COMPOUND_TEXT. Quick note: ISO 8859-1 (Latin-1) is a proper subset of COMPOUND_TEXT, so it can be used directly. If printer_name is in a code-set that the X Print Server cannot convert (into its operating code-set), then the X Print Server may fail to locate the requested printer. If printer_name is NULL, then all printer names, regardless of their code-set, can be returned, leaving the task of specific printer recognition up to the caller. Iykyk. π§
When XpGetPrinterList is called, the caller's locale (see XpSetLocaleHinter) is included in the request as a "hint" to the X Print Server. If supported by the implementation, the X Print Server will use the hint to locate a localized description for each printer in the list. If the X Print Server cannot understand the hint, the X Print Server will choose a default. The returned printer list can be freed by calling XpFreePrinterList. Free your list, bestie β it's self-care. π«Ά
The XPPrinterList structure defined in <X11/extensions/Print.h> contains:
typedef struct {
char *name; /β name */
char *desc; /β localized description */
} XPPrinterRec, *XPPrinterList;
π DIAGNOSTICS π
BadAllocβ insufficient memory. That's the whole diagnostic, and honestly valid. π
π SEE ALSO π
XpFreePrinterList(3Xp)XpSetLocaleHinter(3Xp)
Okay that's the whole page, bestie! This came from X Version 11, libXp 1.0.4, and the footer has no date to give you β so no fake date, 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