Remove fl_ready() not in public API and mostly same as Fl_XXX_Screen_Driver::ready()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2016-09-19 16:59:59 +00:00
parent 3c0b74b284
commit c06374378f
8 changed files with 9 additions and 24 deletions

View File

@ -492,7 +492,6 @@ void fl_trigger_clipboard_notify(int source) {
void (*Fl::idle)(); // see Fl::add_idle.cxx for the add/remove functions
extern int fl_ready(); // in Fl_<platform>.cxx
extern int fl_wait(double time); // in Fl_<platform>.cxx
/**

View File

@ -450,7 +450,8 @@ void Fl_Darwin_System_Driver::remove_fd(int n)
/*
* Check if there is actually a message pending
*/
int fl_ready()
int Fl_Cocoa_Screen_Driver::ready()
{
NSEvent *retval = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
inMode:NSDefaultRunLoopMode dequeue:NO];

View File

@ -477,8 +477,8 @@ int fl_wait(double time_to_wait) {
return 1;
}
// fl_ready() is just like fl_wait(0.0) except no callbacks are done:
int fl_ready() {
// just like fl_wait(0.0) except no callbacks are done:
int Fl_WinAPI_Screen_Driver::ready() {
if (PeekMessage(&fl_msg, NULL, 0, 0, PM_NOREMOVE)) return 1;
if (!nfds) return 0;
timeval t;

View File

@ -283,8 +283,8 @@ int fl_wait(double time_to_wait) {
return n;
}
// fl_ready() is just like fl_wait(0.0) except no callbacks are done:
int fl_ready() {
// just like fl_wait(0.0) except no callbacks are done:
int Fl_X11_Screen_Driver::poll_or_select() {
if (XQLength(fl_display)) return 1;
if (!nfds) return 0; // nothing to select or poll
# if USE_POLL

View File

@ -32,7 +32,6 @@
extern "C" void NSBeep(void);
extern double fl_mac_flush_and_wait(double time_to_wait);
extern int fl_ready();
int Fl_Cocoa_Screen_Driver::next_marked_length = 0;
@ -152,12 +151,6 @@ double Fl_Cocoa_Screen_Driver::wait(double time_to_wait)
}
int Fl_Cocoa_Screen_Driver::ready()
{
return fl_ready();
}
extern void fl_fix_focus(); // in Fl.cxx
extern void *fl_capture;

View File

@ -29,7 +29,6 @@
// Add these externs to allow Win32 port to build - suspect that Fl_X11_Screen_Driver.cxx also might need these
// but I don't have a X11 box to hand for testing. These should be in an internal header somewhere?
extern int fl_ready(); // in Fl_win32.cxx
extern int fl_wait(double time); // in Fl_win32.cxx
// these are set by Fl::args() and override any system colors: from Fl_get_system_colors.cxx
@ -274,12 +273,6 @@ double Fl_WinAPI_Screen_Driver::wait(double time_to_wait)
}
int Fl_WinAPI_Screen_Driver::ready()
{
return fl_ready();
}
extern void fl_fix_focus(); // in Fl.cxx
// We have to keep track of whether we have captured the mouse, since
@ -682,4 +675,4 @@ float Fl_WinAPI_Screen_Driver::desktop_scaling_factor() {
//
// End of "$Id$".
//
//

View File

@ -42,6 +42,7 @@ protected:
} FLScreenInfo;
FLScreenInfo screens[MAX_SCREENS];
float dpi[MAX_SCREENS][2];
int poll_or_select();
public:
static int ewmh_supported();

View File

@ -51,7 +51,6 @@ extern XIC fl_xim_ic; // in Fl_x.cxx
// Add these externs to allow X11 port to build - same as Fl_WinAPI_Screen_Driver.cxx.
// These should be in an internal header somewhere?
// AlbrechtS (Comment by Ian, modified...)
extern int fl_ready(); // in Fl_x.cxx
extern int fl_wait(double time); // in Fl_x.cxx
// these are set by Fl::args() and override any system colors: from Fl_get_system_colors.cxx
@ -452,7 +451,6 @@ double Fl_X11_Screen_Driver::wait(double time_to_wait)
reset_clock = 1; // we are not going to check the clock
}
Fl::run_checks();
// if (idle && !fl_ready()) {
if (Fl::idle) {
if (!in_idle) {
in_idle = 1;
@ -487,7 +485,7 @@ int Fl_X11_Screen_Driver::ready()
} else {
reset_clock = 1;
}
return fl_ready();
return this->poll_or_select();
}