Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-02

Problems with Lazarus - off-topic question

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Chavoux Luyt

Hi Mattias

Mattias Gaertner wrote
<snip> On some Linux the QT version is faster. Unfortunately there is no debian package for that. But compiling it is easy.

Is there anywhere where it is explained how this was done? The original Delphi language was pretty much a Pascal wrapper around the Windows API (that would probably just convert the Pascal-style calls to (far) c-style calls and then link to the various windows .dll's)? How does this convert into QT (or GTK for that matter)? Is there a document that explains this? I assume this translation and linking is done by Lazarus and is not built into fpc?

Thanks
Chavoux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130219/63aec77e/attachment.html>

Reply by email

Sven Barth
to Chavoux Luyt
Chavoux Luyt wrote 13 lines
Hi Mattias On 19 February 2013 11:12, Mattias Gaertner < <mailto:>> wrote: <snip> On some Linux the QT version is faster. Unfortunately there is no debian package for that. But compiling it is easy. Is there anywhere where it is explained how this was done? The original Delphi language was pretty much a Pascal wrapper around the Windows API (that would probably just convert the Pascal-style calls to (far) c-style calls and then link to the various windows .dll's)?

Huh? Calls to the Windows API functions are basically just (in assembly language) CALLs with the parameters set up in the way the function expects it (told to the compiler by the calling convention). And the called function is located in a DLL which is loaded on process startup through Windows' dynamic loader.

How does this convert into QT (or GTK for that matter)? Is there a document that explains this? I assume this translation and linking is done by Lazarus and is not built into fpc?

For GTK it is the same as for the Windows API. For Qt the C++ based API first needs to be converted to a flat C style API (this is done through a library written in C++ called libQt4Pas) and then we have the same situation as above.

If you want to take a look at the API bindings just look at $fpcsrc/rtl/win/windows.pp for the Windows API
and
$fpcsrc/packages/gtk2/src for the GTK+ API.

Regards,
Sven

Reply by email

Mattias Gaertner
to Chavoux Luyt: Hi Mattias Is there anywhere where it is explained how this was done? The original Delphi…
Show quoted text 9 lines
Hi Mattias On 19 February 2013 11:12, Mattias Gaertner wrote: > <snip> > On some Linux the QT version is faster. Unfortunately there is no > debian package for that. But compiling it is easy. > Is there anywhere where it is explained how this was done?

See here:
http://wiki.freepascal.org/Qt_Interface#Quick_start_guide_for_Linux

The original Delphi language was pretty much a Pascal wrapper around the Windows API (that would probably just convert the Pascal-style calls to (far) c-style calls and then link to the various windows .dll's)?

Delphi does much more than this. It provides an Object Pascal layer called VCL, which in the background calls the Windows API. That's why a VCL application has only a few direct Windows API calls.

The LCL is a Object Pascal layer, very similar to the VCL, but able to use various backends, including WinAPI, GTK and QT.

How does this convert into QT (or GTK for that matter)? Is there a document that explains this? I assume this translation and linking is done by Lazarus and is not built into fpc?

Yes.
Maybe this gives an idea:
http://wiki.freepascal.org/LCL_Internals

Mattias

Reply by email

Chavoux Luyt
to Mattias Gaertner

Thanks Mattias & Sven!

On 19 February 2013 11:43, Mattias Gaertner wrote:

<snip>

See here:

http://wiki.freepascal.org/LCL_Internals

Sven Barth via lists.lazarus.freepascal.org:
If you want to take a look at the API bindings just look at $fpcsrc/rtl/win/windows.pp for the Windows API
and
$fpcsrc/packages/gtk2/src for the GTK+ API.

I will have a look!

Cheers
Chavoux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130219/b025dad9/attachment.html>

Reply by email