Make virtual void Fl_Surface_Device::end_current_() have no argument because none is used.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12889 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2018-05-01 17:09:15 +00:00
parent e70733b46f
commit b73ff860cc
6 changed files with 11 additions and 12 deletions

View File

@ -58,9 +58,8 @@ class FL_EXPORT Fl_Surface_Device {
static Fl_Surface_Device *surface_; // the surface that currently receives graphics requests static Fl_Surface_Device *surface_; // the surface that currently receives graphics requests
static Fl_Surface_Device *default_surface(); // create surface if none exists yet static Fl_Surface_Device *default_surface(); // create surface if none exists yet
/* Some drawing surfaces (e.g., Fl_XXX_Image_Surface_Driver) re-implement this. /* Some drawing surfaces (e.g., Fl_XXX_Image_Surface_Driver) re-implement this.
Gets called each time a surface ceases to be the current drawing surface. Gets called each time a surface ceases to be the current drawing surface. */
The next_current argument gives the drawing surface that will become current next */ virtual void end_current_() {}
virtual void end_current_(Fl_Surface_Device *next_current) {}
protected: protected:
/** Constructor that sets the graphics driver to use for the created surface. */ /** Constructor that sets the graphics driver to use for the created surface. */
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; } Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }

View File

@ -50,7 +50,7 @@
is Fl_Surface_Device::push_current( ) / Fl_Surface_Device::pop_current().*/ is Fl_Surface_Device::push_current( ) / Fl_Surface_Device::pop_current().*/
void Fl_Surface_Device::set_current(void) void Fl_Surface_Device::set_current(void)
{ {
if (surface_) surface_->end_current_(this); if (surface_) surface_->end_current_();
fl_graphics_driver = pGraphicsDriver; fl_graphics_driver = pGraphicsDriver;
surface_ = this; surface_ = this;
pGraphicsDriver->global_gc(); pGraphicsDriver->global_gc();

View File

@ -24,7 +24,7 @@
#include <windows.h> #include <windows.h>
class Fl_GDI_Image_Surface_Driver : public Fl_Image_Surface_Driver { class Fl_GDI_Image_Surface_Driver : public Fl_Image_Surface_Driver {
virtual void end_current_(Fl_Surface_Device*); virtual void end_current_();
public: public:
Window pre_window; Window pre_window;
int _savedc; int _savedc;
@ -93,7 +93,7 @@ Fl_RGB_Image* Fl_GDI_Image_Surface_Driver::image()
} }
void Fl_GDI_Image_Surface_Driver::end_current_(Fl_Surface_Device*) void Fl_GDI_Image_Surface_Driver::end_current_()
{ {
HDC gc = (HDC)driver()->gc(); HDC gc = (HDC)driver()->gc();
GetWindowOrgEx(gc, &origin); GetWindowOrgEx(gc, &origin);

View File

@ -28,7 +28,7 @@
class Fl_Quartz_Image_Surface_Driver : public Fl_Image_Surface_Driver { class Fl_Quartz_Image_Surface_Driver : public Fl_Image_Surface_Driver {
friend class Fl_Image_Surface; friend class Fl_Image_Surface;
virtual void end_current_(Fl_Surface_Device*); virtual void end_current_();
public: public:
Window pre_window; Window pre_window;
Fl_Quartz_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off); Fl_Quartz_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off);
@ -113,7 +113,7 @@ Fl_RGB_Image* Fl_Quartz_Image_Surface_Driver::image()
return image; return image;
} }
void Fl_Quartz_Image_Surface_Driver::end_current_(Fl_Surface_Device*) void Fl_Quartz_Image_Surface_Driver::end_current_()
{ {
fl_window = pre_window; fl_window = pre_window;
} }

View File

@ -28,7 +28,7 @@
class Fl_Xlib_Copy_Surface_Driver : public Fl_Copy_Surface_Driver { class Fl_Xlib_Copy_Surface_Driver : public Fl_Copy_Surface_Driver {
friend class Fl_Copy_Surface_Driver; friend class Fl_Copy_Surface_Driver;
virtual void end_current_(Fl_Surface_Device*); virtual void end_current_();
protected: protected:
Fl_Offscreen xid; Fl_Offscreen xid;
Window oldwindow; Window oldwindow;
@ -82,7 +82,7 @@ void Fl_Xlib_Copy_Surface_Driver::set_current() {
fl_window = xid; fl_window = xid;
} }
void Fl_Xlib_Copy_Surface_Driver::end_current_(Fl_Surface_Device*) { void Fl_Xlib_Copy_Surface_Driver::end_current_() {
fl_window = oldwindow; fl_window = oldwindow;
} }

View File

@ -21,7 +21,7 @@
#include <FL/Fl_Screen_Driver.H> #include <FL/Fl_Screen_Driver.H>
class Fl_Xlib_Image_Surface_Driver : public Fl_Image_Surface_Driver { class Fl_Xlib_Image_Surface_Driver : public Fl_Image_Surface_Driver {
virtual void end_current_(Fl_Surface_Device *next_current); virtual void end_current_();
public: public:
Window pre_window; Window pre_window;
Fl_Xlib_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off); Fl_Xlib_Image_Surface_Driver(int w, int h, int high_res, Fl_Offscreen off);
@ -77,7 +77,7 @@ Fl_RGB_Image* Fl_Xlib_Image_Surface_Driver::image()
return image; return image;
} }
void Fl_Xlib_Image_Surface_Driver::end_current_(Fl_Surface_Device *next_current) void Fl_Xlib_Image_Surface_Driver::end_current_()
{ {
fl_window = pre_window; fl_window = pre_window;
} }