summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-03-13 22:16:37 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-03-13 22:16:37 +0000
commitb496d18b85917106c48e8e6f74115b3122b603d1 (patch)
tree4d96befa4377a81c89c6a32f4d66220199572938 /FL
parent30756ae3500a62bd8f63b4df3eb3ca8f6b8b0b70 (diff)
Fixed 'flush()' code for single, double, and overlay buffering
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Double_Window.H7
-rw-r--r--FL/Fl_Overlay_Window.H7
-rw-r--r--FL/Fl_Single_Window.H2
-rw-r--r--FL/Fl_Window.H4
-rw-r--r--FL/Fl_Window_Driver.H7
-rw-r--r--FL/porting.H2
6 files changed, 20 insertions, 9 deletions
diff --git a/FL/Fl_Double_Window.H b/FL/Fl_Double_Window.H
index 35085d309..fe3396a52 100644
--- a/FL/Fl_Double_Window.H
+++ b/FL/Fl_Double_Window.H
@@ -37,9 +37,8 @@
This makes sure you can use Xdbe on servers where double buffering
does not exist for every visual.
*/
-class FL_EXPORT Fl_Double_Window : public Fl_Window {
-protected:
- void flush(int eraseoverlay);
+class FL_EXPORT Fl_Double_Window : public Fl_Window
+{
public:
/**
Return non-null if this is an Fl_Overlay_Window object.
@@ -47,9 +46,9 @@ public:
virtual Fl_Double_Window *as_double_window() {return this; }
void show();
void show(int a, char **b) {Fl_Window::show(a,b);}
- void flush();
void resize(int,int,int,int);
void hide();
+ void flush();
~Fl_Double_Window();
/**
diff --git a/FL/Fl_Overlay_Window.H b/FL/Fl_Overlay_Window.H
index 32ce7cfa4..d303cf59d 100644
--- a/FL/Fl_Overlay_Window.H
+++ b/FL/Fl_Overlay_Window.H
@@ -38,8 +38,11 @@
class FL_EXPORT Fl_Overlay_Window : public Fl_Double_Window {
#ifndef FL_DOXYGEN
friend class _Fl_Overlay;
+ friend class Fl_X11_Window_Driver;
+ friend class Fl_Cocoa_Window_Driver;
+ friend class Fl_WinAPI_Window_Driver;
#endif
-protected:
+public:
/**
You must subclass Fl_Overlay_Window and provide this method.
It is just like a draw() method, except it draws the overlay.
@@ -51,8 +54,8 @@ private:
Fl_Window *overlay_;
public:
void show();
- void flush();
void hide();
+ void flush();
void resize(int,int,int,int);
~Fl_Overlay_Window();
/** Returns non-zero if there's hardware overlay support */
diff --git a/FL/Fl_Single_Window.H b/FL/Fl_Single_Window.H
index fc8eb4840..a5f2cdc0a 100644
--- a/FL/Fl_Single_Window.H
+++ b/FL/Fl_Single_Window.H
@@ -35,7 +35,7 @@ class FL_EXPORT Fl_Single_Window : public Fl_Window {
public:
void show();
void show(int a, char **b) {Fl_Window::show(a,b);}
- void flush();
+
/**
Creates a new Fl_Single_Window widget using the given
size, and label (title) string.
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index 3573dbb85..35536a15d 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -72,6 +72,10 @@ class FL_EXPORT Fl_Window : public Fl_Group {
friend class Fl_X;
friend class Fl_Window_Driver;
+ friend class Fl_X11_Window_Driver;
+ friend class Fl_Pico_Window_Driver;
+ friend class Fl_Cocoa_Window_Driver;
+ friend class Fl_WinAPI_Window_Driver;
friend class Fl_PicoSDL_Window_Driver;
friend class Fl_PicoAndroid_Window_Driver;
Fl_X *i; // points at the system-specific stuff, but exists only after the window is mapped
diff --git a/FL/Fl_Window_Driver.H b/FL/Fl_Window_Driver.H
index 473d5faf3..bcb803ae3 100644
--- a/FL/Fl_Window_Driver.H
+++ b/FL/Fl_Window_Driver.H
@@ -60,11 +60,14 @@ public:
// --- window management
virtual void take_focus();
- virtual void flush() { }
+ virtual void flush_single();
+ virtual void flush_double();
+ virtual void flush_overlay();
+ virtual void draw_begin();
+ virtual void draw_end();
virtual Fl_X *makeWindow() { /* FIXME: move Fl_X::make(Fl_Window*) here for OSX, MSWin, and X11 */ return 0; }
virtual void wait_for_expose() {} // TODO: check
- virtual int double_flush(int eraseoverlay); // TODO: check
virtual void destroy_double_buffer(); // TODO: check
virtual void draw(); // TODO: check
diff --git a/FL/porting.H b/FL/porting.H
index d2a51912a..744e34486 100644
--- a/FL/porting.H
+++ b/FL/porting.H
@@ -57,6 +57,8 @@ inline void XDestroyRegion(Fl_Region r) {
extern void *fl_default_cursor;
+inline void fl_open_callback(void (*)(const char *)) {}
+
// This object contains all platform-specific stuff about a window:
// WARNING: this object is highly subject to change!
class Fl_X {