From: ivan@vianet.net.au
Date: Sun 18 Jul 1999 - 18:49:41 IDT
Hi everyone,
i've been playing around trying to get a really nice mouse
cursor but i keep falling down :
i want the mouse cursor to be constantly updated so that it
can be displayed over a changing background.
mouse_seteventhandler() is close but because the handler is
only activated on a mouse event it means that if the
background 'underneath' the cursor changes then the cursor
disappears until the next event.
so, the way i have tried (and the way i really want to go)
is to have a background process that does nothing but
<pseudocode>
while (1)
mouse_update()
if mouse position changed
restore old old mouse position background
get new mouse position background
endif
draw cursor at current mouse location
end while
</pseudocode>
i have tried three ways to get this to work :
a) fork() execv(mouse_programme,mouse_programme,NULL)
b) fork() { /* do pseudocode above */ }
c) system(mouse_programme)
in all cases it seems that mouse_programme knows roughly but not
exactly how vram has been mapped in ram. i say mouse_programme
knows roughly because i do get screen changes - just not the
ones i want :(
to make the problem possibly more complex i want to have
additional background processes doing different things
all independently.
therefore i have two problems :
a) how to make sure that all processes use a common memmap ?
b) how to lock the memory to ensure that page swapping isn't
occurring simultaneously with display changes ?
i suspect that the bright minds here will soon come up with other
problems as well :)
all comments/suggestions welcome
TIA
ivan
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST