/************************************************************************ 'MouseOff' will cause the mouse pointer to disappear and reappear if movement is detected. It will disappear again after 10 seconds of inactivity. Usage: Run MouseOff 'MouseOFF' is public domain. Please feel free to pass it anywhere you want. Comments should be sent to: Denny Jenkins 5226 Greensedge Way Columbus, Ohio 43220 CompuServe ID: 70003,2374 *************************************************************************/ #include #include struct Screen *s; struct Window *w, *OpenWindow(); struct IntuitionBase *IntuitionBase; struct Preferences MyCopy; void *GfxBase; struct NewWindow nw = { 0,0,3,10, -1,-1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0,0,0,0, WBENCHSCREEN }; ULONG Seconds, Micros, Limit=0, Ten=10; SHORT LastX, LastY; USHORT PointerData[POINTERSIZE]; BOOL Pointer=TRUE; _main() { register int i; IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0L); GetPrefs (&MyCopy, (long) sizeof(MyCopy)); for (i=0; iWScreen; LastX = s->MouseX; LastY = s->MouseY; FOREVER { Delay(50); CurrentTime(&Seconds,&Micros); if(Seconds > Limit) { if ((LastX == s->MouseX) && (LastY == s->MouseY)) { if (Pointer) { for (i=0; iMouseX; LastY = s->MouseY; if (!(Pointer)) { for (i=0; i