Skip to content
Snippets Groups Projects
Commit 6cf2657a authored by deuce's avatar deuce
Browse files

Add od_key_pending() function... returns TRUE if a key is...

ng.
parent 951831df
Branches
Tags
No related merge requests found
......@@ -402,6 +402,37 @@ ODAPIDEF void ODCALL od_clear_keybuffer(void)
OD_API_EXIT();
}
/* ----------------------------------------------------------------------------
* od_key_pending()
*
* Returns TRUE if there's a key pending, FALSE otherwise.
*
* Parameters: none
*
* Return: TRUE if character is waiting, FALSE if no character is waiting.
*/
ODAPIDEF BOOL ODCALL od_key_pending(void)
{
/* Initialize OpenDoors if it hasn't already been done. */
if(!bODInitialized) od_init();
/* Log function entry if running in trace mode. */
TRACE(TRACE_API, "od_get_key()");
OD_API_ENTRY();
/* Call the OpenDoors kernel. */
CALL_KERNEL_IF_NEEDED();
if(!ODInQueueWaiting(hODInputQueue))
{
OD_API_EXIT();
return(FALSE);
}
OD_API_EXIT();
return(TRUE);
}
/* ----------------------------------------------------------------------------
* od_get_key()
......
No preview for this file type
No preview for this file type
......@@ -915,6 +915,7 @@ od_control;
* od_edit_str() - Fancy formatted string input function (ANS/AVT)
* od_clear_keybuffer() - Removes any waiting keys in keyboard buffer
* od_multiline_edit() - Edits text that spans multiple lines (ANS/AVT)
* od_key_pending() - Returns TRUE if a key is waiting to be processed
*
* COMMON DOOR ACTIVITY FUNCTIONS
* od_page() - Allows user to page sysop
......@@ -962,6 +963,7 @@ ODAPIDEF char ODCALL od_get_answer(char *pszOptions);
ODAPIDEF void ODCALL od_get_cursor(INT *pnRow, INT *pnColumn);
ODAPIDEF BOOL ODCALL od_get_input(tODInputEvent *pInputEvent,
tODMilliSec TimeToWait, WORD wFlags);
ODAPIDEF BOOL ODCALL od_key_pending(void);
ODAPIDEF char ODCALL od_get_key(BOOL bWait);
ODAPIDEF BOOL ODCALL od_gettext(INT nLeft, INT nTop, INT nRight,
INT nBottom, void *pBlock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment