xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Suggest addiing documentation for fl_XFlush


From: Jens Thoms Toerring
Subject: Re: [XForms] Suggest addiing documentation for fl_XFlush
Date: Tue, 26 Mar 2013 15:38:12 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Mon, Mar 25, 2013 at 07:11:47PM -0500, Rick Engebretson wrote:
> After reading a little about Xlib programming, it was clear that
> flushing the buffer that is written to the X Server was important
> for automation and animation. I didn't find anything in the
> documentation, but I did find the function fl_XFlush in the file
> "forms.h"

Thanks, yes that's something missing. I'll try to ad it as soon
as possible.
 
> It makes a difference in a little canvas program, completing the
> display draw before a sleep is called in the application.

As a rule you normally shouldn't use sleep() in a XForms
program - sleep() (and other functions of that kind) are
for a different programming paradigma, one where you run
basically straight through a program. But XForms programs,
like all typical GUI programs, work event based, i.e. you
normally have callbacks and otherwise wait for events
(typically generated by the user by some interaction).
Thus, if you have some task that needs to be done every
other second or so you normally would use a timer and
have the task to be done as a calback for the timer.

Using sleep() and friends will mess up the whole system since
it puts the program to sleep for that time, and during that
time no graphical updates will happen and no events can be
dealt with. So calling fl_XFlush() is treating one of the
symptoms but not really a solution.

On the other hand I can see that using Pascal routines for
callbacks will be an "interesting" problem - probably quite
a bit of glue code will be needed to allow calling these
routines written in Pascal to be used as C callback func-
tions...

> Should anybody care, I put some FreePascal XForms binding units and
> demos up in HTML. The HTML format shows the 8 space tab, but if
> copied into an editor with 4 space tabs it looks OK. It seems to
> work on opensuse 12.2, and freepascal 2.6.2, and needs a
> "cursorfont.inc" file from eg. the freepascal distribution.
> 
> >http://www.sytekcom.com/eng/Freepascal_XForms_Units.html
> 
> >http://www.sytekcom.com/eng/Freepascal_XForms_Demos.html

That lloks rather interesting and I will put the URLs into
the next version of the documentation!

                          Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]