Difference between revisions of "Windows CE Interface"

From Free Pascal wiki
Jump to navigationJump to search
(wikified link)
Line 6: Line 6:
  
 
To start with you will need to recompile the compiler on Windows to create a Windows CE - ARM Crosscompiler. There are instructions here: [[fpc:WinCE_port|WinCE_port]].
 
To start with you will need to recompile the compiler on Windows to create a Windows CE - ARM Crosscompiler. There are instructions here: [[fpc:WinCE_port|WinCE_port]].
 +
 +
==Road map for the Windows CE interface==
 +
 +
===currently implemented components with their status===
 +
 +
===components scheduled to be implemented===
 +
 +
* TApplication
 +
* TCustomForm
 +
* TCustomButton
 +
* 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==
 
==Screenshots==
Line 12: Line 33:
  
 
[[Image:Wince.PNG]]
 
[[Image: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.

Revision as of 22:41, 23 February 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.

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.

Road map for the Windows CE interface

currently implemented components with their status

components scheduled to be implemented

  • TApplication
  • TCustomForm
  • TCustomButton
  • 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

Test of the Windows CE cross compiler:

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.