diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-04-22 15:59:22 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-04-22 16:01:33 +0200 |
| commit | 2878fa95ab4e30046472a8c1f7576aa6a39f8ba5 (patch) | |
| tree | b37fec88aee27a8e1095b649f10017d44ef69d60 /src/Fl_Paged_Device.cxx | |
| parent | b38317b8a5c5aa6b37d4eb559b094da4e31d9a44 (diff) | |
Add optional argument to Fl_Printer::begin_job() to inform caller when an error occurs.
This solves an issue raised in fltk.general : Fl_Printer errors - how can I interpret them?
https://www.fltk.org/newsgroups.php?s38419+gfltk.general+v38427
Diffstat (limited to 'src/Fl_Paged_Device.cxx')
| -rw-r--r-- | src/Fl_Paged_Device.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx index cc61f4cc0..3d96d797f 100644 --- a/src/Fl_Paged_Device.cxx +++ b/src/Fl_Paged_Device.cxx @@ -31,9 +31,11 @@ \param[in] pagecount the total number of pages of the job (or 0 if you don't know the number of pages) \param[out] frompage if non-null, *frompage is set to the first page the user wants printed \param[out] topage if non-null, *topage is set to the last page the user wants printed - \return 0 if OK, non-zero if any error + \param[out] perr_message if non-null and if the returned value is > 1, *perr_message is set to a string + describing the error. That string can be delete[]'d after use. + \return 0 if OK, 1 if user cancelled the job, > 1 if any error. */ -int Fl_Paged_Device::begin_job(int pagecount, int *frompage, int *topage) {return 1;} +int Fl_Paged_Device::begin_job(int pagecount, int *frompage, int *topage, char **perr_message) {return 1;} /** \brief Begins a new printed page |
