From acfeee6d78fd8d6b5bfeb094a09241885af143fc Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 6 Mar 2016 21:33:07 +0000 Subject: New, driver-based Fl_Double_Window implementation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Double_Window.H | 6 +++--- FL/Fl_Image_Surface.H | 2 +- FL/Fl_Overlay_Window.H | 1 + FL/Fl_Window_Driver.H | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Double_Window.H b/FL/Fl_Double_Window.H index e4ef883f5..46dd106f2 100644 --- a/FL/Fl_Double_Window.H +++ b/FL/Fl_Double_Window.H @@ -40,11 +40,11 @@ class FL_EXPORT Fl_Double_Window : public Fl_Window { protected: void flush(int eraseoverlay); +public: /** - Force double buffering, even if the OS already buffers windows - (overlays need that on MacOS and Windows2000) + Return non-null if this is an Fl_Overlay_Window object. */ - char force_doublebuffering_; + virtual Fl_Double_Window *as_overlay_window() {return NULL; } public: void show(); void show(int a, char **b) {Fl_Window::show(a,b);} diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H index f556ed549..fa98a4bcd 100644 --- a/FL/Fl_Image_Surface.H +++ b/FL/Fl_Image_Surface.H @@ -53,7 +53,6 @@ class FL_EXPORT Fl_Image_Surface : public Fl_Widget_Surface { private: class Helper; Helper *platform_surface; - Fl_Offscreen offscreen(); protected: void translate(int x, int y); void untranslate(); @@ -69,6 +68,7 @@ public: void origin(int x, int y); int printable_rect(int *w, int *h); Fl_Offscreen get_offscreen_before_delete(); + Fl_Offscreen offscreen(); }; #endif // Fl_Image_Surface_H diff --git a/FL/Fl_Overlay_Window.H b/FL/Fl_Overlay_Window.H index de45b6c17..5114d3029 100644 --- a/FL/Fl_Overlay_Window.H +++ b/FL/Fl_Overlay_Window.H @@ -72,6 +72,7 @@ protected: Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0); public: void show(int a, char **b) {Fl_Double_Window::show(a,b);} + virtual Fl_Double_Window *as_overlay_window() {return this; } }; #endif diff --git a/FL/Fl_Window_Driver.H b/FL/Fl_Window_Driver.H index dea792669..540b6971f 100644 --- a/FL/Fl_Window_Driver.H +++ b/FL/Fl_Window_Driver.H @@ -40,6 +40,9 @@ public: static Fl_Window_Driver *newWindowDriver(Fl_Window *); virtual void take_focus() { } + virtual int double_flush(int eraseoverlay); + virtual void destroy_double_buffer(); + void draw() {w->draw();} }; -- cgit v1.2.3