"Fossies" - the Fresh Open Source Software Archive 
Member "FreeBASIC-1.09.0-win64/inc/allegro5/allegro_font.bi" (1 Jan 2022, 5712 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 allegro-5.0.11
2 ''
3 '' based on the C header files:
4 '' Copyright (c) 2004-2011 the Allegro 5 Development Team
5 ''
6 '' This software is provided 'as-is', without any express or implied
7 '' warranty. In no event will the authors be held liable for any damages
8 '' arising from the use of this software.
9 ''
10 '' Permission is granted to anyone to use this software for any purpose,
11 '' including commercial applications, and to alter it and redistribute it
12 '' freely, subject to the following restrictions:
13 ''
14 '' 1. The origin of this software must not be misrepresented; you must not
15 '' claim that you wrote the original software. If you use this software
16 '' in a product, an acknowledgment in the product documentation would be
17 '' appreciated but is not required.
18 ''
19 '' 2. Altered source versions must be plainly marked as such, and must not be
20 '' misrepresented as being the original software.
21 ''
22 '' 3. This notice may not be removed or altered from any source
23 '' distribution.
24 ''
25 '' translated to FreeBASIC by:
26 '' Copyright © 2015 FreeBASIC development team
27
28 #pragma once
29
30 #ifdef __FB_UNIX__
31 #inclib "allegro_font"
32 #elseif defined(__FB_WIN32__) and defined(ALLEGRO_STATICLINK)
33 #inclib "allegro_font-5.0.10-static-md"
34 #else
35 #inclib "allegro_font-5.0.10-md"
36 #endif
37
38 #include once "allegro5/allegro.bi"
39
40 extern "C"
41
42 #define __al_included_allegro5_allegro_font_h
43 type ALLEGRO_FONT_VTABLE as ALLEGRO_FONT_VTABLE_
44
45 type ALLEGRO_FONT
46 data as any ptr
47 height as long
48 vtable as ALLEGRO_FONT_VTABLE ptr
49 end type
50
51 type ALLEGRO_FONT_VTABLE_
52 font_height as function(byval f as const ALLEGRO_FONT ptr) as long
53 font_ascent as function(byval f as const ALLEGRO_FONT ptr) as long
54 font_descent as function(byval f as const ALLEGRO_FONT ptr) as long
55 char_length as function(byval f as const ALLEGRO_FONT ptr, byval ch as long) as long
56 text_length as function(byval f as const ALLEGRO_FONT ptr, byval text as const ALLEGRO_USTR ptr) as long
57 render_char as function(byval f as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval ch as long, byval x as single, byval y as single) as long
58 render as function(byval f as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval text as const ALLEGRO_USTR ptr, byval x as single, byval y as single) as long
59 destroy as sub(byval f as ALLEGRO_FONT ptr)
60 get_text_dimensions as sub(byval f as const ALLEGRO_FONT ptr, byval text as const ALLEGRO_USTR ptr, byval bbx as long ptr, byval bby as long ptr, byval bbw as long ptr, byval bbh as long ptr)
61 end type
62
63 enum
64 ALLEGRO_ALIGN_LEFT = 0
65 ALLEGRO_ALIGN_CENTRE = 1
66 ALLEGRO_ALIGN_CENTER = 1
67 ALLEGRO_ALIGN_RIGHT = 2
68 ALLEGRO_ALIGN_INTEGER = 4
69 end enum
70
71 declare function al_register_font_loader(byval ext as const zstring ptr, byval load as function(byval filename as const zstring ptr, byval size as long, byval flags as long) as ALLEGRO_FONT ptr) as byte
72 declare function al_load_bitmap_font(byval filename as const zstring ptr) as ALLEGRO_FONT ptr
73 declare function al_load_font(byval filename as const zstring ptr, byval size as long, byval flags as long) as ALLEGRO_FONT ptr
74 declare function al_grab_font_from_bitmap(byval bmp as ALLEGRO_BITMAP ptr, byval n as long, byval ranges as const long ptr) as ALLEGRO_FONT ptr
75 declare function al_create_builtin_font() as ALLEGRO_FONT ptr
76 declare sub al_draw_ustr(byval font as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval x as single, byval y as single, byval flags as long, byval ustr as const ALLEGRO_USTR ptr)
77 declare sub al_draw_text(byval font as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval x as single, byval y as single, byval flags as long, byval text as const zstring ptr)
78 declare sub al_draw_justified_text(byval font as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval x1 as single, byval x2 as single, byval y as single, byval diff as single, byval flags as long, byval text as const zstring ptr)
79 declare sub al_draw_justified_ustr(byval font as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval x1 as single, byval x2 as single, byval y as single, byval diff as single, byval flags as long, byval text as const ALLEGRO_USTR ptr)
80 declare sub al_draw_textf(byval font as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval x as single, byval y as single, byval flags as long, byval format as const zstring ptr, ...)
81 declare sub al_draw_justified_textf(byval font as const ALLEGRO_FONT ptr, byval color as ALLEGRO_COLOR, byval x1 as single, byval x2 as single, byval y as single, byval diff as single, byval flags as long, byval format as const zstring ptr, ...)
82 declare function al_get_text_width(byval f as const ALLEGRO_FONT ptr, byval str as const zstring ptr) as long
83 declare function al_get_ustr_width(byval f as const ALLEGRO_FONT ptr, byval ustr as const ALLEGRO_USTR ptr) as long
84 declare function al_get_font_line_height(byval f as const ALLEGRO_FONT ptr) as long
85 declare function al_get_font_ascent(byval f as const ALLEGRO_FONT ptr) as long
86 declare function al_get_font_descent(byval f as const ALLEGRO_FONT ptr) as long
87 declare sub al_destroy_font(byval f as ALLEGRO_FONT ptr)
88 declare sub al_get_ustr_dimensions(byval f as const ALLEGRO_FONT ptr, byval text as const ALLEGRO_USTR ptr, byval bbx as long ptr, byval bby as long ptr, byval bbw as long ptr, byval bbh as long ptr)
89 declare sub al_get_text_dimensions(byval f as const ALLEGRO_FONT ptr, byval text as const zstring ptr, byval bbx as long ptr, byval bby as long ptr, byval bbw as long ptr, byval bbh as long ptr)
90 declare sub al_init_font_addon()
91 declare sub al_shutdown_font_addon()
92 declare function al_get_allegro_font_version() as ulong
93
94 end extern