kbdd.inc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {
  2. Free Pascal port of the OpenPTC C++ library.
  3. Copyright (C) 2001-2003 Nikolay Nikolov ([email protected])
  4. Original C++ version by Glenn Fiedler ([email protected])
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  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. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. }
  17. Type
  18. TWin32Keyboard = Class(TWin32Hook)
  19. Private
  20. { window procedure }
  21. Function WndProc(hWnd : HWND; message : DWord; wParam : WPARAM; lParam : LPARAM) : LRESULT; Override;
  22. { internal key functions }
  23. { Procedure insert(_key : TPTCKeyEvent);
  24. Function remove : TPTCKeyEvent;
  25. Function ready : Boolean;}
  26. { data }
  27. { m_key : Boolean;}
  28. m_multithreaded : Boolean;
  29. m_event : TWin32Event;
  30. m_monitor : TWin32Monitor;
  31. FEventQueue : TEventQueue;
  32. { flag data }
  33. m_enabled : Boolean;
  34. { modifiers }
  35. m_alt : Boolean;
  36. m_shift : Boolean;
  37. m_control : Boolean;
  38. { key buffer }
  39. { m_head : Integer;
  40. m_tail : Integer;
  41. m_buffer : Array[0..1023] Of TPTCKeyEvent;}
  42. Public
  43. { setup }
  44. Constructor Create(window : HWND; thread : DWord; multithreaded : Boolean; EventQueue : TEventQueue);
  45. Destructor Destroy; Override;
  46. { input }
  47. { Function internal_PeekKey(window : TWin32Window; k : TPTCKeyEvent) : Boolean;
  48. Procedure internal_ReadKey(window : TWin32Window; k : TPTCKeyEvent);}
  49. { control }
  50. Procedure enable;
  51. Procedure disable;
  52. End;