Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Keybd Class Reference

#include <keybd.h>

List of all members.

Public Methods

Message Event ()
Message WaitForAnyEvent ()
Message WaitForEvent (Message &)
void Flush (void)


Member Function Documentation

Message Keybd::Event  
 

Definition at line 16 of file keybd.c.

References Message::d1, Message::d2, KeyMsg, and KeyPressed.

Referenced by Flush(), WaitForAnyEvent(), and WaitForEvent().

00017 {
00018   if (! kbhit())
00019     return NullMsg;
00020   else
00021   {
00022     Message msg (KeyMsg, KeyPressed, getch ());
00023     if (msg.d1 == 0)
00024       msg.d2 = getch ();
00025     return msg;
00026   }
00027 }

void Keybd::Flush void   
 

Definition at line 52 of file keybd.c.

References Event().

00053 {
00054   Message m;
00055   do {
00056     m = Event ();
00057   } while (m != NullMsg);
00058 }

Message Keybd::WaitForAnyEvent  
 

Definition at line 30 of file keybd.c.

References Message::code, Event(), and Idle.

00031 {
00032   Message msg;
00033 
00034   do msg = Event();
00035   while (msg.code == Idle);
00036 
00037   return msg;
00038 }

Message Keybd::WaitForEvent Message  
 

Definition at line 41 of file keybd.c.

References Event().

00042 {
00043   Message try;
00044 
00045   do try = Event ();
00046   while (try != msg);
00047 
00048   return try;
00049 }


The documentation for this class was generated from the following files:
Generated on Sun Jul 6 23:07:17 2003 for Scotland Yard by doxygen1.2.15