gii.pp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. { $Id$
  2. Free Pascal conversion (c) 1999 Sebastian Guenther
  3. LibGII API header file
  4. Copyright (C) 1998 Andreas Beck [[email protected]]
  5. Copyright (C) 1999 Marcus Sundberg [[email protected]]
  6. Permission is hereby granted, free of charge, to any person obtaining a
  7. copy of this software and associated documentation files (the "Software"),
  8. to deal in the Software without restriction, including without limitation
  9. the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. and/or sell copies of the Software, and to permit persons to whom the
  11. Software is furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  18. IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  19. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. }
  21. {$MODE objfpc}
  22. {$PACKRECORDS C}
  23. {$LINKLIB c}
  24. unit GII;
  25. interface
  26. const
  27. libgii = 'gii';
  28. type
  29. TGIIEventMask = LongWord;
  30. TGIIEventType = (
  31. evNothing := 0, // event is not valid. (must be zero)
  32. evCommand, // report command/do action
  33. evInformation, // notification of new information
  34. evExpose, // exposure event
  35. // empty slot
  36. evKeyPress := 5, // key has been pressed
  37. evKeyRelease, // key has been released
  38. evKeyRepeat, // automatically repeated keypress
  39. evPtrRelative, // pointer movements reported relative
  40. evPtrAbsolute, // pointer movements reported absolute
  41. evPtrButtonPress, // pointer button pressed
  42. evPtrButtonRelease, // pointer button released
  43. evValRelative, // valuator change (reported relative)
  44. evValAbsolute, // valuator change (reported absolute)
  45. evLast // must be less than 33
  46. );
  47. const
  48. emNothing = 1 shl Ord(evNothing);
  49. emCommand = 1 shl Ord(evCommand);
  50. emInformation = 1 shl Ord(evInformation);
  51. emExpose = 1 shl Ord(evExpose);
  52. emKeyPress = 1 shl Ord(evKeyPress);
  53. emKeyRelease = 1 shl Ord(evKeyRelease);
  54. emKeyRepeat = 1 shl Ord(evKeyRepeat);
  55. emKey = emKeyPress or emKeyRelease or emKeyRepeat;
  56. emKeyboard = emKey;
  57. emPtrRelative = 1 shl Ord(evPtrRelative);
  58. emPtrAbsolute = 1 shl Ord(evPtrAbsolute);
  59. emPtrButtonPress = 1 shl Ord(evPtrButtonPress);
  60. emPtrButtonRelease = 1 shl Ord(evPtrButtonRelease);
  61. emPtrMove = emPtrRelative or emPtrAbsolute;
  62. emPtrButton = emPtrButtonPress or emPtrButtonRelease;
  63. emPointer = emPtrMove or emPtrButton;
  64. emValRelative = 1 shl Ord(evValRelative);
  65. emValAbsolute = 1 shl Ord(evValAbsolute);
  66. emValuator = emValRelative or emValAbsolute;
  67. emZero = 0;
  68. emAll = ((1 shl Ord(evLast)) - 1) and not emNothing;
  69. {******************************************************************************
  70. Command/Information events
  71. ******************************************************************************}
  72. GII_CMDFLAG_NODATA = 1 shl 31; // Event has no data
  73. GII_CMDFLAG_PRIVATE = 1 shl 30; // The code is specific to a certain inputlib
  74. GII_CMDFLAG_EXTERNAL = 1 shl 29; // Event is sent to/from an external system (like LibGGI)
  75. type
  76. TGIIEvent = record
  77. Size: Byte;
  78. {###}
  79. end;
  80. type
  81. TGIIInput = Pointer;
  82. TGIIFilter = Pointer;
  83. implementation
  84. end.
  85. {
  86. $Log$
  87. Revision 1.2 2000-07-13 11:33:17 michael
  88. + removed logs
  89. }