Difference between revisions of "Cocoa Interface"
m (→Compiling the Cocoa Interfaces)
|Line 1:||Line 1:|
==Compiling the Cocoa Interfaces==
==Compiling the Cocoa Interfaces==
Revision as of 12:05, 18 December 2009
- Lazarus known issues (things that will never be fixed) - A list of interface compatibility issues
- Win32/64 Interface - The Windows API (formerly Win32 API) interface for Windows 95/98/Me/2000/XP/Vista/10, but not CE
- Windows CE Interface - For Pocket PC and Smartphones
- Carbon Interface - The Carbon 32 bit interface for macOS (deprecated; removed from macOS 10.15)
- Cocoa Interface - The Cocoa 64 bit interface for macOS
- Qt Interface - The Qt4 interface for Unixes, macOS, Windows, and Linux-based PDAs
- Qt5 Interface - The Qt5 interface for Unixes, macOS, Windows, and Linux-based PDAs
- GTK1 Interface - The gtk1 interface for Unixes, macOS (X11), Windows
- GTK2 Interface - The gtk2 interface for Unixes, macOS (X11), Windows
- GTK3 Interface - The gtk3 interface for Unixes, macOS (X11), Windows
- fpGUI Interface - Based on the fpGUI library, which is a cross-platform toolkit completely written in Object Pascal
- Custom Drawn Interface - A cross-platform LCL backend written completely in Object Pascal inside Lazarus. The Lazarus interface to Android.
Platform specific Tips
- Android Programming - For Android smartphones and tablets
- iPhone/iPod development - About using Objective Pascal to develop iOS applications
- FreeBSD Programming Tips - FreeBSD programming tips
- Linux Programming Tips - How to execute particular programming tasks in Linux
- macOS Programming Tips - Lazarus tips, useful tools, Unix commands, and more...
- WinCE Programming Tips - Using the telephone API, sending SMSes, and more...
- Windows Programming Tips - Desktop Windows programming tips
Interface Development Articles
- Carbon interface internals - If you want to help improving the Carbon interface
- Windows CE Development Notes - For Pocket PC and Smartphones
- Adding a new interface - How to add a new widget set interface
- LCL Defines - Choosing the right options to recompile LCL
- LCL Internals - Some info about the inner workings of the LCL
- Cocoa Internals - Some info about the inner workings of the Cocoa widgetset
When this interface was started it used a set of wrappers to access Cocoa, called PasCocoa. After this native support in Free Pascal for direct communication with Objective-C was added, thought the Objective Pascal dialect.
Compiling the Cocoa Interfaces
If you want to try Cocoa widgetset, or use some Cocoa features from Carbon application, you'll need to install PasCocoa library first.
1 - Download PasCocoa from subversion
Instructions here: PasCocoa#Subversion
2- Add the path to PasCocoa to your fpc.cfg file
In a standard installation this file will be located in: /etc/fpc.cfg
Please add at the end of this file the following (remember to adapt it to the paths in your system!):
# Search path for Cocoa bindings -Fu/Users/felipe/Programas/lazarus-ccr/bindings/objc -Fu/Users/felipe/Programas/lazarus-ccr/bindings/pascocoa/appkit -Fu/Users/felipe/Programas/lazarus-ccr/bindings/pascocoa/foundation -Fu/Users/felipe/Programas/lazarus-ccr/bindings/pascocoa/applicationservices/coregraphics
Since the file is write protected, only administrator accounts will be able to edit it. It is also possible to have a local fpc.cfg file. For more information google or ask in the mailling list.
3 - Compile a test PasCocoa project
In Lazarus, open /Users/felipe/Programas/lazarus-ccr/bindings/pascocoa/example/statusitem/statusitem.lpi (or similar acording to your local paths) and build the project.
This should guarantee that PasCocoa was installed correctly and create the .o files for it.
4 - Compile LCL-Cocoa
In Lazarus go to the Tools-->Configure Build Lazarus menu. Go to advanced, set everything to NONE and only LCL to clean+build, set the widgetset to Cocoa and push the Build button.
You can now build LCL-Cocoa applications by setting the target widgetset to cocoa in the Compiler Options dialog of your projects.
Located here: Roadmap#Status_of_features_on_each_widgetset