home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7583 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.4 KB

  1. Path: easy.in-chemnitz.de!mkmk!floh
  2. From: floh@mkmk.in-chemnitz.de (Andre Weissflog)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: AddIntServer + VERTB strangeness
  5. Message-ID: <KeGqy*zJ0@mkmk.in-chemnitz.de>
  6. Date: Fri, 19 Apr 1996 00:47:42 CET
  7. Reply-To: floh@mkmk.in-chemnitz.de
  8. References: <PETERM.96Apr7124019@tui.maths.irl.cri.nz> <1084.6678T720T2089@Redrobe.demon.co.uk>
  9.  <PETERM.96Apr17120442@tui.maths.irl.cri.nz> <4l5gkv$jc0@sunsystem5.informatik.tu-muenchen.de>
  10. Distribution: world
  11. Organization: private uucp site
  12. X-Newsreader: Arn V 1.04
  13.  
  14. In article <4l5gkv$jc0@sunsystem5.informatik.tu-muenchen.de>, Juergen "Rally" Fischer writes:
  15.  
  16. > In article <PETERM.96Apr17120442@tui.maths.irl.cri.nz>, 
  17. > peterm@maths.grace.cri.nz (Peter McGavin) writes:
  18. > |> {
  19. > |>   while (ie != NULL) {
  20. > |>     /* grab raw keyboard/mouse/timer input from ie->ie_Class and
  21. > |>        other input-event fields here */
  22. > |>     ie = ie->ie_NextEvent;
  23. > |>   }
  24. > |>   return NULL;
  25. > |> }
  26. >          ^--- this is the "let nothign through" part right, i.e. if hi pri
  27. >               all events gone ?
  28. > what if I still wanna support Amiga-M / Amiga-N in some way ?
  29. > Or, even better, cancel anything but not all the Amiga-XXX combinations ?
  30.  
  31. Let only those events travel down the chain, whose 
  32. InputEvent.ie_Qualifier field has the IEQUALIFIERB_LCOMMAND bit
  33. set. You may unlink events and build from the remaining
  34. (LAMIGA events) a new input event chain.
  35.  
  36. > Can someone direct me to the list of numbers given in ie->ie_NextEvent ?
  37. > mouse ? joystick ?
  38. ie->ie_NextEvent is the pointer to the next event in the chain,
  39. or NULL, if there is none. Definitions are in <devices/inputevent.[h|i]>
  40.  
  41. > The keyevents are RAW, i.e pressed/released ?
  42. Raw events, bit 7 indicates, whether pressed or released
  43. (so there are two events for each key stroke).
  44.  
  45. > My picture of it is this:
  46. > own hi pri handler filtering all exept Amiga-XXX for hotkeys or screenswitch.
  47. > Once the own game screen is not at front (Amiga-M), cancel filtering to get
  48. > Ami controllable.
  49. This should work just fine.
  50.  
  51. > Kind of if (intuibase->firstscreen==myscreen) filter();
  52. > Any ideas/flames ?
  53. No flames. This is in fact the friendliest method to
  54. get as many cpu cycles as possible without killing the
  55. system.
  56.  
  57. > Will not filtering Amiga-keys result in much overhead ?
  58.  
  59. Hmm. First, there's nothing to copy around or to
  60. allocate. I'd say, the LAMIGA filtering alone could
  61. be done in approx. 10 asm instructions per event,
  62. or less ;-)
  63.  
  64. > IMHO the mouse-movement-events cause most calculations
  65. > (window->mouse x/y etc.).
  66. Yes. That's why you cancel most input events in your
  67. high pri input handler. The expensive checking of
  68. mouse positions against windows and gadgets is done by
  69. the intuition input handler, which lives at priority 50.
  70. The commodity handler is at 53 (at least on my machine).
  71. So you only need to install your handler somewhere at
  72. priority 60 and Intuition will effectively be disabled.
  73.  
  74. > What if I need mouseposition on my screen...
  75. Check for IECLASS_RAWMOUSE events, those give you
  76. AFAIR only movement information, not position information,
  77. and manage your own "virtual" mouse position.
  78.  
  79. Bye,
  80. -Floh.
  81.  
  82. ====//=== Andre Weissflog <floh@mkmk.in-chemnitz.de> =======
  83. ...//..........."Spirits in the material world"............
  84. \\//......90% of everything is crap (Sturgeon's Law)......
  85. =\\===============================================Amiga!=
  86.  
  87.