XMPRINTPOPUPPDM(3)
π XmPrintPopupPDM π
okay bestie, welcome to the XmPrintPopupPDM page β it's a library call and it is literally the little messenger that tells the PDM to show up. no cap. let's get into it π«Ά
β¨ NAME β¨
XmPrintPopupPDM β Send a notification for the PDM to be popped up π
πΈ SYNOPSIS πΈ
#include <Xm/Print.h>
XtEnum XmPrintPopupPDM(
Widgetprint_shell,
Widgetvideo_transient_for);
yes the spacing is exactly like that, do not come for me, I'm just the messenger π
π¦ DESCRIPTION π¦
okay so. XmPrintPopupPDM is a convenience function that sends a notification to start a Print Dialog Manager on behalf of the application. and the way it does that? it hides all the details of the X selection mechanism that's used to notify the PDM that a new dialog has to be popped up for this app. you don't have to think about it, it just handles it. iconic behaviour honestly. π
so here's the tea: XmPrintPopupPDM sends a selection request to either the print display of the print shell, or the video display of the transient_for video widget β and which one it picks depends on the environment variable XPDMDISPLAY, which can only take the value "print" or "video". it's asking for the PDM windows to be popped up on behalf of the app. that's the whole vibe check. π
now for the important part, because this is where people get confused:
it returns right away, with either the status XmPDM_NOTIFY_FAIL or XmPDM_NOTIFY_SUCCESS.
XmPDM_NOTIFY_FAILhappens when things go wrong β e.g. if the function couldn'tmallocmemory for the selection value, or ifXPDMDISPLAYis not"print"or"video".XmPDM_NOTIFY_SUCCESSonly means a "message" was sent out to the PDM specified byXPDMSELECTION. it does NOT mean it's already up on the screen yet. π please internalise this, it's giving "delivered β read".
π¨ and in order to actually know if the PDM is up, or not running, the application must register a XmNpdmNotificationCallback with the Print Shell. there is no other way, bestie. that's the rule. β
one more cute detail: XmPrintPopupPDM puts up an InputOnly window on top of the dialog, so that the end user doesn't go poking at the print setup dialog while the PDM is still trying to come up. main character protective energy tbh. π and this window is automatically removed when the shell is about to call the callback for the first time. self-cleaning, we love to see it.
print_shellβ The Print Shell used for this print job and context.video_transient_forβ The video widget dealing with application print setup.
π RETURN VALUE π
Returns XmPDM_NOTIFY_SUCCESS if the function was able to send the notification out to the PDM process, XmPDM_NOTIFY_FAIL otherwise.
that's it. that's the whole return story. short and sweet fr fr. π
π ERRORS/WARNINGS π
Not applicable.
(nothing to see here, we're all good, no drama today β¨)
π EXAMPLES π
example one β callback from a Print set up dialog box "Setup..." button:
PrintSetupCallback(print_dialog...)
/*-------------*/
{
if (XmPrintPopupPDM (pshell, XtParent(print_dialog)) !=
XmPDM_NOTIFY_SUCCESS) {
/* some error dialog */
}
}
example two β XmNpdmNotificationCallback from a Print Shell:
pdmNotifyCB(print_shell...)
{
XmPrintShellCallBackStruct * pr_cb = ...
switch (pr_cb->reason) {
case XmCR_PDM_NONE:
/* no PDM available */
PostErrorDialog(...);
break;
case XmCR_PDM_VXAUTH:
/* PDM is not authorized ... */
PostErrorDialog(...);
break;
case XmCR_PDM_UP: the PDM is up and running
/* everything is fine */
break;
default: /* other cases */
}
}
π SEE ALSO π
and that's the page babes π«Ά this was XmPrintPopupPDM, from the library call section, and the footer of this page is literally just XmPrintPopupPDM(library call) β so consider this your lil sign-off. go forth and pop up that PDM. π
β¨πΈ
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms