Revision as of 16:39, 20 August 2007 by Adamr (Talk | contribs)
Jump to: navigation, search

C Wimp Library for RISC OS



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.


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 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.



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

Development Versions


The sources for DeskLib are held in a subversion repository on 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.


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 files
  • svn:mime-type should be set equal to some non-text value (for instance application/octet-stream) for binary files
  • svn:eol-style should be set to native for all text-based files, and should not be set for binary files


DeskLib is built, as standard, using GCC, though it should still build using other compilers. It can be built using the GCC cross-compiler; natively using GCC; or using the GCCSDK autobuilder.

Cross-compiling using GCCSDK

To build from the sources using GCCSDK, make sure the current work directory is !DLSources and use:

$ make -f Makefile.unix

(Remember to escape the !s - e.g. cd \!DLSources.) Note that 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).

Compiling under RISC OS

To compile under RISC OS using GCC, set the current directory to !DLSources and either run the MakeDeskLib file or open a taskwindow and type:

* make  

Note: version 2.80 may be the last AOF-based release. Version 3 will be ELF-based and will require GCC 4.x.


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

Personal tools