Difference between revisions of "Windows CE Interface"
Sekelsenmat (talk | contribs) m (→Screenshots) |
Sekelsenmat (talk | contribs) |
||
Line 28: | Line 28: | ||
===currently implemented components with their status=== | ===currently implemented components with their status=== | ||
− | + | Moved here: [[Road_To_1.0#Widgetset_dependent_components]] | |
− | |||
− | |||
===components scheduled to be implemented=== | ===components scheduled to be implemented=== |
Revision as of 17:39, 24 March 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
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
currently implemented Windows API functions by group and with status
wish-list of new components
Use this space for components you would like to see implemented
Screenshots
A minimal example of Lazarus+WinCE and the Free Pascal software used to test the cross compiler:
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.