[Lazarus] LCLWidgetType CustomDrawn

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Dec 1 17:29:32 CET 2011


On Thu, Dec 1, 2011 at 4:37 PM, Michael Schnell <mschnell at lumino.de> wrote:
>  - To me it looks like "CustomDrwan" can't be sure that any back ent it is
> made for provides an event queue. So it supposedly needs to create an event
> queue in the LCL code. Here of course the main thread needs do so a non-busy
> wait for incoming events using the underlying OS API. Correct ?

I think that the 5 or so APIs from the LCL that deal with lower level
events (PostMessage, QueueAssyncCall, SendMessage, etc) could be
implement with a timer and an event queue.

The rest of the LCL does not require direct interaction with an event
queue, it can also work through direct events from the OS.

>  - "ifi" (the backend is attached via a bidirectional byte stream such as a
> pipe, a socket or an asynchronous port.

LCL-Android worked like that, attached via pipes to the Java side. It
actually worked OK.

>  - http (the backend is done in java script and runs in a browser, the
> connection is done using the http protocol <see ExtPascal / ExtJS>)

I think that it would work badly due to latency and it would load a
lot the server. LCL-CustomDrawn is based on sending the entire image
of the application. If such a thing was really viable I think there
would be a lot of people doing that way, but I don't know anyone which
went for that solution.

A specialized LCL interface written for web apps (not based on
LCL-CustomDrawn) could work for normal GUIs with simple buttons and
other controls without fast animations, but the biggest web app that I
am developing is a game with animations, so here to me it seams that
there was no really good way of integrating the LCL into the web app
so I just gave up on that and went for fcl-web with CGI.

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list