XpCancelJob(3Xp)

πŸ’– XpCancelJob(3Xp) πŸ’–

hey bestie, welcome to the XPRINT FUNCTIONS corner of the manual. this is the XpCancelJob(3Xp) page, and it is literally about cancelling one single print job. one job. that’s the assignment. periodt. πŸŽ€


🌸 NAME 🌸

XpCancelJob β€” cancels a single print job. just one, bestie. not a whole queue situation. πŸ’…


✨ SYNOPSIS ✨

the whole β€œhow do i even call this” vibe:

       cc [ flag... ] file... -lXp [ library... ]
       #include <X11/extensions/Print.h>

       void XpCancelJob ( display, discard )
             Display *display;
             Bool discard;

πŸ¦‹ ARGUMENTS πŸ¦‹

  • display β€” this is a pointer to the Display structure, and you get it back from XOpenDisplay. yes, that Display. iconic. πŸ’–
  • discard β€” when this is TRUE, it means all XPPrintNotify events should be discarded. bye-bye, events. πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

okay so XpCancelJob cancels an in-progress job. like, mid-print. mid-vibe. it’s doing the cancelling thing.

if the job was started with output_mode XPGetData, then the data stream to XpGetDocumentData is terminated. and ngl, for many page description languages, that kind of arbitrary termination may invalidate the output. 😭 so yeah, it can get messy.

if the job was started with output_mode XPSpool, then depending on the driver and spooler configuration, the entire job may be canceled or a partial job may be generated. so it’s giving β€œit depends,” which is not always the most slay answer, but it’s the true one. πŸ’€

if discard is TRUE, then all XPPrintNotify events with a detail field of XPEndPageNotify, XPEndDocNotify, or XPEndJobNotify are discarded before XpCancelJob returns. like, they’re gone before you even get back. 🫢

for clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify will be generated with its detail field set to XPEndJobNotify. that’s the event tea. β˜•βœ¨


πŸ’œ DIAGNOSTICS πŸ’œ

  • XPBadContext β€” a valid print context-id has not been set prior to making this call. no valid context, no cute little cancel. 😬
  • XPBadSequence β€” the function was not called in the proper order with respect to the other X Print Service Extension calls (for example, XpEndJob prior to XpStartJob). out-of-order calls are not the main character energy we’re looking for. πŸ’…

🌈 SEE ALSO 🌈

  • XpEndJob(3Xp)
  • XpGetDocumentData(3Xp)
  • XpSelectInput(3Xp)
  • XpStartJob(3Xp)

k bye bestie πŸ’‹ this page came from X Version 11, libXp 1.0.4, and the XpCancelJob(3Xp) manual. mwah πŸ’–πŸŽ€

πŸ“¦ where this page comes from