Difference between revisions of "Windows CE Interface"

From Free Pascal wiki
Jump to navigationJump to search
m
Line 23: Line 23:
 
ppcrossarm.exe -Twince -FuC:\programas\lazarus\lcl\units\arm-wince -FuC:\programas\lazarus\lcl\units\arm-wince\wince -FuC:\Programas\fpc21\rtl\units\arm-wince -FDC:\Programas\arm -XParm-wince- windowtest.pas
 
ppcrossarm.exe -Twince -FuC:\programas\lazarus\lcl\units\arm-wince -FuC:\programas\lazarus\lcl\units\arm-wince\wince -FuC:\Programas\fpc21\rtl\units\arm-wince -FDC:\Programas\arm -XParm-wince- windowtest.pas
 
</pre>
 
</pre>
 +
 +
==Debbuging Windows CE software on the Lazarus IDE==
 +
 +
Please write me.
  
 
==Road map for the Windows CE interface==
 
==Road map for the Windows CE interface==

Revision as of 14:18, 9 April 2006

Windows CE interface is in early development.

Setting Up the Windows CE interface

The Compiler and Run-time library for Windows CE are only available on the development branch of Free Pascal, the 2.1.x version. Lazarus snapshot comes with this Free Pascal version.

1 - To start with you will need to recompile the compiler on Windows to create a Windows CE - ARM Crosscompiler. There are instructions here: WinCE_port.

2 - Put the batch file bellow on the root of your subversion lazarus directory and run it

PATH=C:\Programas\lazarus13\pp\bin\i386-win32;c:\Programas\arm
make lcl LCL_PLATFORM=wince PP=ppcrossarm.exe CPU_TARGET=arm OS_TARGET=wince

This should compile LCL for Windows CE.

3 - Now you can compile simple LCL software using scripts similar to this:

PATH=C:\Programas\lazarus13\pp\bin\i386-win32;c:\Programas\arm
ppcrossarm.exe -Twince -FuC:\Programas\fpc21\rtl\units\arm-wince -FDC:\Programas\arm -XParm-wince- test.pas
ppcrossarm.exe -Twince -FuC:\programas\lazarus\lcl\units\arm-wince -FuC:\programas\lazarus\lcl\units\arm-wince\wince -FuC:\Programas\fpc21\rtl\units\arm-wince -FDC:\Programas\arm -XParm-wince- windowtest.pas

Debbuging Windows CE software on the Lazarus IDE

Please write me.

Road map for the Windows CE interface

currently implemented components with their status

Moved here: Road_To_1.0#Widgetset_dependent_components

components scheduled to be implemented

  • TCanvas
  • TBitmap - Needs a description of the internal format used by Windows CE
  • TPixmap
  • TIcon

Screenshots

A minimal example of Lazarus+WinCE and the Free Pascal software used to test the cross compiler:

Second laz wince.PNG Wince.PNG

How to add a new control

For example TButton.

TButton is defined in lcl/buttons.pp. This is the platform independent part of the LCL, which is used by the normal LCL programmer.

Its widgetset class is in lcl/widgetset/wsbuttons.pp. This is the platform independent base for all widgetsets (qt, carbon, gtk, win32, ...).

It's wince interface class is in lcl/interfaces/wince/wincewsbuttons.pp:

 TWinCEWSButton = class(TWSButton)
 private
 protected
 public
   class function  CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
 end;

Every WS class, that actually implements something must be registered. See the initialization section at the end of the wincewsXXX.pp unit:

 RegisterWSComponent(TButton, TWinCEWSButton);


Also notice that DestroyHandle should be implemented to clean up memory utilized by the control.