DTPRINTRESETCONNECTION(3)

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

✨ NAME ✨

DtPrintResetConnection β€” the library call that resets the print display connection managed by a DtPrintSetupBox. yep bestie, this is the DtPrintResetConnection(library call) page, and we're gonna make it make sense πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

       #include &<Print.h>
       XtEnum DtPrintResetConnection(
       Widget wid,
       DtPrintResetConnectionMode mode);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so DtPrintResetConnection is a convenience function that comes with the DtPrintSetupBox widget. it lets applications tell the widget to stop managing the X print server connection. there's a mode parameter because the widget needs to know whether it should close the print connection by calling XpDestroyPrintContext and XCloseDisplay, or just relinquish control of the connection without closing it. very "you can hold it, but don't touch my stuff" energy πŸ’…

this function is intended for apps that fork a child process to do the print rendering operation. immediately after the fork happens, the parent process closes its X print server connection and keeps its connection to the video X server. the forked child, on the other hand, closes its video X server connection and performs the rendering operation on the X print server connection. teamwork, but make it Unix 🌈


πŸ’– ARGUMENTS πŸ’–

  • wid β€” the DtPrintSetupBox widget ID. that's the widget bestie in question 🫢
  • mode β€” tells DtPrintResetConnection whether it should close the X print server connection, or just make the DtPrintSetupBox stop managing the connection. valid values are:
    • DtPRINT_CLOSE_CONNECTION β€” set by the parent process when the application forks a child to perform the print rendering. this will cause the DtNclosePrintDisplayCallback list set for the passed DtPrintSetupBox to be called. noted, exactly as written πŸ‘€
    • DtPRINT_RELEASE_CONNECTION β€” set when the application wants to destroy the DtPrintSetupBox widget instance and still perform print rendering using the X print server connection that the widget initiated. for example, the child process of an application that forks to perform print rendering will close the video display connection (thereby destroying the DtPrintSetupBox widget) prior to print rendering. no DtPrintSetupBox callbacks will be called as a result of this operation. zero callbacks, periodt πŸ’€

πŸ‘‘ RETURN VALUE πŸ‘‘

  • DtPRINT_SUCCESS β€” DtPrintResetConnection was successful. slay ✨
  • DtPRINT_NO_CONNECTION β€” an open X print server connection is not currently being managed by the DtPrintSetupBox.
  • DtPRINT_BAD_PARM β€” the value passed for wid is NULL, or an invalid mode was passed. yeah, that's a nope πŸ™ˆ

🌸 ENVIRONMENT VARIABLES 🌸

None β€” literally no environment variables in the mix here, bestie.


⭐ RESOURCES ⭐

None β€” no resources listed on this page.


🧚 ACTIONS/MESSAGES 🧚

None β€” no actions or messages listed.


πŸ’œ ERRORS/WARNINGS πŸ’œ

None β€” no errors or warnings listed.


πŸ“ EXAMPLES πŸ“

None β€” no examples on this page, sadly.


πŸŽ€ FILES πŸŽ€

None β€” no files listed.


πŸ”₯ SEE ALSO πŸ”₯

DtPrintSetupBox(3) β€” go read that one next, iykyk πŸ’–


cute sign-off: the footer here is just DtPrintResetConnection(library call) β€” no extra version/date line to spill, so that's the whole outro, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from