summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-05-09 14:16:35 +0000
committerManolo Gouy <Manolo>2018-05-09 14:16:35 +0000
commit2b7aac129b05638ffd21be5c037192e797d6d074 (patch)
treedd00e6cb7d95bbc0d5c78cb05cd0ec13fc819bce /src
parent80818999345212384326ec833d090988c633eb49 (diff)
Rename Fl_Paged_Device::start_job() to begin_job() and Fl_Paged_Device::start_page() to begin_page().
The new function names begin_job() and begin_page() better match end_job() and end_page() with which they must be used by pair. The old names start_job() and start_page() are maintained for API compatibility with FLTK 1.3.x git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Paged_Device.cxx8
-rw-r--r--src/Fl_Printer.cxx22
-rw-r--r--src/Fl_cocoa.mm4
-rw-r--r--src/Fl_win32.cxx4
-rw-r--r--src/Fl_x.cxx4
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm10
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.cxx2
-rw-r--r--src/drivers/Posix/Fl_Posix_Printer_Driver.cxx8
-rw-r--r--src/drivers/PostScript/Fl_PostScript.cxx8
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx8
10 files changed, 39 insertions, 39 deletions
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx
index 8507382f2..68b71f565 100644
--- a/src/Fl_Paged_Device.cxx
+++ b/src/Fl_Paged_Device.cxx
@@ -26,23 +26,23 @@
/**
- @brief Starts a print job.
+ @brief Begins a print job.
@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
*/
-int Fl_Paged_Device::start_job(int pagecount, int *frompage, int *topage) {return 1;}
+int Fl_Paged_Device::begin_job(int pagecount, int *frompage, int *topage) {return 1;}
/**
- @brief Starts a new printed page
+ @brief Begins a new printed page
The page coordinates are initially in points, i.e., 1/72 inch,
and with origin at the top left of the printable page area.
@return 0 if OK, non-zero if any error
*/
-int Fl_Paged_Device::start_page (void) {return 1;}
+int Fl_Paged_Device::begin_page (void) {return 1;}
/**
@brief Computes the dimensions of margins that lie between the printable page area and
diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx
index 36000e8ef..9d10a92b5 100644
--- a/src/Fl_Printer.cxx
+++ b/src/Fl_Printer.cxx
@@ -31,8 +31,8 @@
Fl_Printer::Fl_Printer(void) {
printer = NULL;
}
-int Fl_Printer::start_job(int pagecount, int *frompage, int *topage) {return 1;}
-int Fl_Printer::start_page(void) {return 1;}
+int Fl_Printer::begin_job(int pagecount, int *frompage, int *topage) {return 1;}
+int Fl_Printer::begin_page(void) {return 1;}
int Fl_Printer::printable_rect(int *w, int *h) {return 1;}
void Fl_Printer::margins(int *left, int *top, int *right, int *bottom) {}
void Fl_Printer::origin(int *x, int *y) {}
@@ -68,12 +68,12 @@ const char *Fl_Printer::property_save = NULL;
const char *Fl_Printer::property_cancel = NULL;
Fl_PostScript_File_Device::Fl_PostScript_File_Device(void) {}
-int Fl_PostScript_File_Device::start_job(int pagecount, int* from, int* to) {return 1;}
-int Fl_PostScript_File_Device::start_job(int pagecount, enum Fl_Paged_Device::Page_Format format,
+int Fl_PostScript_File_Device::begin_job(int pagecount, int* from, int* to) {return 1;}
+int Fl_PostScript_File_Device::begin_job(int pagecount, enum Fl_Paged_Device::Page_Format format,
enum Fl_Paged_Device::Page_Layout layout) {return 1;}
-int Fl_PostScript_File_Device::start_job(FILE *ps_output, int pagecount, enum Fl_Paged_Device::Page_Format format,
+int Fl_PostScript_File_Device::begin_job(FILE *ps_output, int pagecount, enum Fl_Paged_Device::Page_Format format,
enum Fl_Paged_Device::Page_Layout layout) {return 1;}
-int Fl_PostScript_File_Device::start_page (void) {return 1;}
+int Fl_PostScript_File_Device::begin_page (void) {return 1;}
int Fl_PostScript_File_Device::printable_rect(int *w, int *h) {return 1;}
void Fl_PostScript_File_Device::margins(int *left, int *top, int *right, int *bottom) {}
void Fl_PostScript_File_Device::origin(int *x, int *y) {}
@@ -135,7 +135,7 @@ Fl_Printer::Fl_Printer(void) {
}
/**
- Starts a print job.
+ Begins a print job.
Opens a platform-specific dialog window allowing the user to set several options including
the desired printer and the page orientation. Optionally, the user can also select a range of pages to be
printed. This range is returned to the caller that is in charge of sending only these pages
@@ -146,14 +146,14 @@ Fl_Printer::Fl_Printer(void) {
@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 occurred or if the user cancelled the print request.
*/
-int Fl_Printer::start_job(int pagecount, int *frompage, int *topage)
+int Fl_Printer::begin_job(int pagecount, int *frompage, int *topage)
{
- return printer->start_job(pagecount, frompage, topage);
+ return printer->begin_job(pagecount, frompage, topage);
}
-int Fl_Printer::start_page(void)
+int Fl_Printer::begin_page(void)
{
- return printer->start_page();
+ return printer->begin_page();
}
int Fl_Printer::printable_rect(int *w, int *h)
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index cb9945eb0..6309d1d27 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3809,8 +3809,8 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int
Fl_Window *win = Fl::first_window();
if(!win) return;
if (win->parent()) win = win->top_window();
- if( printer.start_job(1) ) return;
- if( printer.start_page() ) return;
+ if( printer.begin_job(1) ) return;
+ if( printer.begin_page() ) return;
fl_lock_function();
// scale the printer device so that the window fits on the page
float scale = 1;
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index eb3aa244f..8f5259fef 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -2729,11 +2729,11 @@ void printFront(Fl_Widget *o, void *data) {
if (!win)
return;
int w, h;
- if (printer.start_job(1)) {
+ if (printer.begin_job(1)) {
o->window()->show();
return;
}
- if (printer.start_page()) {
+ if (printer.begin_page()) {
o->window()->show();
return;
}
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 65d83a76c..6b9c2fad8 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -2960,8 +2960,8 @@ void printFront(Fl_Widget *o, void *data)
Fl_Window *win = Fl::first_window();
if(!win) return;
int w, h;
- if( printer.start_job(1) ) { o->window()->show(); return; }
- if( printer.start_page() ) { o->window()->show(); return; }
+ if( printer.begin_job(1) ) { o->window()->show(); return; }
+ if( printer.begin_page() ) { o->window()->show(); return; }
printer.printable_rect(&w,&h);
// scale the printer device so that the window fits on the page
float scale = 1;
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm b/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm
index 25d209e5d..d9a43b1f2 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm
+++ b/src/drivers/Cocoa/Fl_Cocoa_Printer_Driver.mm
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-#include <FL/Fl_Printer.H>
+#include <FL/Fl_Paged_Device.H>
#include <FL/Fl_Window_Driver.H>
#include <FL/Fl_Screen_Driver.H>
#include "../Quartz/Fl_Quartz_Graphics_Driver.H"
@@ -56,8 +56,8 @@ private:
PMPageFormat pageFormat;
PMPrintSettings printSettings;
Fl_Cocoa_Printer_Driver(void);
- int start_job(int pagecount, int *frompage = NULL, int *topage = NULL);
- int start_page (void);
+ int begin_job(int pagecount, int *frompage = NULL, int *topage = NULL);
+ int begin_page (void);
int printable_rect(int *w, int *h);
void margins(int *left, int *top, int *right, int *bottom);
void origin(int *x, int *y);
@@ -91,7 +91,7 @@ Fl_Cocoa_Printer_Driver::~Fl_Cocoa_Printer_Driver(void) {
}
-int Fl_Cocoa_Printer_Driver::start_job (int pagecount, int *frompage, int *topage)
+int Fl_Cocoa_Printer_Driver::begin_job (int pagecount, int *frompage, int *topage)
//printing using a Quartz graphics context
//returns 0 iff OK
{
@@ -277,7 +277,7 @@ void Fl_Cocoa_Printer_Driver::untranslate(void)
CGContextRestoreGState(gc);
}
-int Fl_Cocoa_Printer_Driver::start_page (void)
+int Fl_Cocoa_Printer_Driver::begin_page (void)
{
OSStatus status = PMSessionBeginPageNoDialog(printSession, pageFormat, NULL);
CGContextRef gc;
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
index 1662f6847..5bad36062 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
@@ -92,7 +92,7 @@ int Fl_Darwin_System_Driver::clocale_printf(FILE *output, const char *format, va
/* Returns the address of a Carbon function after dynamically loading the Carbon library if needed.
Supports old Mac OS X versions that may use a couple of Carbon calls:
GetKeys used by OS X 10.3 or before (in Fl::get_key())
- PMSessionPageSetupDialog and PMSessionPrintDialog used by 10.4 or before (in Fl_Printer::start_job())
+ PMSessionPageSetupDialog and PMSessionPrintDialog used by 10.4 or before (in Fl_Printer::begin_job())
*/
void *Fl_Darwin_System_Driver::get_carbon_function(const char *function_name) {
static void *carbon = ::dlopen("/System/Library/Frameworks/Carbon.framework/Carbon", RTLD_LAZY);
diff --git a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
index 0b5b1e88b..ad8b4fb8d 100644
--- a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
+++ b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
@@ -28,7 +28,7 @@
/** Support for printing on the Unix/Linux platform */
class Fl_Posix_Printer_Driver : public Fl_PostScript_File_Device {
- virtual int start_job(int pagecount, int *frompage = NULL, int *topage = NULL);
+ virtual int begin_job(int pagecount, int *frompage = NULL, int *topage = NULL);
};
Fl_Paged_Device* Fl_Paged_Device::newPrinterDriver(void)
@@ -36,8 +36,8 @@ Fl_Paged_Device* Fl_Paged_Device::newPrinterDriver(void)
return new Fl_Posix_Printer_Driver();
}
-/** Starts a print job. */
-int Fl_Posix_Printer_Driver::start_job(int pages, int *firstpage, int *lastpage) {
+/* Begins a print job. */
+int Fl_Posix_Printer_Driver::begin_job(int pages, int *firstpage, int *lastpage) {
enum Fl_Paged_Device::Page_Format format;
enum Fl_Paged_Device::Page_Layout layout;
@@ -112,7 +112,7 @@ int Fl_Posix_Printer_Driver::start_job(int pages, int *firstpage, int *lastpage)
if (!print_pipe) printer = "<File>";
if (!print_pipe) // fall back to file printing
- return Fl_PostScript_File_Device::start_job (pages, format, layout);
+ return Fl_PostScript_File_Device::begin_job (pages, format, layout);
// Print: pipe the output into the lp command...
diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx
index 75facf987..ca2ea3085 100644
--- a/src/drivers/PostScript/Fl_PostScript.cxx
+++ b/src/drivers/PostScript/Fl_PostScript.cxx
@@ -59,7 +59,7 @@ Fl_PostScript_Graphics_Driver *Fl_PostScript_File_Device::driver()
}
-int Fl_PostScript_File_Device::start_job (int pagecount, enum Fl_Paged_Device::Page_Format format,
+int Fl_PostScript_File_Device::begin_job (int pagecount, enum Fl_Paged_Device::Page_Format format,
enum Fl_Paged_Device::Page_Layout layout)
{
Fl_Native_File_Chooser fnfc;
@@ -85,7 +85,7 @@ extern "C" {
}
}
-int Fl_PostScript_File_Device::start_job (FILE *ps_output, int pagecount,
+int Fl_PostScript_File_Device::begin_job (FILE *ps_output, int pagecount,
enum Fl_Paged_Device::Page_Format format, enum Fl_Paged_Device::Page_Layout layout)
{
Fl_PostScript_Graphics_Driver *ps = driver();
@@ -97,7 +97,7 @@ int Fl_PostScript_File_Device::start_job (FILE *ps_output, int pagecount,
return 0;
}
-int Fl_PostScript_File_Device::start_job(int pagecount, int* from, int* to)
+int Fl_PostScript_File_Device::begin_job(int pagecount, int* from, int* to)
{
return 1;
}
@@ -1429,7 +1429,7 @@ void Fl_PostScript_File_Device::untranslate(void)
fprintf(driver()->output, "GR GR\n");
}
-int Fl_PostScript_File_Device::start_page (void)
+int Fl_PostScript_File_Device::begin_page (void)
{
Fl_PostScript_Graphics_Driver *ps = driver();
ps->page(ps->page_format_);
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
index edd56ddf4..2568743c6 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
@@ -37,8 +37,8 @@ private:
int top_margin;
void absolute_printable_rect(int *x, int *y, int *w, int *h);
Fl_WinAPI_Printer_Driver(void);
- int start_job(int pagecount, int *frompage = NULL, int *topage = NULL);
- int start_page (void);
+ int begin_job(int pagecount, int *frompage = NULL, int *topage = NULL);
+ int begin_page (void);
int printable_rect(int *w, int *h);
void margins(int *left, int *top, int *right, int *bottom);
void origin(int *x, int *y);
@@ -84,7 +84,7 @@ static void WIN_SetupPrinterDeviceContext(HDC prHDC)
}
-int Fl_WinAPI_Printer_Driver::start_job (int pagecount, int *frompage, int *topage)
+int Fl_WinAPI_Printer_Driver::begin_job (int pagecount, int *frompage, int *topage)
// returns 0 iff OK
{
if (pagecount == 0) pagecount = 10000;
@@ -214,7 +214,7 @@ int Fl_WinAPI_Printer_Driver::printable_rect(int *w, int *h)
return 0;
}
-int Fl_WinAPI_Printer_Driver::start_page (void)
+int Fl_WinAPI_Printer_Driver::begin_page (void)
{
int rsult, w, h;