DTPRINT(5)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– Dt/Print.h β€” print definitions πŸ’–

the file formats manual page, but make it group chat, bestie ✨

πŸŽ€ NAME πŸŽ€

Dt/Print.h β€” print definitions. That's the whole vibe: this header is the blueprint for the Print widget class, and it's giving resource names, resource values, callback lore, structs, and function prototypes. 🫢

✨ SYNOPSIS ✨

#include &<Dt/Print.h>

Okay so you include it like that, exactly. πŸ’…

πŸ’… DESCRIPTION πŸ’…

The Dt/Print.h header defines resource names, resource values, callback reasons, callback structures, and function prototypes for the Print widget class. It's a lot, but we're gonna get through it together. 🌸

🏷️ Resource names (the DtN girlies)

The Dt/Print.h header defines the following resource names:

  • DtNcancelCallback β†’ cancelCallback
  • DtNclosePrintDisplayCallback β†’ closePrintDisplayCallback
  • DtNcopies β†’ copies
  • DtNdescription β†’ description
  • DtNdestroyContextCallback β†’ destroyContextCallback
  • DtNfileName β†’ fileName
  • DtNminimizeButtons β†’ minimizeButtons (if not otherwise named)
  • DtNoptionCount β†’ optionCount
  • DtNoptions β†’ options
  • DtNprintCallback β†’ printCallback
  • DtNprintDestination β†’ printDestination
  • DtNprinterInfoProc β†’ printerInfoProc
  • DtNprinterName β†’ printerName
  • DtNprintSetupMode β†’ printSetupMode
  • DtNselectFileProc β†’ selectFileProc
  • DtNselectPrinterProc β†’ selectPrinterProc
  • DtNsetupCallback β†’ setupCallback
  • DtNverifyPrinterProc β†’ verifyPrinterProc
  • DtNworkAreaLocation β†’ workAreaLocation

πŸŽ€ Resource values (the DtC crew, plus one DtR)

And these are the resource values, no cap:

  • DtCCancelCallback β†’ CancelCallback
  • DtCClosePrintDisplayCallback β†’ ClosePrintDisplayCallback
  • DtCCopies β†’ Copies
  • DtCDescription β†’ Description
  • DtCDestroyContextCallback β†’ DestroyContextCallback
  • DtCFileName β†’ FileName
  • DtCMinimizeButtons β†’ MinimizeButtons (if not otherwise named)
  • DtCOptionCount β†’ OptionCount
  • DtCOptions β†’ Options
  • DtCPrintCallback β†’ PrintCallback
  • DtCPrintDestination β†’ PrintDestination
  • DtCPrinterInfoProc β†’ PrinterInfoProc
  • DtCPrinterName β†’ PrinterName
  • DtCPrintSetupMode β†’ PrintSetupMode
  • DtCSelectFileProc β†’ SelectFileProc
  • DtCSelectPrinterProc β†’ SelectPrinterProc
  • DtCSetupCallback β†’ SetupCallback
  • DtCVerifyPrinterProc β†’ VerifyPrinterProc
  • DtCWorkAreaLocation β†’ WorkAreaLocation
  • DtRPrintSetupProc β†’ PrintSetupProc

🌈 Values for DtNsetupMode

The Dt/Print.h header declares the following values for the DtNsetupMode resource:

  • DtPRINT_SETUP_PLAIN
  • DtPRINT_SETUP_XP

πŸ¦‹ Values for DtNworkAreaLocation

The Dt/Print.h header declares the following values for the DtNworkAreaLocation resource:

  • DtWORK_AREA_NONE
  • DtWORK_AREA_TOP
  • DtWORK_AREA_TOP_AND_BOTTOM
  • DtWORK_AREA_BOTTOM

πŸ’œ Values for DtNprintDestination

The Dt/Print.h header declares the following values for the DtNprintDestination resource:

  • DtPRINT_NO_DESTINATION
  • DtPRINT_TO_PRINTER
  • DtPRINT_TO_FILE

πŸ“ Values for DtNprinterNameMode

The Dt/Print.h header declares the following values for the DtNprinterNameMode resource:

  • DtSHORT_NAME
  • DtMEDIUM_NAME
  • DtLONG_NAME

🧚 Mode values for DtPrintSetupBoxResetConnection()

The Dt/Print.h header declares the following mode values for DtPrintSetupBoxResetConnection():

       typedef enum {
           DtPRINT_CLOSE_CONNECTION,
           DtPRINT_RELEASE_CONNECTION
       } DtPrintResetConnectionMode;

πŸ”₯ Callback reasons

The Dt/Print.h header declares the following callback reasons:

  • DtPRINT_CR_NONE
  • DtPRINT_CR_CANCEL
  • DtPRINT_CR_CLOSE_PRINT_DISPLAY
  • DtPRINT_CR_PRINT
  • DtPRINT_CR_SETUP

πŸ‘‘ Return values for the DtPrint procedure

The Dt/Print.h header declares the following return values for the DtPrint procedure:

  • DtPRINT_SUCCESS,
  • DtPRINT_BAD_PARM,
  • DtPRINT_FAILURE,
  • DtPRINT_INVALID_DISPLAY,
  • DtPRINT_NOT_XP_DISPLAY,
  • DtPRINT_NO_CONNECTION,
  • DtPRINT_NO_DEFAULT,
  • DtPRINT_NO_DEFAULT_DISPLAY,
  • DtPRINT_NO_PRINTER,
  • DtPRINT_PRINTER_MISSING

πŸ’€ What those return values mean (where the page gives the tea)

  • DtPRINT_SUCCESS β€” The X printer connection was successfully obtained.
  • DtPRINT_BAD_PARM β€” The value passed for print_data is NULL, or the value of the DtNprintSetupMode resource for wid is not DtPRINT_SETUP_XP.
  • DtPRINT_FAILURE β€” The X printer connection failed.
  • DtPRINT_INVALID_DISPLAY β€” The indicated X print server could not be found.
  • DtPRINT_NOT_XP_DISPLAY β€” The indicated X server does not support the X Printing Extension.
  • DtPRINT_NO_CONNECTION β€” An open X print server connection is not currently being managed by the DtPrintSetupBox.
  • DtPRINT_NO_PRINTER β€” The indicated printer could not be found on the X print server, or a default printer could not be determined.

The page doesn't give one-liners for DtPRINT_NO_DEFAULT, DtPRINT_NO_DEFAULT_DISPLAY, or DtPRINT_PRINTER_MISSING, so we're not inventing any. πŸ’…

🌟 Class record constants

The Dt/Print.h header declares the following class record constants:

       WidgetClass dtPrintSetupBoxWidgetClass;

       _DtPrintSetupBoxClassRec * DtPrintSetupBoxWidgetClass;
       _DtPrintSetupBoxRec      * DtPrintSetupBoxWidget;

🫢 Callback prototypes

The header defines the following callback prototypes:

       typedef struct _DtPrintSetupData
       {
           String    printer_name;
           Display   *print_display;
           XPContext      print_context;
           XtEnum    destination;
           String    dest_info;
       } DtPrintSetupData;

       typedef struct _DtPrintSetupCallbackStruct
       {
           int       reason;
           XEvent         *event;
           DtPrintSetupData    *print_data;
       } DtPrintSetupCallbackStruct;

🌸 Functions

The header defines the following functions:

       Widget DtCreatePrintSetupBox(
                           Widget   p,
                           String   name,
                           ArgList  args,
                           Cardinal n);

       Widget DtCreatePrintSetupDialog(
                           Widget   ds_p,
                           String   name,
                           ArgList  sb_args,
                           Cardinal sb_n);

       DtPrintSetupData* DtPrintCopySetupData(
                                  DtPrintSetupData*        target,
                                  const DtPrintSetupData*  source);

       XtEnum DtPrintFillSetupData(
                          Widget          psub,
                          DtPrintSetupData*   print_data);

       void DtPrintFreeSetupData(
                        DtPrintSetupData* target);

       XtEnum DtPrintResetConnection(
                            Widget                     psub,
                            DtPrintResetConnectionMode m);

🌈 SEE ALSO 🌈

DtCreatePrintSetupBox(3), DtCreatePrintSetupDialog(3), DtPrintCopySetupData(3), DtPrintFillSetupData(3), DtPrintFreeSetupData(3), DtPrintResetConnection(3), DtPrintSetupBox(3), Print(4), and dtprintinfo(1).


✨ signed off with the Dt/Print.h (file formats) footer energy β€” that's the source/version tea, and no separate date is shown, so we're keeping it cute and factual. Periodt. πŸ«ΆπŸ’…

πŸ“¦ where this page comes from