Difference between revisions of "Accessing the Interfaces directly"

From Free Pascal wiki
 
Line 1: Line 1:
 
This page describes, how to write a new LCL control, using the various LCL interfaces for the platform dependent implementations.
 
This page describes, how to write a new LCL control, using the various LCL interfaces for the platform dependent implementations.
  
OpenGL is a platform independent language to do 3D graphics.
+
OpenGL is a platform independent language for 3D graphics.
 +
The platform dependent part is to get a OpenGL context. Under linux/freebsd/X you use glx for that, under windows you use WGL and under MacOSX you can use AGL.
 +
 
 +
Every TWinControl has a Handle, and the LCL does not need to know, what a Handle is. The meaning of the Handle is totally up to the LCL interface:
 +
 
 +
* under gtk a Handle is often a PGtkWidget
 +
* under windows a Handle is often a HWnd.
 +
* under carbon a Handle is often a ControlRef
 +
 
 +
Be aware, that you should avoid relying on any widgetset specials.

Revision as of 17:45, 4 February 2006

This page describes, how to write a new LCL control, using the various LCL interfaces for the platform dependent implementations.

OpenGL is a platform independent language for 3D graphics. The platform dependent part is to get a OpenGL context. Under linux/freebsd/X you use glx for that, under windows you use WGL and under MacOSX you can use AGL.

Every TWinControl has a Handle, and the LCL does not need to know, what a Handle is. The meaning of the Handle is totally up to the LCL interface:

  • under gtk a Handle is often a PGtkWidget
  • under windows a Handle is often a HWnd.
  • under carbon a Handle is often a ControlRef

Be aware, that you should avoid relying on any widgetset specials.