mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
Move platform part of Fl::flush()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -63,6 +63,8 @@ public:
|
|||||||
virtual void screen_work_area(int &X, int &Y, int &W, int &H);
|
virtual void screen_work_area(int &X, int &Y, int &W, int &H);
|
||||||
// --- audible output
|
// --- audible output
|
||||||
virtual void beep(int type) = 0;
|
virtual void beep(int type) = 0;
|
||||||
|
// --- global events
|
||||||
|
virtual void flush() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
# elif defined(__APPLE__)
|
# elif defined(__APPLE__)
|
||||||
# include "mac.H"
|
# include "mac.H"
|
||||||
# elif defined(ANDROID)
|
# elif defined(ANDROID)
|
||||||
# error "A clean port requires a driver-style system for Fl_X"
|
# pragma message "A clean port requires a driver-style system for Fl_X"
|
||||||
# elif defined(FL_PORTING)
|
# elif defined(FL_PORTING)
|
||||||
# pragma message "FL_PORTING: write a header file based on this file, win32.H, or mac.H to define the FLTK core internals"
|
# pragma message "FL_PORTING: write a header file based on this file, win32.H, or mac.H to define the FLTK core internals"
|
||||||
# include "porting.H"
|
# include "porting.H"
|
||||||
|
|||||||
+1
-12
@@ -888,18 +888,7 @@ void Fl::flush() {
|
|||||||
if (i->region) {XDestroyRegion(i->region); i->region = 0;}
|
if (i->region) {XDestroyRegion(i->region); i->region = 0;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(USE_X11)
|
screen_driver()->flush();
|
||||||
if (fl_display) XFlush(fl_display);
|
|
||||||
#elif defined(WIN32)
|
|
||||||
GdiFlush();
|
|
||||||
#elif defined (__APPLE_QUARTZ__)
|
|
||||||
if (fl_gc)
|
|
||||||
CGContextFlush(fl_gc);
|
|
||||||
#elif defined(FL_PORTING)
|
|
||||||
# pragma message "FL_PORTING: flush your graphics context here"
|
|
||||||
#else
|
|
||||||
# error unsupported platform
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,12 @@ void Fl_Cocoa_Screen_Driver::beep(int type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Fl_Cocoa_Screen_Driver::flush() {
|
||||||
|
if (fl_gc)
|
||||||
|
CGContextFlush(fl_gc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id$".
|
// End of "$Id$".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ public:
|
|||||||
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
|
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
|
||||||
// --- audible output
|
// --- audible output
|
||||||
virtual void beep(int type);
|
virtual void beep(int type);
|
||||||
|
// --- global events
|
||||||
|
virtual void flush();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -233,6 +233,12 @@ void Fl_WinAPI_Screen_Driver::beep(int type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Fl_WinAPI_Screen_Driver::flush()
|
||||||
|
{
|
||||||
|
GdiFlush();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id$".
|
// End of "$Id$".
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ public:
|
|||||||
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
|
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
|
||||||
// --- audible output
|
// --- audible output
|
||||||
virtual void beep(int type);
|
virtual void beep(int type);
|
||||||
|
// --- global events
|
||||||
|
virtual void flush();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,8 @@ void Fl_X11_Screen_Driver::screen_dpi(float &h, float &v, int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Fl_X11_Screen_Driver::beep(int type) {
|
void Fl_X11_Screen_Driver::beep(int type)
|
||||||
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case FL_BEEP_DEFAULT :
|
case FL_BEEP_DEFAULT :
|
||||||
case FL_BEEP_ERROR :
|
case FL_BEEP_ERROR :
|
||||||
@@ -202,6 +203,12 @@ void Fl_X11_Screen_Driver::beep(int type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Fl_X11_Screen_Driver::flush()
|
||||||
|
{
|
||||||
|
if (fl_display)
|
||||||
|
XFlush(fl_display);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id$".
|
// End of "$Id$".
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ public:
|
|||||||
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
|
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
|
||||||
// --- audible output
|
// --- audible output
|
||||||
virtual void beep(int type);
|
virtual void beep(int type);
|
||||||
|
// --- global events
|
||||||
|
virtual void flush() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user