diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H index 9075f3aac..671dcdb77 100644 --- a/FL/Fl_Printer.H +++ b/FL/Fl_Printer.H @@ -53,7 +53,7 @@ class Fl_System_Printer : public Fl_Paged_Device { private: /** \brief the printer's graphics context, if there's one, NULL otherwise */ void *gc; - void set_current(); + void set_current(void); #ifdef __APPLE__ float scale_x; float scale_y; @@ -116,7 +116,6 @@ public: #endif // FL_DOXYGEN }; // class Fl_System_Printer -/** \brief OS-independant class name */ typedef Fl_System_Printer Fl_Printer; #endif @@ -129,8 +128,6 @@ typedef Fl_System_Printer Fl_Printer; Fl_Printer is typedef'ed to Fl_PostScript_Printer under Unix/Linux. */ class Fl_PostScript_Printer : public Fl_PostScript_File_Device { -private: - void set_current(); public: static const char *device_type; int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL); @@ -158,7 +155,6 @@ public: #endif // FL_DOXYGEN }; -/** \brief OS-independant class name */ typedef Fl_PostScript_Printer Fl_Printer; #endif diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx index 7214ea1b7..bef1c25a3 100644 --- a/src/Fl_Printer.cxx +++ b/src/Fl_Printer.cxx @@ -78,7 +78,8 @@ const char *Fl_Printer::property_cancel = "Cancel"; const char *Fl_Printer::device_type = "Fl_Printer"; -void Fl_Printer::set_current() +#if defined(__APPLE__) || defined(WIN32) +void Fl_System_Printer::set_current(void) { #ifdef __APPLE__ fl_gc = (CGContextRef)gc; @@ -87,6 +88,7 @@ void Fl_Printer::set_current() #endif this->Fl_Surface_Device::set_current(); } +#endif // // End of "$Id$". diff --git a/src/Fl_Quartz_Printer.mm b/src/Fl_Quartz_Printer.mm index 479cd846d..825826457 100644 --- a/src/Fl_Quartz_Printer.mm +++ b/src/Fl_Quartz_Printer.mm @@ -41,6 +41,7 @@ Fl_System_Printer::Fl_System_Printer(void) y_offset = 0; scale_x = scale_y = 1.; type_ = device_type; + gc = 0; driver(fl_graphics_driver); }