cleanup and declare __mg_idle_handler_with_fds

This commit is contained in:
Vincent Wei
2020-02-17 21:27:09 +08:00
parent eb1630db47
commit 6aa9e4ae7d
+6 -11
View File
@@ -217,7 +217,7 @@ struct _MSGQUEUE
PSYNCMSG pLastSyncMsg; // tail of the sync message queue
#endif
IDLEHANDLER OnIdle; // XXX: idle handler
IDLEHANDLER OnIdle; // idle handler for this message queue.
PMAINWIN pRootMainWin; // the root main window of this message queue.
int nrWindows; // the number of main/virtual windows.
@@ -291,22 +291,17 @@ static inline BOOL QueueDeskMessage (PMSG msg)
}
#ifndef _MGRM_THREADS
static inline BOOL InitDskMsgQueue (void)
{
return mg_InitMsgQueue (__mg_dsk_msg_queue, 0);
}
static inline void DestroyDskMsgQueue (void)
{
mg_DestroyMsgQueue (__mg_dsk_msg_queue);
}
static inline void SetDskIdleHandler (IDLEHANDLER idle_handler)
{
__mg_dsk_msg_queue->OnIdle = idle_handler;
}
#endif /* not defined _MGRM_THREADS */
/* Since 4.2.0 */
#ifdef _HAVE_SELECT
BOOL __mg_idle_handler_with_fds (MSGQUEUE* msg_queue, BOOL wait);
#endif
#ifdef _MGHAVE_VIRTUAL_WINDOW
#define MG_MUTEX_INIT(lock) pthread_mutex_init(lock, NULL)