ODInQue.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* OpenDoors Online Software Programming Toolkit
  2. * (C) Copyright 1991 - 1999 by Brian Pirie.
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. *
  19. * File: ODInQue.h
  20. *
  21. * Description: OpenDoors input queue management. This input queue is where
  22. * all input events (e.g. keystrokes) from both local and remote
  23. * systems are combined into a single stream.
  24. *
  25. * Revisions: Date Ver Who Change
  26. * ---------------------------------------------------------------
  27. * Nov 16, 1995 6.00 BP Created.
  28. * Jan 04, 1996 6.00 BP Moved event type defs to OpenDoor.h.
  29. * Jan 04, 1996 6.00 BP tODInQueueEvent -> tODInputEvent.
  30. * Jan 30, 1996 6.00 BP Add ODInQueueGetNextEvent() timeout.
  31. * Feb 19, 1996 6.00 BP Changed version number to 6.00.
  32. * Mar 03, 1996 6.10 BP Begin version 6.10.
  33. */
  34. #ifndef _INC_ODINQUE
  35. #define _INC_ODINQUE
  36. #include <time.h>
  37. #include "ODTypes.h"
  38. /* OpenDoors input queue handle. */
  39. typedef tODHandle tODInQueueHandle;
  40. /* Input queue functions. */
  41. tODResult ODInQueueAlloc(tODInQueueHandle *phInQueue, INT nInitialQueueSize);
  42. void ODInQueueFree(tODInQueueHandle hInQueue);
  43. BOOL ODInQueueWaiting(tODInQueueHandle hInQueue);
  44. tODResult ODInQueueAddEvent(tODInQueueHandle hInQueue,
  45. tODInputEvent *pEvent);
  46. tODResult ODInQueueGetNextEvent(tODInQueueHandle hInQueue,
  47. tODInputEvent *pEvent, tODMilliSec Timeout);
  48. void ODInQueueEmpty(tODInQueueHandle hInQueue);
  49. time_t ODInQueueGetLastActivity(tODInQueueHandle hInQueue);
  50. void ODInQueueResetLastActivity(tODInQueueHandle hInQueue);
  51. #endif /* _INC_ODINQUE */