This patch makes style checks and warning as error switches controllable
with a scenario variable: ADL_BUILD_CHECKS (disabled by default).
With this we can enforce style checks on all contributions by enabling
ADL_BUILD_CHECKS in testsuite runs and CI builds.
On the other hand the checks are disabled by default which means it is
easier and more friendly to play with the library and the examples.
Part of #271
Instead of returning False when a configuration is not supported, users
can call a function beforehand to know if it is supported. The
capability is also now a precondition of the setup procedures.
in a package called File_IO. This hides some of the complexity of
dealing with access to handle and answers some of the questions
discussed in the issue #68.
The package also provides the mounting interface, taken from
Filesystem.VFS.
as opposed to handles. And pass handles as out parameters.
File and directory handles will always be used for more than one
operation. Read/Write and Close at least, so it will require to declare
a variable for them.
Handle : Any_File_Handle;
begin
Open ("/my_file". Handle);
Handle.Read (...)
Handle.Close;
vs
-- This is not practical because now I can't close the handle
Open ("/my_file").Read (...);
On the other side, one might want to just check the status code of a
function without declaring a variable to do so.
if Open ("/my_file", Handle) /= OK then
...
vs
Handle : Any_File_Handle;
Status : Status_Code;
begin
Handle := Open ("/my_file", Status);
if Status /= OK then
...
There are two color formats in HAL.Bitmap, the Bitmap_Color (with Alpha,
Red, Green, Blue components) and the "native" raw value of the pixel.
In the current interface users select a color for each operations (Fill,
Draw_Line, Draw_Circle, etc.) which means each operation has to be
declared twice, one with a Bitmap_Color and one with native pixel value.
Inspired by the Cairo graphics library, this patch add a Set_Source
primitive which allows to specify the color that will be use. Each
drawing operation then uses this color for rendering.
This simplifies the interface since drawing operation only have to be
declared once. It may also allow for more advanced sources in the future
like gradients or textures.