summaryrefslogtreecommitdiff
path: root/body/fltk-pixmap_marshal.ads
blob: d12b0f85dda5f8a5cdc90a68344b54d9ce3fc530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44


--  Programmed by Jedidiah Barber
--  Released into the public domain


limited with

    FLTK.Images.Pixmaps;

with

    Interfaces.C.Strings;


private package FLTK.Pixmap_Marshal is


    type chars_ptr_array_access is access all Interfaces.C.Strings.chars_ptr_array;




    --  From Ada to C char *  --

    --  Note the resulting chars_ptr_array_access must be deallocated manually.

    function To_Coltype
           (Value : in FLTK.Images.Pixmaps.Color_Kind)
        return Character;

    function Marshal_Data
           (Values : in FLTK.Images.Pixmaps.Header;
            Colors : in FLTK.Images.Pixmaps.Color_Definition_Array;
            Pixels : in FLTK.Images.Pixmaps.Pixmap_Data)
        return chars_ptr_array_access;

    procedure Free_Recursive
           (This : in out chars_ptr_array_access);


end FLTK.Pixmap_Marshal;