mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
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:
@@ -492,7 +492,6 @@ void fl_trigger_clipboard_notify(int source) {
|
|||||||
|
|
||||||
void (*Fl::idle)(); // see Fl::add_idle.cxx for the add/remove functions
|
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
|
extern int fl_wait(double time); // in Fl_<platform>.cxx
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-1
@@ -450,7 +450,8 @@ void Fl_Darwin_System_Driver::remove_fd(int n)
|
|||||||
/*
|
/*
|
||||||
* Check if there is actually a message pending
|
* 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]
|
NSEvent *retval = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
|
||||||
inMode:NSDefaultRunLoopMode dequeue:NO];
|
inMode:NSDefaultRunLoopMode dequeue:NO];
|
||||||
|
|||||||
+2
-2
@@ -477,8 +477,8 @@ int fl_wait(double time_to_wait) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fl_ready() is just like fl_wait(0.0) except no callbacks are done:
|
// just like fl_wait(0.0) except no callbacks are done:
|
||||||
int fl_ready() {
|
int Fl_WinAPI_Screen_Driver::ready() {
|
||||||
if (PeekMessage(&fl_msg, NULL, 0, 0, PM_NOREMOVE)) return 1;
|
if (PeekMessage(&fl_msg, NULL, 0, 0, PM_NOREMOVE)) return 1;
|
||||||
if (!nfds) return 0;
|
if (!nfds) return 0;
|
||||||
timeval t;
|
timeval t;
|
||||||
|
|||||||
+2
-2
@@ -283,8 +283,8 @@ int fl_wait(double time_to_wait) {
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fl_ready() is just like fl_wait(0.0) except no callbacks are done:
|
// just like fl_wait(0.0) except no callbacks are done:
|
||||||
int fl_ready() {
|
int Fl_X11_Screen_Driver::poll_or_select() {
|
||||||
if (XQLength(fl_display)) return 1;
|
if (XQLength(fl_display)) return 1;
|
||||||
if (!nfds) return 0; // nothing to select or poll
|
if (!nfds) return 0; // nothing to select or poll
|
||||||
# if USE_POLL
|
# if USE_POLL
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
extern "C" void NSBeep(void);
|
extern "C" void NSBeep(void);
|
||||||
|
|
||||||
extern double fl_mac_flush_and_wait(double time_to_wait);
|
extern double fl_mac_flush_and_wait(double time_to_wait);
|
||||||
extern int fl_ready();
|
|
||||||
|
|
||||||
int Fl_Cocoa_Screen_Driver::next_marked_length = 0;
|
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_fix_focus(); // in Fl.cxx
|
||||||
|
|
||||||
extern void *fl_capture;
|
extern void *fl_capture;
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
// Add these externs to allow Win32 port to build - suspect that Fl_X11_Screen_Driver.cxx also might need these
|
// 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?
|
// 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
|
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
|
// 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
|
extern void fl_fix_focus(); // in Fl.cxx
|
||||||
|
|
||||||
// We have to keep track of whether we have captured the mouse, since
|
// We have to keep track of whether we have captured the mouse, since
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ protected:
|
|||||||
} FLScreenInfo;
|
} FLScreenInfo;
|
||||||
FLScreenInfo screens[MAX_SCREENS];
|
FLScreenInfo screens[MAX_SCREENS];
|
||||||
float dpi[MAX_SCREENS][2];
|
float dpi[MAX_SCREENS][2];
|
||||||
|
int poll_or_select();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static int ewmh_supported();
|
static int ewmh_supported();
|
||||||
|
|||||||
@@ -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.
|
// Add these externs to allow X11 port to build - same as Fl_WinAPI_Screen_Driver.cxx.
|
||||||
// These should be in an internal header somewhere?
|
// These should be in an internal header somewhere?
|
||||||
// AlbrechtS (Comment by Ian, modified...)
|
// AlbrechtS (Comment by Ian, modified...)
|
||||||
extern int fl_ready(); // in Fl_x.cxx
|
|
||||||
extern int fl_wait(double time); // 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
|
// 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
|
reset_clock = 1; // we are not going to check the clock
|
||||||
}
|
}
|
||||||
Fl::run_checks();
|
Fl::run_checks();
|
||||||
// if (idle && !fl_ready()) {
|
|
||||||
if (Fl::idle) {
|
if (Fl::idle) {
|
||||||
if (!in_idle) {
|
if (!in_idle) {
|
||||||
in_idle = 1;
|
in_idle = 1;
|
||||||
@@ -487,7 +485,7 @@ int Fl_X11_Screen_Driver::ready()
|
|||||||
} else {
|
} else {
|
||||||
reset_clock = 1;
|
reset_clock = 1;
|
||||||
}
|
}
|
||||||
return fl_ready();
|
return this->poll_or_select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user