LAF: The Lost Application Framework
A library to create Windows, macOS, and Linux desktop applications.
This library is under active development so we don't provide API or ABI compatibility at this moment.
- base: Base functions for any kind of application.
- gfx: Generic graphics classes (rectangle, point, region, etc.)
- ft: FreeType wrapper used by the
freetypelibrary as dependency)
- os: Functions to create windows in your Operating System desktop.
laf can be compiled with two back-ends (
LAF_BACKEND=skia, laf requires a compiled version of the Skia library
aseprite-m81. You can check the aseprite/skia fork
which includes a release with pre-built versions, or
the check the instructions to compile skia from scratch.
LAF_BACKEND=none, the Pixman library
can be used as an alternative implementation of the
gfx::Region class (generally if
laf-os you will link it with Skia, so there is no
need for Pixman at all).
To compile laf with Skia as backend you have to specify some
variables pointing to a valid compiled version of Skia in your
disk. In the following example
/skiadir is the absolute path to a
directory where the Skia source code + compiled version is, or just
where you've uncompressed a pre-built package of Skia (note that in
/skiadir/out/Release-x64 should contain the Skia library
skia.lib on Windows or
libskia.a on other platforms):
git clone https://github.com/aseprite/laf.git cd laf mkdir build cd build cmake -G Ninja \ -DLAF_BACKEND=skia \ -DSKIA_DIR=/skiadir \ -DSKIA_LIBRARY_DIR=/skiadir/out/Release-x64 \ .. ninja ./examples/helloworld
To compile only the library (without examples and tests) you can
cmake -DLAF_WITH_EXAMPLES=OFF -DLAF_WITH_TESTS=OFF ...
You can use
ctest to run all tests:
cd build ninja ctest
laf is distributed under the terms of the MIT license.
Some functions in laf depends on third party libraries (you should include these license notices when you distribute your software):
- base::encode/decode_base64 functions use stringencoders by Nick Galbreath (MIT license).
- Tests use the Google Test framework by Google Inc. licensed under a BSD-like license.
- Color spaces,
gfx::Region, and the
laf::oslibrary use code from the Skia library by Google Inc. licensed under a BSD-like license and several other third-party libraries/licenses.
gfx::Regionuses the pixman library if you are not compiling with the Skia backend (e.g. a if you want to create only Command Line utilities that uses the
gfx::Regionclass). Pixman is distributed under the MIT License.