[lazarus] Attempt at native Win32 Form

Michael A. Hess mhess at miraclec.com
Sun Aug 1 22:08:59 EDT 1999


Jeffrey A. Wormsley wrote:
> 
> I was hoping to try ti get a first pass at a native Win32 form going
> this weekend, but I am at a wall of misunderstanding that makes the
> great wall of China look like a parking curb.  Maybe someone can help
> me out here.
>
<snip>
> 
> My first point of confusion comes with controls.pp.  Why are the
> glib.pp, gdk.pp and gtk.pp units in the Interface Uses section of this
> unit?

They shouldn't be and in the future won't be. They were still there
while we progressed with moving everything over to the gtkint.pp and
associated .inc's. If there are not more gtk calls in controls.pp then
they can be removed.

> Doesn't this break the toolkit independence?

Yes.

> The same holds true for vclglobals.pp.  Are they even used anywhere,
> or could they be leftovers?

Again this is just due to the progress of moving to the independent
versions of the code.
 
> The second area is also in vclglobals.  The csxxxxx (Class Style ???)
> constants defined there are, I assume, lazarus specific.  The
> interface for each toolkit will have to map these constants to
> corresponding toolkit contants, where there is a match.  Is this
> correct?

Correct. They are a means to communicate between the lcl and the API GUI
code with is the interface code. Each API's set of interface code will
have to honor this constants and try to call the correct API routines to
match what these constants represent.
 
> Next in the list is the graphics.pp file.  Are all of the colors
> defined there meant to be Delphi compatible, and therefore native
> win32 color definitions?  Since the gtk color conversion routines in
> gtkint.pp are private, a win32 version (WinInt.pp??) will not need an
> equivalent color conversion method, correct?

The colors a simply a sequence of RGB values. We choose to represent the
colors in the same fashion that Delphi and Windows does. 

  $00BBGGRR

No specific reason other than some compatibility with Delphi. A
conversion routine will only be required if the API in question uses a
different layout to represent a color. For instance GTK uses record
which is made up of 3 shorts to represent Red, Green and Blue.
 
> Lastly, in Forms.pp.  I take it that none of the windows concepts of
> Window Style (the WS_xxxxxx constants such as WS_POPUP, WS_DLGFRAME,
> etc.) have been implemented yet?  I noticed that to get to
> CreateWindow through the Win32 tree, you had to go all the way to
> funcs.inc in the fcl.

Those styles have not been created yet. Go for it.  :-)
 

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list