"Fossies" - the Fresh Open Source Software Archive 
Member "FreeBASIC-1.09.0-win64/inc/allegro/algif.bi" (1 Jan 2022, 2870 Bytes) of package /windows/misc/FreeBASIC-1.09.0-win64.zip:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 '' FreeBASIC binding for algif_1.3
2 ''
3 '' based on the C header files:
4 '' Copyright (c) 2000-2004 algif contributors
5 '' Permission is hereby granted, free of charge, to any person obtaining a
6 '' copy of this software and associated documentation files (the "Software"),
7 '' to deal in the Software without restriction, including without limitation
8 '' the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 '' and/or sell copies of the Software, and to permit persons to whom the
10 '' Software is furnished to do so, subject to the following conditions:
11 '' The above copyright notice and this permission notice shall be included in
12 '' all copies or substantial portions of the Software.
13 '' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 '' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 '' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 '' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 '' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 '' FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19 '' DEALINGS IN THE SOFTWARE.
20 ''
21 '' translated to FreeBASIC by:
22 '' Copyright © 2015 FreeBASIC development team
23
24 #pragma once
25
26 #inclib "algif"
27
28 #include once "allegro.bi"
29
30 extern "C"
31
32 #define _GIF_H_
33 #define DAT_GIF DAT_ID(asc("G"), asc("I"), asc("F"), asc(" "))
34
35 type GIF_PALETTE
36 colors_count as long
37 colors(0 to 255) as RGB
38 end type
39
40 type GIF_FRAME as GIF_FRAME_
41
42 type GIF_ANIMATION
43 width as long
44 height as long
45 frames_count as long
46 background_index as long
47 loop as long
48 palette as GIF_PALETTE
49 frames as GIF_FRAME ptr
50 store as BITMAP ptr
51 end type
52
53 type GIF_FRAME_
54 bitmap_8_bit as BITMAP ptr
55 palette as GIF_PALETTE
56 xoff as long
57 yoff as long
58 duration as long
59 disposal_method as long
60 transparent_index as long
61 end type
62
63 declare sub algif_init()
64 declare function algif_load_animation(byval filename as const zstring ptr, byval frames as BITMAP ptr ptr ptr, byval durations as long ptr ptr) as long
65 declare function load_gif(byval filename as const zstring ptr, byval pal as RGB ptr) as BITMAP ptr
66 declare function save_gif(byval filename as const zstring ptr, byval bmp as BITMAP ptr, byval pal as const RGB ptr) as long
67 declare function algif_load_raw_animation(byval filename as const zstring ptr) as GIF_ANIMATION ptr
68 declare sub algif_render_frame(byval gif as GIF_ANIMATION ptr, byval bitmap as BITMAP ptr, byval frame as long, byval xpos as long, byval ypos as long)
69 declare function algif_create_raw_animation(byval frames_count as long) as GIF_ANIMATION ptr
70 declare function algif_save_raw_animation(byval filename as const zstring ptr, byval gif as GIF_ANIMATION ptr) as long
71 declare sub algif_destroy_raw_animation(byval gif as GIF_ANIMATION ptr)
72
73 end extern