A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.
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" 32 #elseif defined(__FB_WIN32__) and defined(ALLEGRO_STATICLINK) 33 #inclib "allegro-5.0.10-static-md" 34 #else 35 #inclib "allegro-5.0.10-md" 36 #endif 37 38 #include once "crt/errno.bi" 39 #include once "crt/limits.bi" 40 #include once "crt/stdarg.bi" 41 #include once "crt/stddef.bi" 42 #include once "crt/stdlib.bi" 43 #include once "crt/time.bi" 44 #include once "crt/string.bi" 45 #include once "crt/sys/types.bi" 46 47 '' The following symbols have been renamed: 48 '' #define EOF => EOF_ 49 50 extern "C" 51 52 #define __al_included_allegro5_allegro_h 53 #define __al_included_allegro5_base_h 54 55 #if defined(__FB_WIN32__) and (not defined(ALLEGRO_STATICLINK)) 56 #define _AL_DLL import 57 #else 58 #define _AL_DLL 59 #endif 60 61 #ifdef __FB_UNIX__ 62 const ALLEGRO_UNIX = 1 63 #else 64 const ALLEGRO_MINGW32 = 1 65 #endif 66 67 const ALLEGRO_HAVE_DIRENT_H = 1 68 const ALLEGRO_HAVE_INTTYPES_H = 1 69 70 #ifdef __FB_LINUX__ 71 const ALLEGRO_HAVE_LINUX_AWE_VOICE_H = 1 72 const ALLEGRO_HAVE_LINUX_INPUT_H = 1 73 const ALLEGRO_HAVE_LINUX_JOYSTICK_H = 1 74 const ALLEGRO_HAVE_LINUX_SOUNDCARD_H = 1 75 #endif 76 77 #ifdef __FB_UNIX__ 78 const ALLEGRO_HAVE_SOUNDCARD_H = 1 79 #endif 80 81 const ALLEGRO_HAVE_STDBOOL_H = 1 82 const ALLEGRO_HAVE_STDINT_H = 1 83 84 #ifdef __FB_UNIX__ 85 const ALLEGRO_HAVE_SV_PROCFS_H = 1 86 #endif 87 88 const ALLEGRO_HAVE_SYS_IO_H = 1 89 90 #ifdef __FB_UNIX__ 91 const ALLEGRO_HAVE_SYS_SOUNDCARD_H = 1 92 #endif 93 94 const ALLEGRO_HAVE_SYS_STAT_H = 1 95 const ALLEGRO_HAVE_SYS_TIME_H = 1 96 const ALLEGRO_HAVE_TIME_H = 1 97 98 #ifdef __FB_UNIX__ 99 const ALLEGRO_HAVE_SYS_UTSNAME_H = 1 100 #endif 101 102 const ALLEGRO_HAVE_SYS_TYPES_H = 1 103 104 #ifdef __FB_UNIX__ 105 const ALLEGRO_HAVE_OSATOMIC_H = 1 106 const ALLEGRO_HAVE_SYS_INOTIFY_H = 1 107 const ALLEGRO_HAVE_SYS_TIMERFD_H = 1 108 #endif 109 110 const ALLEGRO_HAVE_GETEXECNAME = 1 111 const ALLEGRO_HAVE_MKSTEMP = 1 112 113 #ifdef __FB_UNIX__ 114 const ALLEGRO_HAVE_MMAP = 1 115 const ALLEGRO_HAVE_MPROTECT = 1 116 const ALLEGRO_HAVE_SCHED_YIELD = 1 117 const ALLEGRO_HAVE_SYSCONF = 1 118 #endif 119 120 const ALLEGRO_HAVE_FSEEKO = 1 121 const ALLEGRO_HAVE_FTELLO = 1 122 const ALLEGRO_HAVE_VA_COPY = 1 123 const ALLEGRO_LITTLE_ENDIAN = 1 124 125 #ifdef __FB_UNIX__ 126 const ALLEGRO_WITH_XWINDOWS = 1 127 const ALLEGRO_XWINDOWS_WITH_XCURSOR = 1 128 const ALLEGRO_XWINDOWS_WITH_XF86VIDMODE = 1 129 const ALLEGRO_XWINDOWS_WITH_XINERAMA = 1 130 const ALLEGRO_XWINDOWS_WITH_XRANDR = 1 131 const ALLEGRO_XWINDOWS_WITH_XIM = 1 132 #endif 133 134 #ifdef __FB_LINUX__ 135 const ALLEGRO_LINUX = 1 136 #endif 137 138 #ifdef __FB_UNIX__ 139 #define ALLEGRO_PLATFORM_STR "Unix" 140 #elseif defined(__FB_WIN32__) and defined(ALLEGRO_STATICLINK) 141 #define ALLEGRO_PLATFORM_STR "MinGW32.s" 142 #else 143 #define ALLEGRO_PLATFORM_STR "MinGW32" 144 #endif 145 146 #ifdef __FB_WIN32__ 147 #define ALLEGRO_WINDOWS 148 #define ALLEGRO_I386 149 #endif 150 151 #define __al_included_allegro5_astdint_h 152 #define __al_included_allegro5_astdbool_h 153 #define ALLEGRO_GCC 154 155 #if (not defined(__FB_64BIT__)) and (defined(__FB_DARWIN__) or defined(__FB_CYGWIN__) or ((not defined(__FB_ARM__)) and (defined(__FB_LINUX__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__))) or defined(__FB_WIN32__)) 156 #define ALLEGRO_I386 157 #elseif defined(__FB_64BIT__) and (defined(__FB_DARWIN__) or defined(__FB_CYGWIN__) or ((not defined(__FB_ARM__)) and (defined(__FB_LINUX__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__))) or defined(__FB_WIN32__)) 158 #define ALLEGRO_AMD64 159 #elseif (not defined(__FB_64BIT__)) and defined(__FB_ARM__) and (defined(__FB_LINUX__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__)) 160 #define ALLEGRO_ARM 161 #endif 162 163 #define READ3BYTES(p) (((*cptr(ubyte ptr, (p))) or ((*(cptr(ubyte ptr, (p)) + 1)) shl 8)) or ((*(cptr(ubyte ptr, (p)) + 2)) shl 16)) 164 #macro WRITE3BYTES(p, c) 165 scope 166 (*cptr(ubyte ptr, (p))) = (c) 167 (*(cptr(ubyte ptr, (p)) + 1)) = (c) shr 8 168 (*(cptr(ubyte ptr, (p)) + 2)) = (c) shr 16 169 end scope 170 #endmacro 171 #define bmp_write16(addr, c) scope : (*cptr(ushort ptr, (addr))) = (c) : end scope 172 #define bmp_write32(addr, c) scope : (*cptr(ulong ptr, (addr))) = (c) : end scope 173 #define bmp_read16(addr) (*cptr(ushort ptr, (addr))) 174 #define bmp_read32(addr) (*cptr(ulong ptr, (addr))) 175 #define AL_RAND() rand() 176 const ALLEGRO_VERSION = 5 177 const ALLEGRO_SUB_VERSION = 0 178 const ALLEGRO_WIP_VERSION = 11 179 const ALLEGRO_RELEASE_NUMBER = 1 180 #define ALLEGRO_VERSION_STR "5.0.11" 181 #define ALLEGRO_DATE_STR "2015" 182 const ALLEGRO_DATE = 20150111 183 const ALLEGRO_VERSION_INT = (((ALLEGRO_VERSION shl 24) or (ALLEGRO_SUB_VERSION shl 16)) or (ALLEGRO_WIP_VERSION shl 8)) or ALLEGRO_RELEASE_NUMBER 184 declare function al_get_allegro_version() as ulong 185 declare function al_run_main(byval argc as long, byval argv as zstring ptr ptr, byval as function(byval as long, byval as zstring ptr ptr) as long) as long 186 const ALLEGRO_PI = 3.14159265358979323846 187 #define AL_ID(a, b, c, d) (((((a) shl 24) or ((b) shl 16)) or ((c) shl 8)) or (d)) 188 #define __al_included_allegro5_altime_h 189 190 type ALLEGRO_TIMEOUT 191 __pad1__ as ulongint 192 __pad2__ as ulongint 193 end type 194 195 declare function al_get_time() as double 196 declare sub al_rest(byval seconds as double) 197 declare sub al_init_timeout(byval timeout as ALLEGRO_TIMEOUT ptr, byval seconds as double) 198 #define __al_included_allegro5_bitmap_h 199 #define __al_included_allegro5_color_h 200 201 type ALLEGRO_COLOR 202 r as single 203 g as single 204 b as single 205 a as single 206 end type 207 208 type ALLEGRO_PIXEL_FORMAT as long 209 enum 210 ALLEGRO_PIXEL_FORMAT_ANY = 0 211 ALLEGRO_PIXEL_FORMAT_ANY_NO_ALPHA 212 ALLEGRO_PIXEL_FORMAT_ANY_WITH_ALPHA 213 ALLEGRO_PIXEL_FORMAT_ANY_15_NO_ALPHA 214 ALLEGRO_PIXEL_FORMAT_ANY_16_NO_ALPHA 215 ALLEGRO_PIXEL_FORMAT_ANY_16_WITH_ALPHA 216 ALLEGRO_PIXEL_FORMAT_ANY_24_NO_ALPHA 217 ALLEGRO_PIXEL_FORMAT_ANY_32_NO_ALPHA 218 ALLEGRO_PIXEL_FORMAT_ANY_32_WITH_ALPHA 219 ALLEGRO_PIXEL_FORMAT_ARGB_8888 220 ALLEGRO_PIXEL_FORMAT_RGBA_8888 221 ALLEGRO_PIXEL_FORMAT_ARGB_4444 222 ALLEGRO_PIXEL_FORMAT_RGB_888 223 ALLEGRO_PIXEL_FORMAT_RGB_565 224 ALLEGRO_PIXEL_FORMAT_RGB_555 225 ALLEGRO_PIXEL_FORMAT_RGBA_5551 226 ALLEGRO_PIXEL_FORMAT_ARGB_1555 227 ALLEGRO_PIXEL_FORMAT_ABGR_8888 228 ALLEGRO_PIXEL_FORMAT_XBGR_8888 229 ALLEGRO_PIXEL_FORMAT_BGR_888 230 ALLEGRO_PIXEL_FORMAT_BGR_565 231 ALLEGRO_PIXEL_FORMAT_BGR_555 232 ALLEGRO_PIXEL_FORMAT_RGBX_8888 233 ALLEGRO_PIXEL_FORMAT_XRGB_8888 234 ALLEGRO_PIXEL_FORMAT_ABGR_F32 235 ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE 236 ALLEGRO_PIXEL_FORMAT_RGBA_4444 237 ALLEGRO_NUM_PIXEL_FORMATS 238 end enum 239 240 declare function al_map_rgb(byval r as ubyte, byval g as ubyte, byval b as ubyte) as ALLEGRO_COLOR 241 declare function al_map_rgba(byval r as ubyte, byval g as ubyte, byval b as ubyte, byval a as ubyte) as ALLEGRO_COLOR 242 declare function al_map_rgb_f(byval r as single, byval g as single, byval b as single) as ALLEGRO_COLOR 243 declare function al_map_rgba_f(byval r as single, byval g as single, byval b as single, byval a as single) as ALLEGRO_COLOR 244 declare sub al_unmap_rgb(byval color as ALLEGRO_COLOR, byval r as ubyte ptr, byval g as ubyte ptr, byval b as ubyte ptr) 245 declare sub al_unmap_rgba(byval color as ALLEGRO_COLOR, byval r as ubyte ptr, byval g as ubyte ptr, byval b as ubyte ptr, byval a as ubyte ptr) 246 declare sub al_unmap_rgb_f(byval color as ALLEGRO_COLOR, byval r as single ptr, byval g as single ptr, byval b as single ptr) 247 declare sub al_unmap_rgba_f(byval color as ALLEGRO_COLOR, byval r as single ptr, byval g as single ptr, byval b as single ptr, byval a as single ptr) 248 declare function al_get_pixel_size(byval format as long) as long 249 declare function al_get_pixel_format_bits(byval format as long) as long 250 251 enum 252 ALLEGRO_MEMORY_BITMAP = &h0001 253 ALLEGRO_KEEP_BITMAP_FORMAT = &h0002 254 ALLEGRO_FORCE_LOCKING = &h0004 255 ALLEGRO_NO_PRESERVE_TEXTURE = &h0008 256 ALLEGRO_ALPHA_TEST = &h0010 257 _ALLEGRO_INTERNAL_OPENGL = &h0020 258 ALLEGRO_MIN_LINEAR = &h0040 259 ALLEGRO_MAG_LINEAR = &h0080 260 ALLEGRO_MIPMAP = &h0100 261 ALLEGRO_NO_PREMULTIPLIED_ALPHA = &h0200 262 ALLEGRO_VIDEO_BITMAP = &h0400 263 end enum 264 265 declare sub al_set_new_bitmap_format(byval format as long) 266 declare sub al_set_new_bitmap_flags(byval flags as long) 267 declare function al_get_new_bitmap_format() as long 268 declare function al_get_new_bitmap_flags() as long 269 declare sub al_add_new_bitmap_flag(byval flag as long) 270 type ALLEGRO_BITMAP as ALLEGRO_BITMAP_ 271 declare function al_get_bitmap_width(byval bitmap as ALLEGRO_BITMAP ptr) as long 272 declare function al_get_bitmap_height(byval bitmap as ALLEGRO_BITMAP ptr) as long 273 declare function al_get_bitmap_format(byval bitmap as ALLEGRO_BITMAP ptr) as long 274 declare function al_get_bitmap_flags(byval bitmap as ALLEGRO_BITMAP ptr) as long 275 declare function al_create_bitmap(byval w as long, byval h as long) as ALLEGRO_BITMAP ptr 276 declare sub al_destroy_bitmap(byval bitmap as ALLEGRO_BITMAP ptr) 277 declare sub al_put_pixel(byval x as long, byval y as long, byval color as ALLEGRO_COLOR) 278 declare sub al_put_blended_pixel(byval x as long, byval y as long, byval color as ALLEGRO_COLOR) 279 declare function al_get_pixel(byval bitmap as ALLEGRO_BITMAP ptr, byval x as long, byval y as long) as ALLEGRO_COLOR 280 declare sub al_convert_mask_to_alpha(byval bitmap as ALLEGRO_BITMAP ptr, byval mask_color as ALLEGRO_COLOR) 281 declare sub al_set_clipping_rectangle(byval x as long, byval y as long, byval width as long, byval height as long) 282 declare sub al_reset_clipping_rectangle() 283 declare sub al_get_clipping_rectangle(byval x as long ptr, byval y as long ptr, byval w as long ptr, byval h as long ptr) 284 declare function al_create_sub_bitmap(byval parent as ALLEGRO_BITMAP ptr, byval x as long, byval y as long, byval w as long, byval h as long) as ALLEGRO_BITMAP ptr 285 declare function al_is_sub_bitmap(byval bitmap as ALLEGRO_BITMAP ptr) as byte 286 declare function al_get_parent_bitmap(byval bitmap as ALLEGRO_BITMAP ptr) as ALLEGRO_BITMAP ptr 287 declare function al_clone_bitmap(byval bitmap as ALLEGRO_BITMAP ptr) as ALLEGRO_BITMAP ptr 288 #define __al_included_allegro5_bitmap_draw_h 289 290 enum 291 ALLEGRO_FLIP_HORIZONTAL = &h00001 292 ALLEGRO_FLIP_VERTICAL = &h00002 293 end enum 294 295 declare sub al_draw_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval dx as single, byval dy as single, byval flags as long) 296 declare sub al_draw_bitmap_region(byval bitmap as ALLEGRO_BITMAP ptr, byval sx as single, byval sy as single, byval sw as single, byval sh as single, byval dx as single, byval dy as single, byval flags as long) 297 declare sub al_draw_scaled_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval sx as single, byval sy as single, byval sw as single, byval sh as single, byval dx as single, byval dy as single, byval dw as single, byval dh as single, byval flags as long) 298 declare sub al_draw_rotated_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval cx as single, byval cy as single, byval dx as single, byval dy as single, byval angle as single, byval flags as long) 299 declare sub al_draw_scaled_rotated_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval cx as single, byval cy as single, byval dx as single, byval dy as single, byval xscale as single, byval yscale as single, byval angle as single, byval flags as long) 300 declare sub al_draw_tinted_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval tint as ALLEGRO_COLOR, byval dx as single, byval dy as single, byval flags as long) 301 declare sub al_draw_tinted_bitmap_region(byval bitmap as ALLEGRO_BITMAP ptr, byval tint as ALLEGRO_COLOR, byval sx as single, byval sy as single, byval sw as single, byval sh as single, byval dx as single, byval dy as single, byval flags as long) 302 declare sub al_draw_tinted_scaled_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval tint as ALLEGRO_COLOR, byval sx as single, byval sy as single, byval sw as single, byval sh as single, byval dx as single, byval dy as single, byval dw as single, byval dh as single, byval flags as long) 303 declare sub al_draw_tinted_rotated_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval tint as ALLEGRO_COLOR, byval cx as single, byval cy as single, byval dx as single, byval dy as single, byval angle as single, byval flags as long) 304 declare sub al_draw_tinted_scaled_rotated_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval tint as ALLEGRO_COLOR, byval cx as single, byval cy as single, byval dx as single, byval dy as single, byval xscale as single, byval yscale as single, byval angle as single, byval flags as long) 305 declare sub al_draw_tinted_scaled_rotated_bitmap_region(byval bitmap as ALLEGRO_BITMAP ptr, byval sx as single, byval sy as single, byval sw as single, byval sh as single, byval tint as ALLEGRO_COLOR, byval cx as single, byval cy as single, byval dx as single, byval dy as single, byval xscale as single, byval yscale as single, byval angle as single, byval flags as long) 306 307 #define __al_included_allegro5_bitmap_io_h 308 #define __al_included_allegro5_file_h 309 #define __al_included_allegro5_path_h 310 311 #ifdef __FB_UNIX__ 312 #define ALLEGRO_NATIVE_PATH_SEP asc("/") 313 #define ALLEGRO_NATIVE_DRIVE_SEP asc(!"\0") 314 #else 315 #define ALLEGRO_NATIVE_PATH_SEP asc(!"\\") 316 #define ALLEGRO_NATIVE_DRIVE_SEP asc(":") 317 #endif 318 319 type ALLEGRO_PATH as ALLEGRO_PATH_ 320 declare function al_create_path(byval str as const zstring ptr) as ALLEGRO_PATH ptr 321 declare function al_create_path_for_directory(byval str as const zstring ptr) as ALLEGRO_PATH ptr 322 declare function al_clone_path(byval path as const ALLEGRO_PATH ptr) as ALLEGRO_PATH ptr 323 declare function al_get_path_num_components(byval path as const ALLEGRO_PATH ptr) as long 324 declare function al_get_path_component(byval path as const ALLEGRO_PATH ptr, byval i as long) as const zstring ptr 325 declare sub al_replace_path_component(byval path as ALLEGRO_PATH ptr, byval i as long, byval s as const zstring ptr) 326 declare sub al_remove_path_component(byval path as ALLEGRO_PATH ptr, byval i as long) 327 declare sub al_insert_path_component(byval path as ALLEGRO_PATH ptr, byval i as long, byval s as const zstring ptr) 328 declare function al_get_path_tail(byval path as const ALLEGRO_PATH ptr) as const zstring ptr 329 declare sub al_drop_path_tail(byval path as ALLEGRO_PATH ptr) 330 declare sub al_append_path_component(byval path as ALLEGRO_PATH ptr, byval s as const zstring ptr) 331 declare function al_join_paths(byval path as ALLEGRO_PATH ptr, byval tail as const ALLEGRO_PATH ptr) as byte 332 declare function al_rebase_path(byval head as const ALLEGRO_PATH ptr, byval tail as ALLEGRO_PATH ptr) as byte 333 declare function al_path_cstr(byval path as const ALLEGRO_PATH ptr, byval delim as byte) as const zstring ptr 334 declare sub al_destroy_path(byval path as ALLEGRO_PATH ptr) 335 declare sub al_set_path_drive(byval path as ALLEGRO_PATH ptr, byval drive as const zstring ptr) 336 declare function al_get_path_drive(byval path as const ALLEGRO_PATH ptr) as const zstring ptr 337 declare sub al_set_path_filename(byval path as ALLEGRO_PATH ptr, byval filename as const zstring ptr) 338 declare function al_get_path_filename(byval path as const ALLEGRO_PATH ptr) as const zstring ptr 339 declare function al_get_path_extension(byval path as const ALLEGRO_PATH ptr) as const zstring ptr 340 declare function al_set_path_extension(byval path as ALLEGRO_PATH ptr, byval extension as const zstring ptr) as byte 341 declare function al_get_path_basename(byval path as const ALLEGRO_PATH ptr) as const zstring ptr 342 declare function al_make_path_canonical(byval path as ALLEGRO_PATH ptr) as byte 343 #define __al_included_allegro5_utf8_h 344 type ALLEGRO_USTR as _al_tagbstring 345 type ALLEGRO_USTR_INFO as _al_tagbstring 346 #define __al_tagbstring_defined 347 348 type _al_tagbstring 349 mlen as long 350 slen as long 351 data as ubyte ptr 352 end type 353 354 declare function al_ustr_new(byval s as const zstring ptr) as ALLEGRO_USTR ptr 355 declare function al_ustr_new_from_buffer(byval s as const zstring ptr, byval size as uinteger) as ALLEGRO_USTR ptr 356 declare function al_ustr_newf(byval fmt as const zstring ptr, ...) as ALLEGRO_USTR ptr 357 declare sub al_ustr_free(byval us as ALLEGRO_USTR ptr) 358 declare function al_cstr(byval us as const ALLEGRO_USTR ptr) as const zstring ptr 359 declare sub al_ustr_to_buffer(byval us as const ALLEGRO_USTR ptr, byval buffer as zstring ptr, byval size as long) 360 declare function al_cstr_dup(byval us as const ALLEGRO_USTR ptr) as zstring ptr 361 declare function al_ustr_dup(byval us as const ALLEGRO_USTR ptr) as ALLEGRO_USTR ptr 362 declare function al_ustr_dup_substr(byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval end_pos as long) as ALLEGRO_USTR ptr 363 declare function al_ustr_empty_string() as const ALLEGRO_USTR ptr 364 declare function al_ref_cstr(byval info as ALLEGRO_USTR_INFO ptr, byval s as const zstring ptr) as const ALLEGRO_USTR ptr 365 declare function al_ref_buffer(byval info as ALLEGRO_USTR_INFO ptr, byval s as const zstring ptr, byval size as uinteger) as const ALLEGRO_USTR ptr 366 declare function al_ref_ustr(byval info as ALLEGRO_USTR_INFO ptr, byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval end_pos as long) as const ALLEGRO_USTR ptr 367 declare function al_ustr_size(byval us as const ALLEGRO_USTR ptr) as uinteger 368 declare function al_ustr_length(byval us as const ALLEGRO_USTR ptr) as uinteger 369 declare function al_ustr_offset(byval us as const ALLEGRO_USTR ptr, byval index as long) as long 370 declare function al_ustr_next(byval us as const ALLEGRO_USTR ptr, byval pos as long ptr) as byte 371 declare function al_ustr_prev(byval us as const ALLEGRO_USTR ptr, byval pos as long ptr) as byte 372 declare function al_ustr_get(byval us as const ALLEGRO_USTR ptr, byval pos as long) as long 373 declare function al_ustr_get_next(byval us as const ALLEGRO_USTR ptr, byval pos as long ptr) as long 374 declare function al_ustr_prev_get(byval us as const ALLEGRO_USTR ptr, byval pos as long ptr) as long 375 declare function al_ustr_insert(byval us1 as ALLEGRO_USTR ptr, byval pos as long, byval us2 as const ALLEGRO_USTR ptr) as byte 376 declare function al_ustr_insert_cstr(byval us as ALLEGRO_USTR ptr, byval pos as long, byval us2 as const zstring ptr) as byte 377 declare function al_ustr_insert_chr(byval us as ALLEGRO_USTR ptr, byval pos as long, byval c as long) as uinteger 378 declare function al_ustr_append(byval us1 as ALLEGRO_USTR ptr, byval us2 as const ALLEGRO_USTR ptr) as byte 379 declare function al_ustr_append_cstr(byval us as ALLEGRO_USTR ptr, byval s as const zstring ptr) as byte 380 declare function al_ustr_append_chr(byval us as ALLEGRO_USTR ptr, byval c as long) as uinteger 381 declare function al_ustr_appendf(byval us as ALLEGRO_USTR ptr, byval fmt as const zstring ptr, ...) as byte 382 declare function al_ustr_vappendf(byval us as ALLEGRO_USTR ptr, byval fmt as const zstring ptr, byval ap as va_list) as byte 383 declare function al_ustr_remove_chr(byval us as ALLEGRO_USTR ptr, byval pos as long) as byte 384 declare function al_ustr_remove_range(byval us as ALLEGRO_USTR ptr, byval start_pos as long, byval end_pos as long) as byte 385 declare function al_ustr_truncate(byval us as ALLEGRO_USTR ptr, byval start_pos as long) as byte 386 declare function al_ustr_ltrim_ws(byval us as ALLEGRO_USTR ptr) as byte 387 declare function al_ustr_rtrim_ws(byval us as ALLEGRO_USTR ptr) as byte 388 declare function al_ustr_trim_ws(byval us as ALLEGRO_USTR ptr) as byte 389 declare function al_ustr_assign(byval us1 as ALLEGRO_USTR ptr, byval us2 as const ALLEGRO_USTR ptr) as byte 390 declare function al_ustr_assign_substr(byval us1 as ALLEGRO_USTR ptr, byval us2 as const ALLEGRO_USTR ptr, byval start_pos as long, byval end_pos as long) as byte 391 declare function al_ustr_assign_cstr(byval us1 as ALLEGRO_USTR ptr, byval s as const zstring ptr) as byte 392 declare function al_ustr_set_chr(byval us as ALLEGRO_USTR ptr, byval pos as long, byval c as long) as uinteger 393 declare function al_ustr_replace_range(byval us1 as ALLEGRO_USTR ptr, byval start_pos1 as long, byval end_pos1 as long, byval us2 as const ALLEGRO_USTR ptr) as byte 394 declare function al_ustr_find_chr(byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval c as long) as long 395 declare function al_ustr_rfind_chr(byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval c as long) as long 396 declare function al_ustr_find_set(byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval accept as const ALLEGRO_USTR ptr) as long 397 declare function al_ustr_find_set_cstr(byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval accept as const zstring ptr) as long 398 declare function al_ustr_find_cset(byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval reject as const ALLEGRO_USTR ptr) as long 399 declare function al_ustr_find_cset_cstr(byval us as const ALLEGRO_USTR ptr, byval start_pos as long, byval reject as const zstring ptr) as long 400 declare function al_ustr_find_str(byval haystack as const ALLEGRO_USTR ptr, byval start_pos as long, byval needle as const ALLEGRO_USTR ptr) as long 401 declare function al_ustr_find_cstr(byval haystack as const ALLEGRO_USTR ptr, byval start_pos as long, byval needle as const zstring ptr) as long 402 declare function al_ustr_rfind_str(byval haystack as const ALLEGRO_USTR ptr, byval start_pos as long, byval needle as const ALLEGRO_USTR ptr) as long 403 declare function al_ustr_rfind_cstr(byval haystack as const ALLEGRO_USTR ptr, byval start_pos as long, byval needle as const zstring ptr) as long 404 declare function al_ustr_find_replace(byval us as ALLEGRO_USTR ptr, byval start_pos as long, byval find as const ALLEGRO_USTR ptr, byval replace as const ALLEGRO_USTR ptr) as byte 405 declare function al_ustr_find_replace_cstr(byval us as ALLEGRO_USTR ptr, byval start_pos as long, byval find as const zstring ptr, byval replace as const zstring ptr) as byte 406 declare function al_ustr_equal(byval us1 as const ALLEGRO_USTR ptr, byval us2 as const ALLEGRO_USTR ptr) as byte 407 declare function al_ustr_compare(byval u as const ALLEGRO_USTR ptr, byval v as const ALLEGRO_USTR ptr) as long 408 declare function al_ustr_ncompare(byval us1 as const ALLEGRO_USTR ptr, byval us2 as const ALLEGRO_USTR ptr, byval n as long) as long 409 declare function al_ustr_has_prefix(byval u as const ALLEGRO_USTR ptr, byval v as const ALLEGRO_USTR ptr) as byte 410 declare function al_ustr_has_prefix_cstr(byval u as const ALLEGRO_USTR ptr, byval s as const zstring ptr) as byte 411 declare function al_ustr_has_suffix(byval u as const ALLEGRO_USTR ptr, byval v as const ALLEGRO_USTR ptr) as byte 412 declare function al_ustr_has_suffix_cstr(byval us1 as const ALLEGRO_USTR ptr, byval s as const zstring ptr) as byte 413 declare function al_utf8_width(byval c as long) as uinteger 414 declare function al_utf8_encode(byval s as zstring ptr, byval c as long) as uinteger 415 declare function al_ustr_new_from_utf16(byval s as const ushort ptr) as ALLEGRO_USTR ptr 416 declare function al_ustr_size_utf16(byval us as const ALLEGRO_USTR ptr) as uinteger 417 declare function al_ustr_encode_utf16(byval us as const ALLEGRO_USTR ptr, byval s as ushort ptr, byval n as uinteger) as uinteger 418 declare function al_utf16_width(byval c as long) as uinteger 419 declare function al_utf16_encode(byval s as ushort ptr, byval c as long) as uinteger 420 type ALLEGRO_FILE as ALLEGRO_FILE_ 421 422 type ALLEGRO_FILE_INTERFACE 423 fi_fopen as function(byval path as const zstring ptr, byval mode as const zstring ptr) as any ptr 424 fi_fclose as sub(byval handle as ALLEGRO_FILE ptr) 425 fi_fread as function(byval f as ALLEGRO_FILE ptr, byval ptr as any ptr, byval size as uinteger) as uinteger 426 fi_fwrite as function(byval f as ALLEGRO_FILE ptr, byval ptr as const any ptr, byval size as uinteger) as uinteger 427 fi_fflush as function(byval f as ALLEGRO_FILE ptr) as byte 428 fi_ftell as function(byval f as ALLEGRO_FILE ptr) as longint 429 fi_fseek as function(byval f as ALLEGRO_FILE ptr, byval offset as longint, byval whence as long) as byte 430 fi_feof as function(byval f as ALLEGRO_FILE ptr) as byte 431 fi_ferror as function(byval f as ALLEGRO_FILE ptr) as byte 432 fi_fclearerr as sub(byval f as ALLEGRO_FILE ptr) 433 fi_fungetc as function(byval f as ALLEGRO_FILE ptr, byval c as long) as long 434 fi_fsize as function(byval f as ALLEGRO_FILE ptr) as off_t 435 end type 436 437 type ALLEGRO_SEEK as long 438 enum 439 ALLEGRO_SEEK_SET = 0 440 ALLEGRO_SEEK_CUR 441 ALLEGRO_SEEK_END 442 end enum 443 444 declare function al_fopen(byval path as const zstring ptr, byval mode as const zstring ptr) as ALLEGRO_FILE ptr 445 declare function al_fopen_interface(byval vt as const ALLEGRO_FILE_INTERFACE ptr, byval path as const zstring ptr, byval mode as const zstring ptr) as ALLEGRO_FILE ptr 446 declare function al_create_file_handle(byval vt as const ALLEGRO_FILE_INTERFACE ptr, byval userdata as any ptr) as ALLEGRO_FILE ptr 447 declare sub al_fclose(byval f as ALLEGRO_FILE ptr) 448 declare function al_fread(byval f as ALLEGRO_FILE ptr, byval ptr as any ptr, byval size as uinteger) as uinteger 449 declare function al_fwrite(byval f as ALLEGRO_FILE ptr, byval ptr as const any ptr, byval size as uinteger) as uinteger 450 declare function al_fflush(byval f as ALLEGRO_FILE ptr) as byte 451 declare function al_ftell(byval f as ALLEGRO_FILE ptr) as longint 452 declare function al_fseek(byval f as ALLEGRO_FILE ptr, byval offset as longint, byval whence as long) as byte 453 declare function al_feof(byval f as ALLEGRO_FILE ptr) as byte 454 declare function al_ferror(byval f as ALLEGRO_FILE ptr) as byte 455 declare sub al_fclearerr(byval f as ALLEGRO_FILE ptr) 456 declare function al_fungetc(byval f as ALLEGRO_FILE ptr, byval c as long) as long 457 declare function al_fsize(byval f as ALLEGRO_FILE ptr) as longint 458 declare function al_fgetc(byval f as ALLEGRO_FILE ptr) as long 459 declare function al_fputc(byval f as ALLEGRO_FILE ptr, byval c as long) as long 460 declare function al_fread16le(byval f as ALLEGRO_FILE ptr) as short 461 declare function al_fread16be(byval f as ALLEGRO_FILE ptr) as short 462 declare function al_fwrite16le(byval f as ALLEGRO_FILE ptr, byval w as short) as uinteger 463 declare function al_fwrite16be(byval f as ALLEGRO_FILE ptr, byval w as short) as uinteger 464 declare function al_fread32le(byval f as ALLEGRO_FILE ptr) as long 465 declare function al_fread32be(byval f as ALLEGRO_FILE ptr) as long 466 declare function al_fwrite32le(byval f as ALLEGRO_FILE ptr, byval l as long) as uinteger 467 declare function al_fwrite32be(byval f as ALLEGRO_FILE ptr, byval l as long) as uinteger 468 declare function al_fgets(byval f as ALLEGRO_FILE ptr, byval p as zstring const ptr, byval max as uinteger) as zstring ptr 469 declare function al_fget_ustr(byval f as ALLEGRO_FILE ptr) as ALLEGRO_USTR ptr 470 declare function al_fputs(byval f as ALLEGRO_FILE ptr, byval p as const zstring ptr) as long 471 declare function al_fopen_fd(byval fd as long, byval mode as const zstring ptr) as ALLEGRO_FILE ptr 472 declare function al_make_temp_file(byval tmpl as const zstring ptr, byval ret_path as ALLEGRO_PATH ptr ptr) as ALLEGRO_FILE ptr 473 declare function al_fopen_slice(byval fp as ALLEGRO_FILE ptr, byval initial_size as uinteger, byval mode as const zstring ptr) as ALLEGRO_FILE ptr 474 declare function al_get_new_file_interface() as const ALLEGRO_FILE_INTERFACE ptr 475 declare sub al_set_new_file_interface(byval file_interface as const ALLEGRO_FILE_INTERFACE ptr) 476 declare sub al_set_standard_file_interface() 477 declare function al_get_file_userdata(byval f as ALLEGRO_FILE ptr) as any ptr 478 479 type ALLEGRO_IIO_LOADER_FUNCTION as function(byval filename as const zstring ptr) as ALLEGRO_BITMAP ptr 480 type ALLEGRO_IIO_FS_LOADER_FUNCTION as function(byval fp as ALLEGRO_FILE ptr) as ALLEGRO_BITMAP ptr 481 type ALLEGRO_IIO_SAVER_FUNCTION as function(byval filename as const zstring ptr, byval bitmap as ALLEGRO_BITMAP ptr) as byte 482 type ALLEGRO_IIO_FS_SAVER_FUNCTION as function(byval fp as ALLEGRO_FILE ptr, byval bitmap as ALLEGRO_BITMAP ptr) as byte 483 484 declare function al_register_bitmap_loader(byval ext as const zstring ptr, byval loader as ALLEGRO_IIO_LOADER_FUNCTION) as byte 485 declare function al_register_bitmap_saver(byval ext as const zstring ptr, byval saver as ALLEGRO_IIO_SAVER_FUNCTION) as byte 486 declare function al_register_bitmap_loader_f(byval ext as const zstring ptr, byval fs_loader as ALLEGRO_IIO_FS_LOADER_FUNCTION) as byte 487 declare function al_register_bitmap_saver_f(byval ext as const zstring ptr, byval fs_saver as ALLEGRO_IIO_FS_SAVER_FUNCTION) as byte 488 declare function al_load_bitmap(byval filename as const zstring ptr) as ALLEGRO_BITMAP ptr 489 declare function al_load_bitmap_f(byval fp as ALLEGRO_FILE ptr, byval ident as const zstring ptr) as ALLEGRO_BITMAP ptr 490 declare function al_save_bitmap(byval filename as const zstring ptr, byval bitmap as ALLEGRO_BITMAP ptr) as byte 491 declare function al_save_bitmap_f(byval fp as ALLEGRO_FILE ptr, byval ident as const zstring ptr, byval bitmap as ALLEGRO_BITMAP ptr) as byte 492 #define __al_included_allegro5_bitmap_lock_h 493 494 enum 495 ALLEGRO_LOCK_READWRITE = 0 496 ALLEGRO_LOCK_READONLY = 1 497 ALLEGRO_LOCK_WRITEONLY = 2 498 end enum 499 500 type ALLEGRO_LOCKED_REGION 501 data as any ptr 502 format as long 503 pitch as long 504 pixel_size as long 505 end type 506 507 declare function al_lock_bitmap(byval bitmap as ALLEGRO_BITMAP ptr, byval format as long, byval flags as long) as ALLEGRO_LOCKED_REGION ptr 508 declare function al_lock_bitmap_region(byval bitmap as ALLEGRO_BITMAP ptr, byval x as long, byval y as long, byval width as long, byval height as long, byval format as long, byval flags as long) as ALLEGRO_LOCKED_REGION ptr 509 declare sub al_unlock_bitmap(byval bitmap as ALLEGRO_BITMAP ptr) 510 declare function al_is_bitmap_locked(byval bitmap as ALLEGRO_BITMAP ptr) as byte 511 #define __al_included_allegro5_blender_h 512 513 type ALLEGRO_BLEND_MODE as long 514 enum 515 ALLEGRO_ZERO = 0 516 ALLEGRO_ONE = 1 517 ALLEGRO_ALPHA = 2 518 ALLEGRO_INVERSE_ALPHA = 3 519 ALLEGRO_SRC_COLOR = 4 520 ALLEGRO_DEST_COLOR = 5 521 ALLEGRO_INVERSE_SRC_COLOR = 6 522 ALLEGRO_INVERSE_DEST_COLOR = 7 523 ALLEGRO_NUM_BLEND_MODES 524 end enum 525 526 type ALLEGRO_BLEND_OPERATIONS as long 527 enum 528 ALLEGRO_ADD = 0 529 ALLEGRO_SRC_MINUS_DEST = 1 530 ALLEGRO_DEST_MINUS_SRC = 2 531 ALLEGRO_NUM_BLEND_OPERATIONS 532 end enum 533 534 declare sub al_set_blender(byval op as long, byval source as long, byval dest as long) 535 declare sub al_get_blender(byval op as long ptr, byval source as long ptr, byval dest as long ptr) 536 declare sub al_set_separate_blender(byval op as long, byval source as long, byval dest as long, byval alpha_op as long, byval alpha_source as long, byval alpha_dest as long) 537 declare sub al_get_separate_blender(byval op as long ptr, byval source as long ptr, byval dest as long ptr, byval alpha_op as long ptr, byval alpha_src as long ptr, byval alpha_dest as long ptr) 538 #define __al_included_allegro5_config_h 539 type ALLEGRO_CONFIG as ALLEGRO_CONFIG_ 540 declare function al_create_config() as ALLEGRO_CONFIG ptr 541 declare sub al_add_config_section(byval config as ALLEGRO_CONFIG ptr, byval name as const zstring ptr) 542 declare sub al_set_config_value(byval config as ALLEGRO_CONFIG ptr, byval section as const zstring ptr, byval key as const zstring ptr, byval value as const zstring ptr) 543 declare sub al_add_config_comment(byval config as ALLEGRO_CONFIG ptr, byval section as const zstring ptr, byval comment as const zstring ptr) 544 declare function al_get_config_value(byval config as const ALLEGRO_CONFIG ptr, byval section as const zstring ptr, byval key as const zstring ptr) as const zstring ptr 545 declare function al_load_config_file(byval filename as const zstring ptr) as ALLEGRO_CONFIG ptr 546 declare function al_load_config_file_f(byval filename as ALLEGRO_FILE ptr) as ALLEGRO_CONFIG ptr 547 declare function al_save_config_file(byval filename as const zstring ptr, byval config as const ALLEGRO_CONFIG ptr) as byte 548 declare function al_save_config_file_f(byval file as ALLEGRO_FILE ptr, byval config as const ALLEGRO_CONFIG ptr) as byte 549 declare sub al_merge_config_into(byval master as ALLEGRO_CONFIG ptr, byval add as const ALLEGRO_CONFIG ptr) 550 declare function al_merge_config(byval cfg1 as const ALLEGRO_CONFIG ptr, byval cfg2 as const ALLEGRO_CONFIG ptr) as ALLEGRO_CONFIG ptr 551 declare sub al_destroy_config(byval config as ALLEGRO_CONFIG ptr) 552 type ALLEGRO_CONFIG_SECTION as ALLEGRO_CONFIG_SECTION_ 553 declare function al_get_first_config_section(byval config as const ALLEGRO_CONFIG ptr, byval iterator as ALLEGRO_CONFIG_SECTION ptr ptr) as const zstring ptr 554 declare function al_get_next_config_section(byval iterator as ALLEGRO_CONFIG_SECTION ptr ptr) as const zstring ptr 555 type ALLEGRO_CONFIG_ENTRY as ALLEGRO_CONFIG_ENTRY_ 556 declare function al_get_first_config_entry(byval config as const ALLEGRO_CONFIG ptr, byval section as const zstring ptr, byval iterator as ALLEGRO_CONFIG_ENTRY ptr ptr) as const zstring ptr 557 declare function al_get_next_config_entry(byval iterator as ALLEGRO_CONFIG_ENTRY ptr ptr) as const zstring ptr 558 #define __al_included_allegro5_debug_h 559 declare function _al_trace_prefix(byval channel as const zstring ptr, byval level as long, byval file as const zstring ptr, byval line as long, byval function as const zstring ptr) as byte 560 declare sub _al_trace_suffix(byval msg as const zstring ptr, ...) 561 562 #define ALLEGRO_TRACE_CHANNEL_LEVEL(channel, x) iif(1, cast(any, 0), _al_trace_suffix) 563 #define ALLEGRO_DEBUG_CHANNEL(x) 564 #define ALLEGRO_TRACE_LEVEL(x) ALLEGRO_TRACE_CHANNEL_LEVEL(__al_debug_channel, x) 565 #define ALLEGRO_DEBUG ALLEGRO_TRACE_LEVEL(0) 566 #define ALLEGRO_INFO ALLEGRO_TRACE_LEVEL(1) 567 #define ALLEGRO_WARN ALLEGRO_TRACE_LEVEL(2) 568 #define ALLEGRO_ERROR ALLEGRO_TRACE_LEVEL(3) 569 570 extern _AL_DLL _al_user_assert_handler as sub(byval expr as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr) 571 572 declare sub al_register_assert_handler(byval handler as sub(byval expr as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr)) 573 #define __al_included_allegro5_display_h 574 #define __al_included_allegro5_events_h 575 type ALLEGRO_EVENT_TYPE as ulong 576 577 enum 578 ALLEGRO_EVENT_JOYSTICK_AXIS = 1 579 ALLEGRO_EVENT_JOYSTICK_BUTTON_DOWN = 2 580 ALLEGRO_EVENT_JOYSTICK_BUTTON_UP = 3 581 ALLEGRO_EVENT_JOYSTICK_CONFIGURATION = 4 582 ALLEGRO_EVENT_KEY_DOWN = 10 583 ALLEGRO_EVENT_KEY_CHAR = 11 584 ALLEGRO_EVENT_KEY_UP = 12 585 ALLEGRO_EVENT_MOUSE_AXES = 20 586 ALLEGRO_EVENT_MOUSE_BUTTON_DOWN = 21 587 ALLEGRO_EVENT_MOUSE_BUTTON_UP = 22 588 ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY = 23 589 ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY = 24 590 ALLEGRO_EVENT_MOUSE_WARPED = 25 591 ALLEGRO_EVENT_TIMER = 30 592 ALLEGRO_EVENT_DISPLAY_EXPOSE = 40 593 ALLEGRO_EVENT_DISPLAY_RESIZE = 41 594 ALLEGRO_EVENT_DISPLAY_CLOSE = 42 595 ALLEGRO_EVENT_DISPLAY_LOST = 43 596 ALLEGRO_EVENT_DISPLAY_FOUND = 44 597 ALLEGRO_EVENT_DISPLAY_SWITCH_IN = 45 598 ALLEGRO_EVENT_DISPLAY_SWITCH_OUT = 46 599 ALLEGRO_EVENT_DISPLAY_ORIENTATION = 47 600 end enum 601 602 #define ALLEGRO_EVENT_TYPE_IS_USER(t) ((t) >= 512) 603 #define ALLEGRO_GET_EVENT_TYPE(a, b, c, d) AL_ID(a, b, c, d) 604 605 type ALLEGRO_EVENT_SOURCE 606 __pad(0 to 31) as long 607 end type 608 609 type ALLEGRO_ANY_EVENT 610 as ALLEGRO_EVENT_TYPE type 611 source as ALLEGRO_EVENT_SOURCE ptr 612 timestamp as double 613 end type 614 615 type ALLEGRO_DISPLAY as ALLEGRO_DISPLAY_ 616 617 type ALLEGRO_DISPLAY_EVENT 618 as ALLEGRO_EVENT_TYPE type 619 source as ALLEGRO_DISPLAY ptr 620 timestamp as double 621 x as long 622 y as long 623 width as long 624 height as long 625 orientation as long 626 end type 627 628 type ALLEGRO_JOYSTICK as ALLEGRO_JOYSTICK_ 629 630 type ALLEGRO_JOYSTICK_EVENT 631 as ALLEGRO_EVENT_TYPE type 632 source as ALLEGRO_JOYSTICK ptr 633 timestamp as double 634 id as ALLEGRO_JOYSTICK ptr 635 stick as long 636 axis as long 637 pos as single 638 button as long 639 end type 640 641 type ALLEGRO_KEYBOARD as ALLEGRO_KEYBOARD_ 642 643 type ALLEGRO_KEYBOARD_EVENT 644 as ALLEGRO_EVENT_TYPE type 645 source as ALLEGRO_KEYBOARD ptr 646 timestamp as double 647 display as ALLEGRO_DISPLAY ptr 648 keycode as long 649 unichar as long 650 modifiers as ulong 651 repeat as byte 652 end type 653 654 type ALLEGRO_MOUSE as ALLEGRO_MOUSE_ 655 656 type ALLEGRO_MOUSE_EVENT 657 as ALLEGRO_EVENT_TYPE type 658 source as ALLEGRO_MOUSE ptr 659 timestamp as double 660 display as ALLEGRO_DISPLAY ptr 661 x as long 662 y as long 663 z as long 664 w as long 665 dx as long 666 dy as long 667 dz as long 668 dw as long 669 button as ulong 670 pressure as single 671 end type 672 673 type ALLEGRO_TIMER as ALLEGRO_TIMER_ 674 675 type ALLEGRO_TIMER_EVENT 676 as ALLEGRO_EVENT_TYPE type 677 source as ALLEGRO_TIMER ptr 678 timestamp as double 679 count as longint 680 error as double 681 end type 682 683 type ALLEGRO_USER_EVENT_DESCRIPTOR as ALLEGRO_USER_EVENT_DESCRIPTOR_ 684 685 type ALLEGRO_USER_EVENT 686 as ALLEGRO_EVENT_TYPE type 687 source as ALLEGRO_EVENT_SOURCE ptr 688 timestamp as double 689 __internal__descr as ALLEGRO_USER_EVENT_DESCRIPTOR ptr 690 data1 as integer 691 data2 as integer 692 data3 as integer 693 data4 as integer 694 end type 695 696 union ALLEGRO_EVENT 697 as ALLEGRO_EVENT_TYPE type 698 any as ALLEGRO_ANY_EVENT 699 display as ALLEGRO_DISPLAY_EVENT 700 joystick as ALLEGRO_JOYSTICK_EVENT 701 keyboard as ALLEGRO_KEYBOARD_EVENT 702 mouse as ALLEGRO_MOUSE_EVENT 703 timer as ALLEGRO_TIMER_EVENT 704 user as ALLEGRO_USER_EVENT 705 end union 706 707 declare sub al_init_user_event_source(byval as ALLEGRO_EVENT_SOURCE ptr) 708 declare sub al_destroy_user_event_source(byval as ALLEGRO_EVENT_SOURCE ptr) 709 declare function al_emit_user_event(byval as ALLEGRO_EVENT_SOURCE ptr, byval as ALLEGRO_EVENT ptr, byval dtor as sub(byval as ALLEGRO_USER_EVENT ptr)) as byte 710 declare sub al_unref_user_event(byval as ALLEGRO_USER_EVENT ptr) 711 declare sub al_set_event_source_data(byval as ALLEGRO_EVENT_SOURCE ptr, byval data as integer) 712 declare function al_get_event_source_data(byval as const ALLEGRO_EVENT_SOURCE ptr) as integer 713 type ALLEGRO_EVENT_QUEUE as ALLEGRO_EVENT_QUEUE_ 714 declare function al_create_event_queue() as ALLEGRO_EVENT_QUEUE ptr 715 declare sub al_destroy_event_queue(byval as ALLEGRO_EVENT_QUEUE ptr) 716 declare sub al_register_event_source(byval as ALLEGRO_EVENT_QUEUE ptr, byval as ALLEGRO_EVENT_SOURCE ptr) 717 declare sub al_unregister_event_source(byval as ALLEGRO_EVENT_QUEUE ptr, byval as ALLEGRO_EVENT_SOURCE ptr) 718 declare function al_is_event_queue_empty(byval as ALLEGRO_EVENT_QUEUE ptr) as byte 719 declare function al_get_next_event(byval as ALLEGRO_EVENT_QUEUE ptr, byval ret_event as ALLEGRO_EVENT ptr) as byte 720 declare function al_peek_next_event(byval as ALLEGRO_EVENT_QUEUE ptr, byval ret_event as ALLEGRO_EVENT ptr) as byte 721 declare function al_drop_next_event(byval as ALLEGRO_EVENT_QUEUE ptr) as byte 722 declare sub al_flush_event_queue(byval as ALLEGRO_EVENT_QUEUE ptr) 723 declare sub al_wait_for_event(byval as ALLEGRO_EVENT_QUEUE ptr, byval ret_event as ALLEGRO_EVENT ptr) 724 declare function al_wait_for_event_timed(byval as ALLEGRO_EVENT_QUEUE ptr, byval ret_event as ALLEGRO_EVENT ptr, byval secs as single) as byte 725 declare function al_wait_for_event_until(byval queue as ALLEGRO_EVENT_QUEUE ptr, byval ret_event as ALLEGRO_EVENT ptr, byval timeout as ALLEGRO_TIMEOUT ptr) as byte 726 727 enum 728 ALLEGRO_WINDOWED = 1 shl 0 729 ALLEGRO_FULLSCREEN = 1 shl 1 730 ALLEGRO_OPENGL = 1 shl 2 731 ALLEGRO_DIRECT3D_INTERNAL = 1 shl 3 732 ALLEGRO_RESIZABLE = 1 shl 4 733 ALLEGRO_FRAMELESS = 1 shl 5 734 ALLEGRO_NOFRAME = ALLEGRO_FRAMELESS 735 ALLEGRO_GENERATE_EXPOSE_EVENTS = 1 shl 6 736 ALLEGRO_OPENGL_3_0 = 1 shl 7 737 ALLEGRO_OPENGL_FORWARD_COMPATIBLE = 1 shl 8 738 ALLEGRO_FULLSCREEN_WINDOW = 1 shl 9 739 ALLEGRO_MINIMIZED = 1 shl 10 740 end enum 741 742 type ALLEGRO_DISPLAY_OPTIONS as long 743 enum 744 ALLEGRO_RED_SIZE 745 ALLEGRO_GREEN_SIZE 746 ALLEGRO_BLUE_SIZE 747 ALLEGRO_ALPHA_SIZE 748 ALLEGRO_RED_SHIFT 749 ALLEGRO_GREEN_SHIFT 750 ALLEGRO_BLUE_SHIFT 751 ALLEGRO_ALPHA_SHIFT 752 ALLEGRO_ACC_RED_SIZE 753 ALLEGRO_ACC_GREEN_SIZE 754 ALLEGRO_ACC_BLUE_SIZE 755 ALLEGRO_ACC_ALPHA_SIZE 756 ALLEGRO_STEREO 757 ALLEGRO_AUX_BUFFERS 758 ALLEGRO_COLOR_SIZE 759 ALLEGRO_DEPTH_SIZE 760 ALLEGRO_STENCIL_SIZE 761 ALLEGRO_SAMPLE_BUFFERS 762 ALLEGRO_SAMPLES 763 ALLEGRO_RENDER_METHOD 764 ALLEGRO_FLOAT_COLOR 765 ALLEGRO_FLOAT_DEPTH 766 ALLEGRO_SINGLE_BUFFER 767 ALLEGRO_SWAP_METHOD 768 ALLEGRO_COMPATIBLE_DISPLAY 769 ALLEGRO_UPDATE_DISPLAY_REGION 770 ALLEGRO_VSYNC 771 ALLEGRO_MAX_BITMAP_SIZE 772 ALLEGRO_SUPPORT_NPOT_BITMAP 773 ALLEGRO_CAN_DRAW_INTO_BITMAP 774 ALLEGRO_SUPPORT_SEPARATE_ALPHA 775 ALLEGRO_DISPLAY_OPTIONS_COUNT 776 end enum 777 778 enum 779 ALLEGRO_DONTCARE 780 ALLEGRO_REQUIRE 781 ALLEGRO_SUGGEST 782 end enum 783 784 type ALLEGRO_DISPLAY_ORIENTATION as long 785 enum 786 ALLEGRO_DISPLAY_ORIENTATION_0_DEGREES 787 ALLEGRO_DISPLAY_ORIENTATION_90_DEGREES 788 ALLEGRO_DISPLAY_ORIENTATION_180_DEGREES 789 ALLEGRO_DISPLAY_ORIENTATION_270_DEGREES 790 ALLEGRO_DISPLAY_ORIENTATION_FACE_UP 791 ALLEGRO_DISPLAY_ORIENTATION_FACE_DOWN 792 end enum 793 794 declare sub al_set_new_display_refresh_rate(byval refresh_rate as long) 795 declare sub al_set_new_display_flags(byval flags as long) 796 declare function al_get_new_display_refresh_rate() as long 797 declare function al_get_new_display_flags() as long 798 declare function al_get_display_width(byval display as ALLEGRO_DISPLAY ptr) as long 799 declare function al_get_display_height(byval display as ALLEGRO_DISPLAY ptr) as long 800 declare function al_get_display_format(byval display as ALLEGRO_DISPLAY ptr) as long 801 declare function al_get_display_refresh_rate(byval display as ALLEGRO_DISPLAY ptr) as long 802 declare function al_get_display_flags(byval display as ALLEGRO_DISPLAY ptr) as long 803 declare function al_set_display_flag(byval display as ALLEGRO_DISPLAY ptr, byval flag as long, byval onoff as byte) as byte 804 declare function al_toggle_display_flag(byval display as ALLEGRO_DISPLAY ptr, byval flag as long, byval onoff as byte) as byte 805 declare function al_create_display(byval w as long, byval h as long) as ALLEGRO_DISPLAY ptr 806 declare sub al_destroy_display(byval display as ALLEGRO_DISPLAY ptr) 807 declare function al_get_current_display() as ALLEGRO_DISPLAY ptr 808 declare sub al_set_target_bitmap(byval bitmap as ALLEGRO_BITMAP ptr) 809 declare sub al_set_target_backbuffer(byval display as ALLEGRO_DISPLAY ptr) 810 declare function al_get_backbuffer(byval display as ALLEGRO_DISPLAY ptr) as ALLEGRO_BITMAP ptr 811 declare function al_get_target_bitmap() as ALLEGRO_BITMAP ptr 812 declare function al_acknowledge_resize(byval display as ALLEGRO_DISPLAY ptr) as byte 813 declare function al_resize_display(byval display as ALLEGRO_DISPLAY ptr, byval width as long, byval height as long) as byte 814 declare sub al_flip_display() 815 declare sub al_update_display_region(byval x as long, byval y as long, byval width as long, byval height as long) 816 declare function al_is_compatible_bitmap(byval bitmap as ALLEGRO_BITMAP ptr) as byte 817 declare function al_wait_for_vsync() as byte 818 declare function al_get_display_event_source(byval display as ALLEGRO_DISPLAY ptr) as ALLEGRO_EVENT_SOURCE ptr 819 declare sub al_set_display_icon(byval display as ALLEGRO_DISPLAY ptr, byval icon as ALLEGRO_BITMAP ptr) 820 declare sub al_set_display_icons(byval display as ALLEGRO_DISPLAY ptr, byval num_icons as long, byval icons as ALLEGRO_BITMAP ptr ptr) 821 declare function al_get_new_display_adapter() as long 822 declare sub al_set_new_display_adapter(byval adapter as long) 823 declare sub al_set_new_window_position(byval x as long, byval y as long) 824 declare sub al_get_new_window_position(byval x as long ptr, byval y as long ptr) 825 declare sub al_set_window_position(byval display as ALLEGRO_DISPLAY ptr, byval x as long, byval y as long) 826 declare sub al_get_window_position(byval display as ALLEGRO_DISPLAY ptr, byval x as long ptr, byval y as long ptr) 827 declare sub al_set_window_title(byval display as ALLEGRO_DISPLAY ptr, byval title as const zstring ptr) 828 declare sub al_set_new_display_option(byval option as long, byval value as long, byval importance as long) 829 declare function al_get_new_display_option(byval option as long, byval importance as long ptr) as long 830 declare sub al_reset_new_display_options() 831 declare function al_get_display_option(byval display as ALLEGRO_DISPLAY ptr, byval option as long) as long 832 declare sub al_hold_bitmap_drawing(byval hold as byte) 833 declare function al_is_bitmap_drawing_held() as byte 834 #define __al_included_allegro5_drawing_h 835 declare sub al_clear_to_color(byval color as ALLEGRO_COLOR) 836 declare sub al_draw_pixel(byval x as single, byval y as single, byval color as ALLEGRO_COLOR) 837 #define __al_included_allegro5_error_h 838 declare function al_get_errno() as long 839 declare sub al_set_errno(byval errnum as long) 840 #define __al_included_allegro5_fixed_h 841 type al_fixed as long 842 843 extern _AL_DLL al_fixtorad_r as const al_fixed 844 extern _AL_DLL al_radtofix_r as const al_fixed 845 846 #define __al_included_allegro5_fmaths_h 847 declare function al_fixsqrt(byval x as al_fixed) as al_fixed 848 declare function al_fixhypot(byval x as al_fixed, byval y as al_fixed) as al_fixed 849 declare function al_fixatan(byval x as al_fixed) as al_fixed 850 declare function al_fixatan2(byval y as al_fixed, byval x as al_fixed) as al_fixed 851 852 #define _al_fix_cos_tbl(i) ((@___al_fix_cos_tbl)[i]) 853 extern _AL_DLL ___al_fix_cos_tbl alias "_al_fix_cos_tbl" as al_fixed 854 #define _al_fix_tan_tbl(i) ((@___al_fix_tan_tbl)[i]) 855 extern _AL_DLL ___al_fix_tan_tbl alias "_al_fix_tan_tbl" as al_fixed 856 #define _al_fix_acos_tbl(i) ((@___al_fix_acos_tbl)[i]) 857 extern _AL_DLL ___al_fix_acos_tbl alias "_al_fix_acos_tbl" as al_fixed 858 859 #define __al_included_allegro5_inline_fmaths_inl 860 declare function al_ftofix(byval x as double) as al_fixed 861 declare function al_fixtof(byval x as al_fixed) as double 862 declare function al_fixadd(byval x as al_fixed, byval y as al_fixed) as al_fixed 863 declare function al_fixsub(byval x as al_fixed, byval y as al_fixed) as al_fixed 864 declare function al_fixmul(byval x as al_fixed, byval y as al_fixed) as al_fixed 865 declare function al_fixdiv(byval x as al_fixed, byval y as al_fixed) as al_fixed 866 declare function al_fixfloor(byval x as al_fixed) as long 867 declare function al_fixceil(byval x as al_fixed) as long 868 declare function al_itofix(byval x as long) as al_fixed 869 declare function al_fixtoi(byval x as al_fixed) as long 870 declare function al_fixcos(byval x as al_fixed) as al_fixed 871 declare function al_fixsin(byval x as al_fixed) as al_fixed 872 declare function al_fixtan(byval x as al_fixed) as al_fixed 873 declare function al_fixacos(byval x as al_fixed) as al_fixed 874 declare function al_fixasin(byval x as al_fixed) as al_fixed 875 #define __al_included_allegro5_fshook_h 876 type ALLEGRO_FS_INTERFACE as ALLEGRO_FS_INTERFACE_ 877 878 type ALLEGRO_FS_ENTRY 879 vtable as const ALLEGRO_FS_INTERFACE ptr 880 end type 881 882 type ALLEGRO_FILE_MODE as long 883 enum 884 ALLEGRO_FILEMODE_READ = 1 885 ALLEGRO_FILEMODE_WRITE = 1 shl 1 886 ALLEGRO_FILEMODE_EXECUTE = 1 shl 2 887 ALLEGRO_FILEMODE_HIDDEN = 1 shl 3 888 ALLEGRO_FILEMODE_ISFILE = 1 shl 4 889 ALLEGRO_FILEMODE_ISDIR = 1 shl 5 890 end enum 891 892 #define EOF_ (-1) 893 894 type ALLEGRO_FS_INTERFACE_ 895 fs_create_entry as function(byval path as const zstring ptr) as ALLEGRO_FS_ENTRY ptr 896 fs_destroy_entry as sub(byval e as ALLEGRO_FS_ENTRY ptr) 897 fs_entry_name as function(byval e as ALLEGRO_FS_ENTRY ptr) as const zstring ptr 898 fs_update_entry as function(byval e as ALLEGRO_FS_ENTRY ptr) as byte 899 fs_entry_mode as function(byval e as ALLEGRO_FS_ENTRY ptr) as ulong 900 fs_entry_atime as function(byval e as ALLEGRO_FS_ENTRY ptr) as time_t 901 fs_entry_mtime as function(byval e as ALLEGRO_FS_ENTRY ptr) as time_t 902 fs_entry_ctime as function(byval e as ALLEGRO_FS_ENTRY ptr) as time_t 903 fs_entry_size as function(byval e as ALLEGRO_FS_ENTRY ptr) as off_t 904 fs_entry_exists as function(byval e as ALLEGRO_FS_ENTRY ptr) as byte 905 fs_remove_entry as function(byval e as ALLEGRO_FS_ENTRY ptr) as byte 906 fs_open_directory as function(byval e as ALLEGRO_FS_ENTRY ptr) as byte 907 fs_read_directory as function(byval e as ALLEGRO_FS_ENTRY ptr) as ALLEGRO_FS_ENTRY ptr 908 fs_close_directory as function(byval e as ALLEGRO_FS_ENTRY ptr) as byte 909 fs_filename_exists as function(byval path as const zstring ptr) as byte 910 fs_remove_filename as function(byval path as const zstring ptr) as byte 911 fs_get_current_directory as function() as zstring ptr 912 fs_change_directory as function(byval path as const zstring ptr) as byte 913 fs_make_directory as function(byval path as const zstring ptr) as byte 914 fs_open_file as function(byval e as ALLEGRO_FS_ENTRY ptr, byval mode as const zstring ptr) as ALLEGRO_FILE ptr 915 end type 916 917 declare function al_create_fs_entry(byval path as const zstring ptr) as ALLEGRO_FS_ENTRY ptr 918 declare sub al_destroy_fs_entry(byval e as ALLEGRO_FS_ENTRY ptr) 919 declare function al_get_fs_entry_name(byval e as ALLEGRO_FS_ENTRY ptr) as const zstring ptr 920 declare function al_update_fs_entry(byval e as ALLEGRO_FS_ENTRY ptr) as byte 921 declare function al_get_fs_entry_mode(byval e as ALLEGRO_FS_ENTRY ptr) as ulong 922 declare function al_get_fs_entry_atime(byval e as ALLEGRO_FS_ENTRY ptr) as time_t 923 declare function al_get_fs_entry_mtime(byval e as ALLEGRO_FS_ENTRY ptr) as time_t 924 declare function al_get_fs_entry_ctime(byval e as ALLEGRO_FS_ENTRY ptr) as time_t 925 declare function al_get_fs_entry_size(byval e as ALLEGRO_FS_ENTRY ptr) as off_t 926 declare function al_fs_entry_exists(byval e as ALLEGRO_FS_ENTRY ptr) as byte 927 declare function al_remove_fs_entry(byval e as ALLEGRO_FS_ENTRY ptr) as byte 928 declare function al_open_directory(byval e as ALLEGRO_FS_ENTRY ptr) as byte 929 declare function al_read_directory(byval e as ALLEGRO_FS_ENTRY ptr) as ALLEGRO_FS_ENTRY ptr 930 declare function al_close_directory(byval e as ALLEGRO_FS_ENTRY ptr) as byte 931 declare function al_filename_exists(byval path as const zstring ptr) as byte 932 declare function al_remove_filename(byval path as const zstring ptr) as byte 933 declare function al_get_current_directory() as zstring ptr 934 declare function al_change_directory(byval path as const zstring ptr) as byte 935 declare function al_make_directory(byval path as const zstring ptr) as byte 936 declare function al_open_fs_entry(byval e as ALLEGRO_FS_ENTRY ptr, byval mode as const zstring ptr) as ALLEGRO_FILE ptr 937 declare function al_get_fs_interface() as const ALLEGRO_FS_INTERFACE ptr 938 declare sub al_set_fs_interface(byval vtable as const ALLEGRO_FS_INTERFACE ptr) 939 declare sub al_set_standard_fs_interface() 940 #define __al_included_allegro5_fullscreen_mode_h 941 942 type ALLEGRO_DISPLAY_MODE 943 width as long 944 height as long 945 format as long 946 refresh_rate as long 947 end type 948 949 declare function al_get_num_display_modes() as long 950 declare function al_get_display_mode(byval index as long, byval mode as ALLEGRO_DISPLAY_MODE ptr) as ALLEGRO_DISPLAY_MODE ptr 951 #define __al_included_allegro5_joystick_h 952 const _AL_MAX_JOYSTICK_AXES = 3 953 const _AL_MAX_JOYSTICK_STICKS = 8 954 const _AL_MAX_JOYSTICK_BUTTONS = 32 955 956 type ALLEGRO_JOYSTICK_STATE_stick 957 axis(0 to 2) as single 958 end type 959 960 type ALLEGRO_JOYSTICK_STATE 961 stick(0 to 7) as ALLEGRO_JOYSTICK_STATE_stick 962 button(0 to 31) as long 963 end type 964 965 type ALLEGRO_JOYFLAGS as long 966 enum 967 ALLEGRO_JOYFLAG_DIGITAL = &h01 968 ALLEGRO_JOYFLAG_ANALOGUE = &h02 969 end enum 970 971 declare function al_install_joystick() as byte 972 declare sub al_uninstall_joystick() 973 declare function al_is_joystick_installed() as byte 974 declare function al_reconfigure_joysticks() as byte 975 declare function al_get_num_joysticks() as long 976 declare function al_get_joystick(byval joyn as long) as ALLEGRO_JOYSTICK ptr 977 declare sub al_release_joystick(byval as ALLEGRO_JOYSTICK ptr) 978 declare function al_get_joystick_active(byval as ALLEGRO_JOYSTICK ptr) as byte 979 declare function al_get_joystick_name(byval as ALLEGRO_JOYSTICK ptr) as const zstring ptr 980 declare function al_get_joystick_num_sticks(byval as ALLEGRO_JOYSTICK ptr) as long 981 declare function al_get_joystick_stick_flags(byval as ALLEGRO_JOYSTICK ptr, byval stick as long) as long 982 declare function al_get_joystick_stick_name(byval as ALLEGRO_JOYSTICK ptr, byval stick as long) as const zstring ptr 983 declare function al_get_joystick_num_axes(byval as ALLEGRO_JOYSTICK ptr, byval stick as long) as long 984 declare function al_get_joystick_axis_name(byval as ALLEGRO_JOYSTICK ptr, byval stick as long, byval axis as long) as const zstring ptr 985 declare function al_get_joystick_num_buttons(byval as ALLEGRO_JOYSTICK ptr) as long 986 declare function al_get_joystick_button_name(byval as ALLEGRO_JOYSTICK ptr, byval buttonn as long) as const zstring ptr 987 declare sub al_get_joystick_state(byval as ALLEGRO_JOYSTICK ptr, byval ret_state as ALLEGRO_JOYSTICK_STATE ptr) 988 declare function al_get_joystick_event_source() as ALLEGRO_EVENT_SOURCE ptr 989 #define __al_included_allegro5_keyboard_h 990 #define __al_included_allegro5_keycodes_h 991 992 enum 993 ALLEGRO_KEY_A = 1 994 ALLEGRO_KEY_B = 2 995 ALLEGRO_KEY_C = 3 996 ALLEGRO_KEY_D = 4 997 ALLEGRO_KEY_E = 5 998 ALLEGRO_KEY_F = 6 999 ALLEGRO_KEY_G = 7 1000 ALLEGRO_KEY_H = 8 1001 ALLEGRO_KEY_I = 9 1002 ALLEGRO_KEY_J = 10 1003 ALLEGRO_KEY_K = 11 1004 ALLEGRO_KEY_L = 12 1005 ALLEGRO_KEY_M = 13 1006 ALLEGRO_KEY_N = 14 1007 ALLEGRO_KEY_O = 15 1008 ALLEGRO_KEY_P = 16 1009 ALLEGRO_KEY_Q = 17 1010 ALLEGRO_KEY_R = 18 1011 ALLEGRO_KEY_S = 19 1012 ALLEGRO_KEY_T = 20 1013 ALLEGRO_KEY_U = 21 1014 ALLEGRO_KEY_V = 22 1015 ALLEGRO_KEY_W = 23 1016 ALLEGRO_KEY_X = 24 1017 ALLEGRO_KEY_Y = 25 1018 ALLEGRO_KEY_Z = 26 1019 ALLEGRO_KEY_0 = 27 1020 ALLEGRO_KEY_1 = 28 1021 ALLEGRO_KEY_2 = 29 1022 ALLEGRO_KEY_3 = 30 1023 ALLEGRO_KEY_4 = 31 1024 ALLEGRO_KEY_5 = 32 1025 ALLEGRO_KEY_6 = 33 1026 ALLEGRO_KEY_7 = 34 1027 ALLEGRO_KEY_8 = 35 1028 ALLEGRO_KEY_9 = 36 1029 ALLEGRO_KEY_PAD_0 = 37 1030 ALLEGRO_KEY_PAD_1 = 38 1031 ALLEGRO_KEY_PAD_2 = 39 1032 ALLEGRO_KEY_PAD_3 = 40 1033 ALLEGRO_KEY_PAD_4 = 41 1034 ALLEGRO_KEY_PAD_5 = 42 1035 ALLEGRO_KEY_PAD_6 = 43 1036 ALLEGRO_KEY_PAD_7 = 44 1037 ALLEGRO_KEY_PAD_8 = 45 1038 ALLEGRO_KEY_PAD_9 = 46 1039 ALLEGRO_KEY_F1 = 47 1040 ALLEGRO_KEY_F2 = 48 1041 ALLEGRO_KEY_F3 = 49 1042 ALLEGRO_KEY_F4 = 50 1043 ALLEGRO_KEY_F5 = 51 1044 ALLEGRO_KEY_F6 = 52 1045 ALLEGRO_KEY_F7 = 53 1046 ALLEGRO_KEY_F8 = 54 1047 ALLEGRO_KEY_F9 = 55 1048 ALLEGRO_KEY_F10 = 56 1049 ALLEGRO_KEY_F11 = 57 1050 ALLEGRO_KEY_F12 = 58 1051 ALLEGRO_KEY_ESCAPE = 59 1052 ALLEGRO_KEY_TILDE = 60 1053 ALLEGRO_KEY_MINUS = 61 1054 ALLEGRO_KEY_EQUALS = 62 1055 ALLEGRO_KEY_BACKSPACE = 63 1056 ALLEGRO_KEY_TAB = 64 1057 ALLEGRO_KEY_OPENBRACE = 65 1058 ALLEGRO_KEY_CLOSEBRACE = 66 1059 ALLEGRO_KEY_ENTER = 67 1060 ALLEGRO_KEY_SEMICOLON = 68 1061 ALLEGRO_KEY_QUOTE = 69 1062 ALLEGRO_KEY_BACKSLASH = 70 1063 ALLEGRO_KEY_BACKSLASH2 = 71 1064 ALLEGRO_KEY_COMMA = 72 1065 ALLEGRO_KEY_FULLSTOP = 73 1066 ALLEGRO_KEY_SLASH = 74 1067 ALLEGRO_KEY_SPACE = 75 1068 ALLEGRO_KEY_INSERT = 76 1069 ALLEGRO_KEY_DELETE = 77 1070 ALLEGRO_KEY_HOME = 78 1071 ALLEGRO_KEY_END = 79 1072 ALLEGRO_KEY_PGUP = 80 1073 ALLEGRO_KEY_PGDN = 81 1074 ALLEGRO_KEY_LEFT = 82 1075 ALLEGRO_KEY_RIGHT = 83 1076 ALLEGRO_KEY_UP = 84 1077 ALLEGRO_KEY_DOWN = 85 1078 ALLEGRO_KEY_PAD_SLASH = 86 1079 ALLEGRO_KEY_PAD_ASTERISK = 87 1080 ALLEGRO_KEY_PAD_MINUS = 88 1081 ALLEGRO_KEY_PAD_PLUS = 89 1082 ALLEGRO_KEY_PAD_DELETE = 90 1083 ALLEGRO_KEY_PAD_ENTER = 91 1084 ALLEGRO_KEY_PRINTSCREEN = 92 1085 ALLEGRO_KEY_PAUSE = 93 1086 ALLEGRO_KEY_ABNT_C1 = 94 1087 ALLEGRO_KEY_YEN = 95 1088 ALLEGRO_KEY_KANA = 96 1089 ALLEGRO_KEY_CONVERT = 97 1090 ALLEGRO_KEY_NOCONVERT = 98 1091 ALLEGRO_KEY_AT = 99 1092 ALLEGRO_KEY_CIRCUMFLEX = 100 1093 ALLEGRO_KEY_COLON2 = 101 1094 ALLEGRO_KEY_KANJI = 102 1095 ALLEGRO_KEY_PAD_EQUALS = 103 1096 ALLEGRO_KEY_BACKQUOTE = 104 1097 ALLEGRO_KEY_SEMICOLON2 = 105 1098 ALLEGRO_KEY_COMMAND = 106 1099 ALLEGRO_KEY_UNKNOWN = 107 1100 ALLEGRO_KEY_MODIFIERS = 215 1101 ALLEGRO_KEY_LSHIFT = 215 1102 ALLEGRO_KEY_RSHIFT = 216 1103 ALLEGRO_KEY_LCTRL = 217 1104 ALLEGRO_KEY_RCTRL = 218 1105 ALLEGRO_KEY_ALT = 219 1106 ALLEGRO_KEY_ALTGR = 220 1107 ALLEGRO_KEY_LWIN = 221 1108 ALLEGRO_KEY_RWIN = 222 1109 ALLEGRO_KEY_MENU = 223 1110 ALLEGRO_KEY_SCROLLLOCK = 224 1111 ALLEGRO_KEY_NUMLOCK = 225 1112 ALLEGRO_KEY_CAPSLOCK = 226 1113 ALLEGRO_KEY_MAX 1114 end enum 1115 1116 enum 1117 ALLEGRO_KEYMOD_SHIFT = &h00001 1118 ALLEGRO_KEYMOD_CTRL = &h00002 1119 ALLEGRO_KEYMOD_ALT = &h00004 1120 ALLEGRO_KEYMOD_LWIN = &h00008 1121 ALLEGRO_KEYMOD_RWIN = &h00010 1122 ALLEGRO_KEYMOD_MENU = &h00020 1123 ALLEGRO_KEYMOD_ALTGR = &h00040 1124 ALLEGRO_KEYMOD_COMMAND = &h00080 1125 ALLEGRO_KEYMOD_SCROLLLOCK = &h00100 1126 ALLEGRO_KEYMOD_NUMLOCK = &h00200 1127 ALLEGRO_KEYMOD_CAPSLOCK = &h00400 1128 ALLEGRO_KEYMOD_INALTSEQ = &h00800 1129 ALLEGRO_KEYMOD_ACCENT1 = &h01000 1130 ALLEGRO_KEYMOD_ACCENT2 = &h02000 1131 ALLEGRO_KEYMOD_ACCENT3 = &h04000 1132 ALLEGRO_KEYMOD_ACCENT4 = &h08000 1133 end enum 1134 1135 type ALLEGRO_KEYBOARD_STATE 1136 display as ALLEGRO_DISPLAY ptr 1137 __key_down__internal__(0 to ((ALLEGRO_KEY_MAX + 31) / 32) - 1) as ulong 1138 end type 1139 1140 declare function al_is_keyboard_installed() as byte 1141 declare function al_install_keyboard() as byte 1142 declare sub al_uninstall_keyboard() 1143 declare function al_set_keyboard_leds(byval leds as long) as byte 1144 declare function al_keycode_to_name(byval keycode as long) as const zstring ptr 1145 declare sub al_get_keyboard_state(byval ret_state as ALLEGRO_KEYBOARD_STATE ptr) 1146 declare function al_key_down(byval as const ALLEGRO_KEYBOARD_STATE ptr, byval keycode as long) as byte 1147 declare function al_get_keyboard_event_source() as ALLEGRO_EVENT_SOURCE ptr 1148 1149 extern _AL_DLL _al_three_finger_flag as byte 1150 extern _AL_DLL _al_key_led_flag as byte 1151 1152 #define __al_included_allegro5_memory_h 1153 1154 type ALLEGRO_MEMORY_INTERFACE 1155 mi_malloc as function(byval n as uinteger, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) as any ptr 1156 mi_free as sub(byval ptr as any ptr, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) 1157 mi_realloc as function(byval ptr as any ptr, byval n as uinteger, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) as any ptr 1158 mi_calloc as function(byval count as uinteger, byval n as uinteger, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) as any ptr 1159 end type 1160 1161 declare sub al_set_memory_interface(byval iface as ALLEGRO_MEMORY_INTERFACE ptr) 1162 #define al_malloc(n) al_malloc_with_context((n), __LINE__, __FILE__, __func__) 1163 #define al_free(p) al_free_with_context((p), __LINE__, __FILE__, __func__) 1164 #define al_realloc(p, n) al_realloc_with_context((p), (n), __LINE__, __FILE__, __func__) 1165 #define al_calloc(c, n) al_calloc_with_context((c), (n), __LINE__, __FILE__, __func__) 1166 1167 declare function al_malloc_with_context(byval n as uinteger, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) as any ptr 1168 declare sub al_free_with_context(byval ptr as any ptr, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) 1169 declare function al_realloc_with_context(byval ptr as any ptr, byval n as uinteger, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) as any ptr 1170 declare function al_calloc_with_context(byval count as uinteger, byval n as uinteger, byval line as long, byval file as const zstring ptr, byval func as const zstring ptr) as any ptr 1171 #define __al_included_allegro5_monitor_h 1172 1173 type ALLEGRO_MONITOR_INFO 1174 x1 as long 1175 y1 as long 1176 x2 as long 1177 y2 as long 1178 end type 1179 1180 enum 1181 ALLEGRO_DEFAULT_DISPLAY_ADAPTER = -1 1182 end enum 1183 1184 declare function al_get_num_video_adapters() as long 1185 declare function al_get_monitor_info(byval adapter as long, byval info as ALLEGRO_MONITOR_INFO ptr) as byte 1186 #define __al_included_allegro5_mouse_h 1187 const ALLEGRO_MOUSE_MAX_EXTRA_AXES = 4 1188 1189 type ALLEGRO_MOUSE_STATE 1190 x as long 1191 y as long 1192 z as long 1193 w as long 1194 more_axes(0 to 3) as long 1195 buttons as long 1196 pressure as single 1197 display as ALLEGRO_DISPLAY ptr 1198 end type 1199 1200 declare function al_is_mouse_installed() as byte 1201 declare function al_install_mouse() as byte 1202 declare sub al_uninstall_mouse() 1203 declare function al_get_mouse_num_buttons() as ulong 1204 declare function al_get_mouse_num_axes() as ulong 1205 declare function al_set_mouse_xy(byval display as ALLEGRO_DISPLAY ptr, byval x as long, byval y as long) as byte 1206 declare function al_set_mouse_z(byval z as long) as byte 1207 declare function al_set_mouse_w(byval w as long) as byte 1208 declare function al_set_mouse_axis(byval axis as long, byval value as long) as byte 1209 declare sub al_get_mouse_state(byval ret_state as ALLEGRO_MOUSE_STATE ptr) 1210 declare function al_mouse_button_down(byval state as const ALLEGRO_MOUSE_STATE ptr, byval button as long) as byte 1211 declare function al_get_mouse_state_axis(byval state as const ALLEGRO_MOUSE_STATE ptr, byval axis as long) as long 1212 declare function al_get_mouse_cursor_position(byval ret_x as long ptr, byval ret_y as long ptr) as byte 1213 declare function al_grab_mouse(byval display as ALLEGRO_DISPLAY ptr) as byte 1214 declare function al_ungrab_mouse() as byte 1215 declare function al_get_mouse_event_source() as ALLEGRO_EVENT_SOURCE ptr 1216 #define __al_included_allegro5_mouse_cursor_h 1217 1218 type ALLEGRO_SYSTEM_MOUSE_CURSOR as long 1219 enum 1220 ALLEGRO_SYSTEM_MOUSE_CURSOR_NONE = 0 1221 ALLEGRO_SYSTEM_MOUSE_CURSOR_DEFAULT = 1 1222 ALLEGRO_SYSTEM_MOUSE_CURSOR_ARROW = 2 1223 ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY = 3 1224 ALLEGRO_SYSTEM_MOUSE_CURSOR_QUESTION = 4 1225 ALLEGRO_SYSTEM_MOUSE_CURSOR_EDIT = 5 1226 ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE = 6 1227 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N = 7 1228 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_W = 8 1229 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_S = 9 1230 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E = 10 1231 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW = 11 1232 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SW = 12 1233 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SE = 13 1234 ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE = 14 1235 ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS = 15 1236 ALLEGRO_SYSTEM_MOUSE_CURSOR_PRECISION = 16 1237 ALLEGRO_SYSTEM_MOUSE_CURSOR_LINK = 17 1238 ALLEGRO_SYSTEM_MOUSE_CURSOR_ALT_SELECT = 18 1239 ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE = 19 1240 ALLEGRO_NUM_SYSTEM_MOUSE_CURSORS 1241 end enum 1242 1243 type ALLEGRO_MOUSE_CURSOR as ALLEGRO_MOUSE_CURSOR_ 1244 declare function al_create_mouse_cursor(byval sprite as ALLEGRO_BITMAP ptr, byval xfocus as long, byval yfocus as long) as ALLEGRO_MOUSE_CURSOR ptr 1245 declare sub al_destroy_mouse_cursor(byval as ALLEGRO_MOUSE_CURSOR ptr) 1246 declare function al_set_mouse_cursor(byval display as ALLEGRO_DISPLAY ptr, byval cursor as ALLEGRO_MOUSE_CURSOR ptr) as byte 1247 declare function al_set_system_mouse_cursor(byval display as ALLEGRO_DISPLAY ptr, byval cursor_id as ALLEGRO_SYSTEM_MOUSE_CURSOR) as byte 1248 declare function al_show_mouse_cursor(byval display as ALLEGRO_DISPLAY ptr) as byte 1249 declare function al_hide_mouse_cursor(byval display as ALLEGRO_DISPLAY ptr) as byte 1250 #define __al_included_allegro5_system_h 1251 #define al_init() al_install_system(ALLEGRO_VERSION_INT, @atexit) 1252 declare function al_install_system(byval version as long, byval atexit_ptr as function(byval as sub()) as long) as byte 1253 declare sub al_uninstall_system() 1254 declare function al_is_system_installed() as byte 1255 type ALLEGRO_SYSTEM as ALLEGRO_SYSTEM_ 1256 declare function al_get_system_driver() as ALLEGRO_SYSTEM ptr 1257 declare function al_get_system_config() as ALLEGRO_CONFIG ptr 1258 1259 enum 1260 ALLEGRO_RESOURCES_PATH = 0 1261 ALLEGRO_TEMP_PATH 1262 ALLEGRO_USER_DATA_PATH 1263 ALLEGRO_USER_HOME_PATH 1264 ALLEGRO_USER_SETTINGS_PATH 1265 ALLEGRO_USER_DOCUMENTS_PATH 1266 ALLEGRO_EXENAME_PATH 1267 ALLEGRO_LAST_PATH 1268 end enum 1269 1270 declare function al_get_standard_path(byval id as long) as ALLEGRO_PATH ptr 1271 declare sub al_set_exe_name(byval path as const zstring ptr) 1272 declare sub al_set_org_name(byval org_name as const zstring ptr) 1273 declare sub al_set_app_name(byval app_name as const zstring ptr) 1274 declare function al_get_org_name() as const zstring ptr 1275 declare function al_get_app_name() as const zstring ptr 1276 declare function al_inhibit_screensaver(byval inhibit as byte) as byte 1277 #define __al_included_allegro5_threads_h 1278 type ALLEGRO_THREAD as ALLEGRO_THREAD_ 1279 declare function al_create_thread(byval proc as function(byval thread as ALLEGRO_THREAD ptr, byval arg as any ptr) as any ptr, byval arg as any ptr) as ALLEGRO_THREAD ptr 1280 declare sub al_start_thread(byval outer as ALLEGRO_THREAD ptr) 1281 declare sub al_join_thread(byval outer as ALLEGRO_THREAD ptr, byval ret_value as any ptr ptr) 1282 declare sub al_set_thread_should_stop(byval outer as ALLEGRO_THREAD ptr) 1283 declare function al_get_thread_should_stop(byval outer as ALLEGRO_THREAD ptr) as byte 1284 declare sub al_destroy_thread(byval thread as ALLEGRO_THREAD ptr) 1285 declare sub al_run_detached_thread(byval proc as function(byval arg as any ptr) as any ptr, byval arg as any ptr) 1286 type ALLEGRO_MUTEX as ALLEGRO_MUTEX_ 1287 declare function al_create_mutex() as ALLEGRO_MUTEX ptr 1288 declare function al_create_mutex_recursive() as ALLEGRO_MUTEX ptr 1289 declare sub al_lock_mutex(byval mutex as ALLEGRO_MUTEX ptr) 1290 declare sub al_unlock_mutex(byval mutex as ALLEGRO_MUTEX ptr) 1291 declare sub al_destroy_mutex(byval mutex as ALLEGRO_MUTEX ptr) 1292 type ALLEGRO_COND as ALLEGRO_COND_ 1293 declare function al_create_cond() as ALLEGRO_COND ptr 1294 declare sub al_destroy_cond(byval cond as ALLEGRO_COND ptr) 1295 declare sub al_wait_cond(byval cond as ALLEGRO_COND ptr, byval mutex as ALLEGRO_MUTEX ptr) 1296 declare function al_wait_cond_until(byval cond as ALLEGRO_COND ptr, byval mutex as ALLEGRO_MUTEX ptr, byval timeout as const ALLEGRO_TIMEOUT ptr) as long 1297 declare sub al_broadcast_cond(byval cond as ALLEGRO_COND ptr) 1298 declare sub al_signal_cond(byval cond as ALLEGRO_COND ptr) 1299 1300 #define __al_included_allegro5_timer_h 1301 #define ALLEGRO_USECS_TO_SECS(x) ((x) / 1000000.0) 1302 #define ALLEGRO_MSECS_TO_SECS(x) ((x) / 1000.0) 1303 #define ALLEGRO_BPS_TO_SECS(x) (1.0 / (x)) 1304 #define ALLEGRO_BPM_TO_SECS(x) (60.0 / (x)) 1305 1306 declare function al_create_timer(byval speed_secs as double) as ALLEGRO_TIMER ptr 1307 declare sub al_destroy_timer(byval timer as ALLEGRO_TIMER ptr) 1308 declare sub al_start_timer(byval timer as ALLEGRO_TIMER ptr) 1309 declare sub al_stop_timer(byval timer as ALLEGRO_TIMER ptr) 1310 declare function al_get_timer_started(byval timer as const ALLEGRO_TIMER ptr) as byte 1311 declare function al_get_timer_speed(byval timer as const ALLEGRO_TIMER ptr) as double 1312 declare sub al_set_timer_speed(byval timer as ALLEGRO_TIMER ptr, byval speed_secs as double) 1313 declare function al_get_timer_count(byval timer as const ALLEGRO_TIMER ptr) as longint 1314 declare sub al_set_timer_count(byval timer as ALLEGRO_TIMER ptr, byval count as longint) 1315 declare sub al_add_timer_count(byval timer as ALLEGRO_TIMER ptr, byval diff as longint) 1316 declare function al_get_timer_event_source(byval timer as ALLEGRO_TIMER ptr) as ALLEGRO_EVENT_SOURCE ptr 1317 #define __al_included_allegro5_tls_h 1318 1319 type ALLEGRO_STATE_FLAGS as long 1320 enum 1321 ALLEGRO_STATE_NEW_DISPLAY_PARAMETERS = &h0001 1322 ALLEGRO_STATE_NEW_BITMAP_PARAMETERS = &h0002 1323 ALLEGRO_STATE_DISPLAY = &h0004 1324 ALLEGRO_STATE_TARGET_BITMAP = &h0008 1325 ALLEGRO_STATE_BLENDER = &h0010 1326 ALLEGRO_STATE_NEW_FILE_INTERFACE = &h0020 1327 ALLEGRO_STATE_TRANSFORM = &h0040 1328 ALLEGRO_STATE_BITMAP = ALLEGRO_STATE_TARGET_BITMAP + ALLEGRO_STATE_NEW_BITMAP_PARAMETERS 1329 ALLEGRO_STATE_ALL = &hffff 1330 end enum 1331 1332 type ALLEGRO_STATE 1333 _tls as zstring * 1024 1334 end type 1335 1336 declare sub al_store_state(byval state as ALLEGRO_STATE ptr, byval flags as long) 1337 declare sub al_restore_state(byval state as const ALLEGRO_STATE ptr) 1338 #define __al_included_allegro5_transformations_h 1339 1340 type ALLEGRO_TRANSFORM 1341 m(0 to 3, 0 to 3) as single 1342 end type 1343 1344 declare sub al_use_transform(byval trans as const ALLEGRO_TRANSFORM ptr) 1345 declare sub al_copy_transform(byval dest as ALLEGRO_TRANSFORM ptr, byval src as const ALLEGRO_TRANSFORM ptr) 1346 declare sub al_identity_transform(byval trans as ALLEGRO_TRANSFORM ptr) 1347 declare sub al_build_transform(byval trans as ALLEGRO_TRANSFORM ptr, byval x as single, byval y as single, byval sx as single, byval sy as single, byval theta as single) 1348 declare sub al_translate_transform(byval trans as ALLEGRO_TRANSFORM ptr, byval x as single, byval y as single) 1349 declare sub al_rotate_transform(byval trans as ALLEGRO_TRANSFORM ptr, byval theta as single) 1350 declare sub al_scale_transform(byval trans as ALLEGRO_TRANSFORM ptr, byval sx as single, byval sy as single) 1351 declare sub al_transform_coordinates(byval trans as const ALLEGRO_TRANSFORM ptr, byval x as single ptr, byval y as single ptr) 1352 declare sub al_compose_transform(byval trans as ALLEGRO_TRANSFORM ptr, byval other as const ALLEGRO_TRANSFORM ptr) 1353 declare function al_get_current_transform() as const ALLEGRO_TRANSFORM ptr 1354 declare sub al_invert_transform(byval trans as ALLEGRO_TRANSFORM ptr) 1355 declare function al_check_inverse(byval trans as const ALLEGRO_TRANSFORM ptr, byval tol as single) as long 1356 1357 #define __al_included_allegro5_alcompat_h 1358 const ALLEGRO_DST_COLOR = ALLEGRO_DEST_COLOR 1359 const ALLEGRO_INVERSE_DST_COLOR = ALLEGRO_INVERSE_DEST_COLOR 1360 #define al_current_time() al_get_time() 1361 #define al_event_queue_is_empty(q) al_is_event_queue_empty(q) 1362 1363 #ifdef __FB_WIN32__ 1364 declare function _WinMain(byval _main as any ptr, byval hInst as any ptr, byval hPrev as any ptr, byval Cmd as zstring ptr, byval nShow as long) as long 1365 #define AL_JOY_TYPE_DIRECTX AL_ID(asc("D"), asc("X"), asc(" "), asc(" ")) 1366 #endif 1367 1368 end extern