mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 21:25:30 +08:00
"Public members Fl::awake_ring_*_ should be private" (#559) - cont'd
This commit is contained in:
@@ -135,6 +135,7 @@ typedef void (*Fl_Clipboard_Notify_Handler)(int source, void *data);
|
|||||||
state information and global methods for the current application.
|
state information and global methods for the current application.
|
||||||
*/
|
*/
|
||||||
class FL_EXPORT Fl {
|
class FL_EXPORT Fl {
|
||||||
|
friend Fl_System_Driver;
|
||||||
Fl() {} // no constructor!
|
Fl() {} // no constructor!
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -310,7 +311,6 @@ private:
|
|||||||
static int awake_ring_head_;
|
static int awake_ring_head_;
|
||||||
static int awake_ring_tail_;
|
static int awake_ring_tail_;
|
||||||
public:
|
public:
|
||||||
static bool equal_awake_ring_ends();
|
|
||||||
static const char* scheme_;
|
static const char* scheme_;
|
||||||
static Fl_Image* scheme_bg_;
|
static Fl_Image* scheme_bg_;
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ protected:
|
|||||||
// implement once for each platform
|
// implement once for each platform
|
||||||
static Fl_System_Driver *newSystemDriver();
|
static Fl_System_Driver *newSystemDriver();
|
||||||
Fl_System_Driver();
|
Fl_System_Driver();
|
||||||
|
static bool awake_ring_empty();
|
||||||
public:
|
public:
|
||||||
virtual ~Fl_System_Driver();
|
virtual ~Fl_System_Driver();
|
||||||
static int command_key;
|
static int command_key;
|
||||||
|
|||||||
+5
-2
@@ -201,8 +201,11 @@ void Fl::unlock() {
|
|||||||
|
|
||||||
#ifndef FL_DOXYGEN
|
#ifndef FL_DOXYGEN
|
||||||
|
|
||||||
bool Fl::equal_awake_ring_ends() {
|
bool Fl_System_Driver::awake_ring_empty() {
|
||||||
return awake_ring_head_ == Fl::awake_ring_tail_;
|
Fl::system_driver()->lock_ring();
|
||||||
|
bool retval = (Fl::awake_ring_head_ == Fl::awake_ring_tail_);
|
||||||
|
Fl::system_driver()->unlock_ring();
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FL_DOXYGEN
|
#endif // FL_DOXYGEN
|
||||||
|
|||||||
+2
-2
@@ -491,7 +491,7 @@ double Fl_WinAPI_System_Driver::wait(double time_to_wait) {
|
|||||||
DispatchMessageW(&fl_msg);
|
DispatchMessageW(&fl_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following conditional test: !Fl::equal_awake_ring_ends()
|
// The following conditional test: !Fl_System_Driver::awake_ring_empty()
|
||||||
// equivalent to:
|
// equivalent to:
|
||||||
// (Fl::awake_ring_head_ != Fl::awake_ring_tail_)
|
// (Fl::awake_ring_head_ != Fl::awake_ring_tail_)
|
||||||
// is a workaround / fix for STR #3143. This works, but a better solution
|
// is a workaround / fix for STR #3143. This works, but a better solution
|
||||||
@@ -512,7 +512,7 @@ double Fl_WinAPI_System_Driver::wait(double time_to_wait) {
|
|||||||
// recover and process any pending awake callbacks.
|
// recover and process any pending awake callbacks.
|
||||||
// Normally the ring buffer head and tail indices will match and this
|
// Normally the ring buffer head and tail indices will match and this
|
||||||
// comparison will do nothing. Addresses STR #3143
|
// comparison will do nothing. Addresses STR #3143
|
||||||
if (!Fl::equal_awake_ring_ends()) {
|
if (!Fl_System_Driver::awake_ring_empty()) {
|
||||||
process_awake_handler_requests();
|
process_awake_handler_requests();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user