From 5bb4e853c7c80fa16e568f47c49c2282d197a19c Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 30 Nov 2016 07:09:48 +0000 Subject: Remove Fl_Image_Surface::end_current() to be called after usage of the drawing surface. This ensures API compatibility with FLTK 1.3 where Fl_Surface_Device->set_current() is used to change the current drawing surface. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Device.H | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'FL/Fl_Device.H') diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index f443021c0..41e3a9fe7 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -52,13 +52,17 @@ class Fl_Widget; */ class FL_EXPORT Fl_Surface_Device { - /** \brief The graphics driver in use by this surface. */ + /** The graphics driver in use by this surface. */ Fl_Graphics_Driver *pGraphicsDriver; static Fl_Surface_Device *_surface; // the surface that currently receives graphics output static Fl_Surface_Device *default_surface(); // create surface if none exists yet + static Fl_Surface_Device *pre_surface_; + // Some drawing surfaces (e.g., Fl_XXX_Image_Surface_Driver) need to re-implement this. + // Gets called each time a surface ceases to be the current drawing surface. + virtual void end_current_() {} protected: - /** \brief Constructor that sets the graphics driver to use for the created surface. */ - Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }; + /** Constructor that sets the graphics driver to use for the created surface. */ + Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; } public: virtual void set_current(void); /** \brief Sets the graphics driver of this drawing surface. */ -- cgit v1.2.3