Message-Id: <3.0.16.19970928200950.087f930c@hem1.passagen.se> Date: Sun, 28 Sep 1997 20:09:55 -0400 To: Eli Zaretskii From: Peter Palotas Subject: Re: Mouse Cursors, GUI's. Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 19.00 1997-09-28 +0200, you wrote: > >On Sun, 28 Sep 1997, Peter Palotas wrote: > >> First problem is the mouse-pointer. How do you greate an absolutely >> flicker-free mouse-pointer? I mean, just look at windows. It doesn't >> flicker. > >Huh? Did you mean Microsoft Windows? Because on my system (Windows >95), every time the DOS box scrolls a line, the mouse pointer >flickers. I can stop the flickering by moving the pointer to the >caption bar, but even this not always works (the window title changes >when I run nested programs, like compilation with Make, and that's >whne the pointer flickers also). Well, actually I don't own windows 95, so I can't say anything about that. But let's skip the DOS-boxes. When running windows 3.11 I can't notice *any* mouse-flicker. I'm wondering if they are using some special method to draw the mouse-cursor. I have actually gotten some weird effects sometimes, when windows hangs and exits directly to DOS, where the mousepointer was is now a white square (distorted)... In DOS that is, and it won't move. And doing a QEMM-Quickboot, won't get rid of it. >> What you could have is a procedure looping, checking for events, >> this works, but then you can't do anything else in your program meanwhile, >> hence it leads to quite a lot of idle time. > >Did you try this? I think you greatly exaggerate the problems here, >maybe because it just seems ``ugly''. FYI: the DJGPP port of Emacs >works by polling the mouse in exactly the way that you describe, and I >have yet to see the effect of the ``lots of idle time'' that you are >afraid of. (IMHO, if the performance suits you, the polling method is >the most portable and the most safe; look at the amount of problems >that RHIDE and Allegro have when they try to do this much faster and >better.) I did try this, and well, in a GUI using OOP I guess you shouldn't really do very much but wait for events to happen, so I guess this works. I have made a GUI once using this technique, but I just wondered if someone had a better suggestion. But when you say this is good, I can't do anything but believe it! >> You could use a >> multi-threading-library I suppose, but I don't know how stable these are, >> and so on. Wouldn't it be good if DJGPP implemented a version of >> fork() > >As a matter of fact, there is an alpha version of a multi-threading >`fork' that was proposed to be added to the next release of DJGPP. >But it needs testing. Would you consider testing it in your projects >and posting feedback, bugfixes etc.? If so, please write to DJ Delorie > and ask him to send you the code. Thanks. Well, let me just ask you this first... Would it work to use printf in fork'ed functions? And let me also thank you for all the great work you are contributing with, and all questions you answer. I can't believe how anyone can sacrifice as much time as you on so many peoples questions and stuff. Thanx! -- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se -- ************************************************************* A brief description of DJGPP: NEVER BEFORE HAS SO FEW DONE SO MUCH FOR SO MANY! *************************************************************