[comp.sys.apple] maybe mousetext

ggray@wpi.wpi.edu (Gary Gray) (04/02/89)

And if nobody is interested in my last proposal (or even if they are)

What would people want in the generic mouse-window routines? (yuk! sounds like
a Nissan (tm) commercial!)

I was thinking that the routines could be accessed in a manner similar to the
Prodos MLI calls, that is

JSR WINDOWS
DB  COMMAND_NUMBER
DW  PARAMETER_POINTER
BNE ERROR_ROUTINE

Do people like this format?  Do you loathe it beyond words?

Also, what types of routine should be included, simple "put the window on
screen and let the programmer handle the rest" or "point to a bunch of text to
be displayed and open a scrolling window to display it" 

would anyone be interested in routines that would swap the lowermost windows
out to disk if new windows get opened and the allocated ram space is full?
(ram disk prefered, of course) 

Also, I SUPPOSE you would want an interrupt driven mouse routine... sigh.

I was thinking that there could be a major "get input" routine that will wait
for either a keypress or a mouse click.  If the mouse click is something the
window routines can handle (such as scroll a window, close a window, etc) then
that action is taken (with certain restrictions set up by the programmer)
automatically and the program is returned to the get_input routine.  If a key
is pressed, it would be passed onto the main program to worry about.  In this
scheme, a simple mouse polling routine could be used, instead of interrupts
(the mouse pointer would turn into an hour-glass, informing the user that the
computer is busy when the routine was exited) 
 	I really haven't sat down and thought about the design of a window
system, but since I haven't seen a discussion here, I assume that no one else
has taken up this project.  If you have, and you are more prepaired than I am
(not too hard, I admit) kindly speak out so that a) people can give you input
so you make something that people want and b) I can stop duplicating someone
else's effort, and spend it profitably getting some sleep at night.  

-- 
_____________________________________________________________________________ 
 _        			|"Don't care if they say we are a dyin' race 
/ _ ar \/   ggray@wpi.bitnet    | I'd rather be here than any other place 
\_| ra /    ggray@wpi.wpi.edu   | Keep on working, Keep on working" P.T.  

mikes@ncsuvx.ncsu.edu (Michael Steele) (04/05/89)

In article <1645@wpi.wpi.edu> ggray@wpi.wpi.edu (Gary Gray) writes:
>for either a keypress or a mouse click.  If the mouse click is something the
>window routines can handle (such as scroll a window, close a window, etc) then

Look at the event loops used to program the GS.  I've done some event loop
programming on the Mac.  Essentially it's just a while loop that checks the
keyboard and then the mouse.  When something happens it just calls the mouse
or keyboard routine.  REAL simple to do this part.  Good luck on figureing
out what's going on with the mouse.  You'll find a lot of the code and
algorithms already developed for the GS and the Mac.  Look into those
sources for info on how it's done.

				Michael Steele
					mikes@ncsuvx.ncsu.edu

-- 
Michael Steele		mikes@ncsuvx.ncsu.edu
			mikes@ncsuctix.ncsuvx.ncsu.edu
			netoprms@ncsuvm.bitnet