[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patching the menu manager
mattd@apple.com (Matt Deatherage) writes:
>In article <BzD8FB.FJE@CAM.ORG>, vandry@CAM.ORG (Phillip Vandry) wrote:
>> For a program I am writing I need to patch the MenuSelect call in the Menu
>> Manager.
>
>As was stated in an earlier post by me, you may just _think_ you need to
>patch MenuSelect to do what you want to do.
>
>So tell us what it is you want to do, and maybe we can tell you how to do
>it in a way that will be finished before Dick Clark ages.
>
Okay. I want to write some sort of accessory (either an Init or an NDA) so
menus can be accessed without using the mouse, in a manner similar to
MicroSoft's (on the IBM) or ProTerm (but on the desktop).
The options I considered are:
1. Completely fake mouse movements so that the entire system thinks the user
is actually using the mouse.
Drawbacks: The mouse pointer would jump around as the user presses keys.
It's hard and long.
2. Patch GetNextEvent to eat mouse events and generate mouse events based on
keypresses (would use a flag for Normal mode//Menu mode)
Drawbacks: It's awfully hard to patch GetNextEvent when GSBug uses
GetNextEvent to get its keyboard input.
The code would probably be pretty large and incompatibilities
might be a big problem.
3. Patch MenuKey to get keypresses and call the apropriate routines in the
Menu DefProc to do all the "dirty work"
This is probably the "cleanest" approach.
Drawbacks: There is no way of knowing where the standard DefProcs are
loacted. This would only work for custom menus.
Suggestions?
______________________________________________________________________
|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Phillip Vandry | Vandry@Cam.Org | Merry Christmas II you! |
|________________|________________|____________________________________|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~