DeskLib
C Wimp Library for RISC OS
Introduction
DeskLib is a fully-sourced, general-purpose freeware C library for writing desktop applications for RISC OS. It provides comprehensive support for window and icon manipulation, menu creation, graphics routines, message handling, filing operations, font handling, string manipulation and much more. High level event management functions are provided in order to build coherent and powerful code.
Download
Latest Release
The current version of DeskLib is 2.80, released in July 2007. It is available for installation using RiscPkg or can be downloaded from here:
- Core contains everything needed to use the library, including documentation.
- Examples has practical examples on how to use the different parts of DeskLib.
- Source contains the C and assembler source which makes up the library functions. (Note: this part is not included in the RiscPkg package.)
Changes
Changes since version 2.70 include:
- Several important bugfixes, optimisations and a couple of API changes in Sprite.
- Provided 'sprite by pointer' in addition to 'sprite by name' routines (named as Sprite_*P()).
- Added Sprite_SetPointerShape()/Sprite_SetPointerShapeP().
- Some extra examples
- Tinct support
- Rationalised documentation including an updated StrongHelp manual
- Minor additions to the Icon and Window modules
For older changes, see the changes page.
Documentation
Manuals
Descriptions of the functions, structures, types etc are included with the Core download in StrongHelp format, or you can browse an unofficial online HTML version. The download also includes various notes and updates which can be accessed from the Help option on the filer menu for the applications.
Tutorials & Examples
- Tutorial by Frauke Nonnenmacher (quite old, but still good)
- Examples by Shaun Lindsley
Development Versions
Source
The sources for DeskLib are held in a subversion repository on riscos.info. Read access is available to all, either by checking out the project with svn or by viewing via the WebSVN web interface.
To make contributions, post to the DeskLib mailing list with patches or a request for svn write access.
Properties
Subversion allows 'properties' to be set for files in the repository and a number of conventions should be followed when creating or modifying files:
svn:executable
should be unset for all filessvn:mime-type
should be set equal to some non-text value (for instanceapplication/octet-stream
) for binary filessvn:eol-style
should be set tonative
for all text-based files, and should not be set for binary files
Building
DeskLib is built, as standard, using GCC, though it should still build using other compilers. To build from the sources either use the GCCSDK autobuilder or, if cross-compiling using GCCSDK:
$make -f Makefile.unix
To compile under RISC OS, using GCC, run the MakeDeskLib
file or open a taskwindow and use:
*make
(These will build the Debugs and SmallError supplementary libraries in addition to the main DeskLib library.)
Makefile.unix
, Makefile
and MakeDeskLib
can be found inside !DLSources
. (Note: if using a unix environment, don't forget to escape the !
s in the RISC OS application names, e.g.: cd \!DLSources
.) For the cross-compile build to be successful, the environment variable GCCSDK_INSTALL_CROSSBIN
needs to be present. If you don't have this set already and you've followed the standard installation instructions for GCCSDK then adding the line:
GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
to the start of the makefile will set the variable for you (if it's unset).
Note: version 2.80 may be the last AOF-based release. Version 3 will be ELF-based and will require GCC 4.x.
Support
If you have questions either about the use of DeskLib or about building it, please either ask on the comp.sys.acorn.programmer usenet group or the DeskLib mailing list. (The mailing list can be joined by sending an email to desklib-subscribe@googlegroups.com.)