/packages/ptc/src/wince/base/wincekeyboardd.inc

https://github.com/slibre/freepascal · Pascal · 55 lines · 14 code · 5 blank · 36 comment · 0 complexity · 4297b1995672361d5e33d9aa337b67c7 MD5 · raw file

  1. {
  2. This file is part of the PTCPas framebuffer library
  3. Copyright (C) 2007, 2009, 2010 Nikolay Nikolov (nickysn@users.sourceforge.net)
  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.1 of the License, or (at your option) any later version
  8. with the following modification:
  9. As a special exception, the copyright holders of this library give you
  10. permission to link this library with independent modules to produce an
  11. executable, regardless of the license terms of these independent modules,and
  12. to copy and distribute the resulting executable under terms of your choice,
  13. provided that you also meet, for each linked independent module, the terms
  14. and conditions of the license of that module. An independent module is a
  15. module which is not derived from or based on this library. If you modify
  16. this library, you may extend this exception to your version of the library,
  17. but you are not obligated to do so. If you do not wish to do so, delete this
  18. exception statement from your version.
  19. This library is distributed in the hope that it will be useful,
  20. but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  22. Lesser General Public License for more details.
  23. You should have received a copy of the GNU Lesser General Public
  24. License along with this library; if not, write to the Free Software
  25. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  26. }
  27. type
  28. TWinCEKeyboard = Class(TObject)
  29. private
  30. { data }
  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. public
  39. { setup }
  40. constructor Create(EventQueue: TEventQueue);
  41. { window procedure }
  42. function WndProc(hWnd: HWND; message: DWord; wParam: WPARAM; lParam: LPARAM): LRESULT;
  43. { control }
  44. procedure enable;
  45. procedure disable;
  46. end;