diff options
| author | Manolo Gouy <Manolo> | 2011-01-03 16:50:34 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-01-03 16:50:34 +0000 |
| commit | 874bca74f55f686ded8f0b3d2df08196911f26f0 (patch) | |
| tree | f1d394945f49314ee4a8706a4b98daf8ec830ce8 /src/Fl_Quartz_Printer.mm | |
| parent | bb6392f7ec94ba682ebade1d5b30eba9ff30ceb1 (diff) | |
Mac OS X: removed all uses of Carbon (except for older OS versions) and re-organized
text input around the NSTextInput protocol.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Quartz_Printer.mm')
| -rw-r--r-- | src/Fl_Quartz_Printer.mm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Fl_Quartz_Printer.mm b/src/Fl_Quartz_Printer.mm index 825826457..e531fa706 100644 --- a/src/Fl_Quartz_Printer.mm +++ b/src/Fl_Quartz_Printer.mm @@ -92,7 +92,11 @@ int Fl_Printer::start_job (int pagecount, int *frompage, int *topage) status = PMCreatePageFormat(&pageFormat); status = PMSessionDefaultPageFormat(printSession, pageFormat); if (status != noErr) return 1; - status = PMSessionPageSetupDialog(printSession, pageFormat, &accepted); + // get pointer to the PMSessionPageSetupDialog Carbon fucntion + typedef OSStatus (*dialog_f)(PMPrintSession, PMPageFormat, Boolean *); + static dialog_f f = NULL; + if (!f) f = (dialog_f)Fl_X::get_carbon_function("PMSessionPageSetupDialog"); + status = (*f)(printSession, pageFormat, &accepted); if (status != noErr || !accepted) { Fl::first_window()->show(); return 1; @@ -102,7 +106,11 @@ int Fl_Printer::start_job (int pagecount, int *frompage, int *topage) status = PMSessionDefaultPrintSettings (printSession, printSettings); if (status != noErr) return 1; PMSetPageRange(printSettings, 1, (UInt32)kPMPrintAllPages); - status = PMSessionPrintDialog(printSession, printSettings, pageFormat, &accepted); + // get pointer to the PMSessionPrintDialog Carbon fucntion + typedef OSStatus (*dialog_f2)(PMPrintSession, PMPrintSettings, PMPageFormat, Boolean *); + static dialog_f2 f2 = NULL; + if (!f2) f2 = (dialog_f2)Fl_X::get_carbon_function("PMSessionPrintDialog"); + status = (*f2)(printSession, printSettings, pageFormat, &accepted); if (!accepted) status = kPMCancel; if (status != noErr) { Fl::first_window()->show(); |
