[lazarus] I can do QT from Free Pascal
Cliff Baeseman
vbman at pcpros.net
Thu Oct 14 08:53:53 EDT 1999
Here is the way that I am approaching it.
in CPP
extern "C" IntSendMessage(int Message,int WindgetID, void Data, int
DataLength )
in Pascal
const
MSG_CREATE_APPLICATION = 0;
MSG_CREATE_FORM = 1;
begin
IntSendMessage(MSG_CREATE_APPLICATION, nil,nil,nil )
intMessageHook(@ Winproc)
intSendMessage(MSG_CREATE_FORM,Form.ID,Form.Rect, SizeRect);
end.
Those are the only two calls declared external in a shared library. Every
thing is done thru that single common interface.
Cliff
-----Original Message-----
From: Florian Klaempfl <Florian.Klaempfl at gmx.de>
To: lazarus at miraclec.com <lazarus at miraclec.com>
Date: Thursday, October 14, 1999 5:18 AM
Subject: Re: [lazarus] I can do QT from Free Pascal
>Cliff Baeseman wrote:
>>
>> After a couple of nights of hacking I figured out how to run QT from Free
>> Pascal. I was just doing a test of something I had mentioned earlier. I
am
>> glad I did this little trial run I found out one hell of alot about the
g++
>> compiler, ld, and the Free Pascal Compiler.
>>
>> Cliff
>>
>
>I think the simplest way (but a lot of work!) to use Qt is writing C
wrappers to
>the method calls like:
>
>...
>extern "C" {
>
>void QObject_Method(QObject *this,int param1)
>{
> this->Method(param1);
>}
>}
>
>Or did you collect some knowledge about VMTs etc and simulate that using
records of
>proc. vars?
>
>Because our idea is to create a new class type cppclass:
>
>type
> QObject = cppclass
> procedure Method;cppdecl;external:
> ...
> end;
>
>to support cppclasses but for that we need some information how C++ classes
work, the
>main is the vmt which is even different between egcs and old gcc
>
>_________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.miraclec.com/list_archives/lazarus
>
More information about the Lazarus
mailing list