/* Ofront+ 1.0 -sw7 -48 */

#ifndef Allegro5__oh
#define Allegro5__oh

#include "SYSTEM.oh"

typedef
  struct Allegro5_Bitmap__rec *Allegro5_Bitmap;

typedef
  struct Allegro5_Bitmap__rec {
    char _prvt0[1];
  } Allegro5_Bitmap__rec;

typedef
  struct Allegro5_Color {
    SHORTREAL r, g, b, a;
  } Allegro5_Color;

typedef
  struct Allegro5_Display__rec *Allegro5_Display;

typedef
  struct Allegro5_DisplayEvent {
    INTEGER type;
    Allegro5_Display source;
    REAL timestamp;
    INTEGER x, y, width, height, orientation;
    CHAR pad[40];
  } Allegro5_DisplayEvent;

typedef
  struct Allegro5_Display__rec {
    char _prvt0[1];
  } Allegro5_Display__rec;

typedef
  struct Allegro5_Event {
    INTEGER type, source;
    REAL timestamp;
    CHAR pad[52];
  } Allegro5_Event;

typedef
  struct Allegro5_EventQueue__rec *Allegro5_EventQueue;

typedef
  struct Allegro5_EventQueue__rec {
    char _prvt0[1];
  } Allegro5_EventQueue__rec;

typedef
  struct Allegro5_EventSource {
    INTEGER pad[32];
  } Allegro5_EventSource;

typedef
  struct Allegro5_KeyboardEvent {
    INTEGER type, source;
    REAL timestamp;
    Allegro5_Display display;
    INTEGER keycode, unichar;
    SET modifiers;
    BOOLEAN repeat;
  } Allegro5_KeyboardEvent;

typedef
  struct Allegro5_LockedRegionDesc *Allegro5_LockedRegion;

typedef
  struct Allegro5_LockedRegionDesc {
    INTEGER data, format, pitch, pixelSize;
  } Allegro5_LockedRegionDesc;

typedef
  struct Allegro5_MonitorInfo {
    INTEGER x1, y1, x2, y2;
  } Allegro5_MonitorInfo;

typedef
  struct Allegro5_MouseEvent {
    INTEGER type, source;
    REAL timestamp;
    Allegro5_Display display;
    INTEGER x, y, z, w, dx, dy, dz, dw, button;
    SHORTREAL pressure;
  } Allegro5_MouseEvent;

typedef
  Allegro5_DisplayEvent *Allegro5_PDisplayEvent;

typedef
  Allegro5_Event *Allegro5_PEvent;

typedef
  Allegro5_EventSource *Allegro5_PEventSource;

typedef
  Allegro5_KeyboardEvent *Allegro5_PKeyboardEvent;

typedef
  Allegro5_MouseEvent *Allegro5_PMouseEvent;

typedef
  struct Allegro5_TimerEvent *Allegro5_PTimerEvent;

typedef
  struct Allegro5_UserEvent *Allegro5_PUserEvent;

typedef
  struct Allegro5_Timer__rec *Allegro5_Timer;

typedef
  struct Allegro5_TimerEvent {
    INTEGER type, source;
    REAL timestamp;
    LONGINT count;
    REAL error;
  } Allegro5_TimerEvent;

typedef
  struct Allegro5_Timer__rec {
    char _prvt0[1];
  } Allegro5_Timer__rec;

typedef
  struct Allegro5_TouchEvent {
    INTEGER type, source;
    REAL timestamp;
    Allegro5_Display display;
    INTEGER id;
    SHORTREAL x, y, dx, dy;
    BOOLEAN primary;
  } Allegro5_TouchEvent;

typedef
  struct Allegro5_Transform {
    SHORTREAL m[4][4];
  } Allegro5_Transform;

typedef
  struct Allegro5_UserEvent {
    INTEGER type, source;
    REAL timestamp;
    INTEGER data1, data2, data3, data4;
    CHAR pad[52];
  } Allegro5_UserEvent;




__EXTERN void al_acknowledge_resize (Allegro5_Display display);
__EXTERN void al_add_new_bitmap_flag (SET flags);
__EXTERN void al_build_transform (Allegro5_Transform *trans, SHORTREAL x, SHORTREAL y, SHORTREAL sx, SHORTREAL sy, SHORTREAL theta);
__EXTERN void al_clear_to_color (Allegro5_Color color);
__EXTERN BOOLEAN al_clipboard_has_text (Allegro5_Display display);
__EXTERN Allegro5_Bitmap al_clone_bitmap (Allegro5_Bitmap bmp);
__EXTERN void al_convert_bitmap (Allegro5_Bitmap bmp);
__EXTERN void al_convert_memory_bitmaps (void);
__EXTERN Allegro5_Bitmap al_create_bitmap (INTEGER w, INTEGER h);
__EXTERN Allegro5_Display al_create_display (INTEGER w, INTEGER h);
__EXTERN Allegro5_EventQueue al_create_event_queue (void);
__EXTERN Allegro5_Bitmap al_create_sub_bitmap (Allegro5_Bitmap parent, INTEGER x, INTEGER y, INTEGER w, INTEGER h);
__EXTERN Allegro5_Timer al_create_timer (REAL period);
__EXTERN void al_destroy_bitmap (Allegro5_Bitmap bmp);
__EXTERN void al_destroy_display (Allegro5_Display display);
__EXTERN void al_destroy_event_queue (Allegro5_EventQueue queue);
__EXTERN void al_destroy_timer (Allegro5_Timer timer);
__EXTERN void al_draw_bitmap (Allegro5_Bitmap bmp, SHORTREAL dx, SHORTREAL dy, SET flip);
__EXTERN void al_draw_bitmap_region (Allegro5_Bitmap bmp, SHORTREAL sx, SHORTREAL sy, SHORTREAL sw, SHORTREAL sh, SHORTREAL dx, SHORTREAL dy, SET flip);
__EXTERN void al_draw_circle (SHORTREAL cx, SHORTREAL cy, SHORTREAL r, Allegro5_Color color, SHORTREAL thickness);
__EXTERN void al_draw_ellipse (SHORTREAL cx, SHORTREAL cy, SHORTREAL rx, SHORTREAL ry, Allegro5_Color color, SHORTREAL thickness);
__EXTERN void al_draw_filled_circle (SHORTREAL cx, SHORTREAL cy, SHORTREAL r, Allegro5_Color color);
__EXTERN void al_draw_filled_ellipse (SHORTREAL cx, SHORTREAL cy, SHORTREAL rx, SHORTREAL ry, Allegro5_Color color);
__EXTERN void al_draw_filled_polygon (SHORTREAL *vertices, INTEGER vertices__len, INTEGER vertexCount, Allegro5_Color color);
__EXTERN void al_draw_filled_polygon_with_holes (SHORTREAL *vertices, INTEGER vertices__len, INTEGER *vertexCounts, INTEGER vertexCounts__len, Allegro5_Color color);
__EXTERN void al_draw_filled_rectangle (SHORTREAL x1, SHORTREAL y1, SHORTREAL x2, SHORTREAL y2, Allegro5_Color color);
__EXTERN void al_draw_filled_rounded_rectangle (SHORTREAL x1, SHORTREAL y1, SHORTREAL x2, SHORTREAL y2, SHORTREAL rx, SHORTREAL ry, Allegro5_Color color);
__EXTERN void al_draw_line (SHORTREAL x1, SHORTREAL y1, SHORTREAL x2, SHORTREAL y2, Allegro5_Color color, SHORTREAL thickness);
__EXTERN void al_draw_pixel (SHORTREAL x, SHORTREAL y, Allegro5_Color color);
__EXTERN void al_draw_polygon (SHORTREAL *vertices, INTEGER vertices__len, INTEGER vertexCount, INTEGER joinStyle, Allegro5_Color color, SHORTREAL thickness, SHORTREAL miterLimit);
__EXTERN void al_draw_polyline (SHORTREAL *vertices, INTEGER vertices__len, INTEGER vertexCount, INTEGER joinStyle, INTEGER capStyle, Allegro5_Color color, SHORTREAL thickness, SHORTREAL miterLimit);
__EXTERN void al_draw_rectangle (SHORTREAL x1, SHORTREAL y1, SHORTREAL x2, SHORTREAL y2, Allegro5_Color color, SHORTREAL thickness);
__EXTERN void al_draw_rotated_bitmap (Allegro5_Bitmap bmp, SHORTREAL cx, SHORTREAL cy, SHORTREAL dx, SHORTREAL dy, SHORTREAL angle, SET flip);
__EXTERN void al_draw_rounded_rectangle (SHORTREAL x1, SHORTREAL y1, SHORTREAL x2, SHORTREAL y2, SHORTREAL rx, SHORTREAL ry, Allegro5_Color color, SHORTREAL thickness);
__EXTERN void al_draw_scaled_bitmap (Allegro5_Bitmap bmp, SHORTREAL sx, SHORTREAL sy, SHORTREAL sw, SHORTREAL sh, SHORTREAL dx, SHORTREAL dy, SHORTREAL dw, SHORTREAL dh, SET flip);
__EXTERN void al_draw_scaled_rotated_bitmap (Allegro5_Bitmap bmp, SHORTREAL cx, SHORTREAL cy, SHORTREAL dx, SHORTREAL dy, SHORTREAL xScale, SHORTREAL yScale, SHORTREAL angle, SET flip);
__EXTERN void al_draw_tinted_scaled_rotated_bitmap_region (Allegro5_Bitmap bmp, SHORTREAL sx, SHORTREAL sy, SHORTREAL sw, SHORTREAL sh, Allegro5_Color tint, SHORTREAL cx, SHORTREAL cy, SHORTREAL dx, SHORTREAL dy, SHORTREAL xScale, SHORTREAL yScale, SHORTREAL angle, SET flip);
__EXTERN void al_draw_tinted_bitmap (Allegro5_Bitmap bmp, Allegro5_Color tint, SHORTREAL dx, SHORTREAL dy, SET flip);
__EXTERN void al_draw_tinted_bitmap_region (Allegro5_Bitmap bmp, Allegro5_Color tint, SHORTREAL sx, SHORTREAL sy, SHORTREAL sw, SHORTREAL sh, SHORTREAL dx, SHORTREAL dy, SET flip);
__EXTERN void al_draw_tinted_rotated_bitmap (Allegro5_Bitmap bmp, Allegro5_Color tint, SHORTREAL cx, SHORTREAL cy, SHORTREAL dx, SHORTREAL dy, SHORTREAL angle, SET flip);
__EXTERN void al_draw_tinted_scaled_bitmap (Allegro5_Bitmap bmp, Allegro5_Color tint, SHORTREAL sx, SHORTREAL sy, SHORTREAL sw, SHORTREAL sh, SHORTREAL dx, SHORTREAL dy, SHORTREAL dw, SHORTREAL dh, SET flip);
__EXTERN void al_draw_tinted_scaled_rotated_bitmap (Allegro5_Bitmap bmp, Allegro5_Color tint, SHORTREAL cx, SHORTREAL cy, SHORTREAL dx, SHORTREAL dy, SHORTREAL xScale, SHORTREAL yScale, SHORTREAL angle, SET flip);
__EXTERN void al_draw_triangle (SHORTREAL x1, SHORTREAL y1, SHORTREAL x2, SHORTREAL y2, SHORTREAL x3, SHORTREAL y3, Allegro5_Color color, SHORTREAL thickness);
__EXTERN BOOLEAN al_drop_next_event (Allegro5_EventQueue queue);
__EXTERN BOOLEAN al_emit_user_event (Allegro5_EventSource *src, Allegro5_Event *event, INTEGER dtor);
__EXTERN void al_flip_display (void);
__EXTERN void al_free_with_context (INTEGER ptr, INTEGER line, CHAR *file, INTEGER file__len, CHAR *func, INTEGER func__len);
__EXTERN INTEGER al_get_allegro_version (void);
__EXTERN SET al_get_bitmap_flags (Allegro5_Bitmap bmp);
__EXTERN INTEGER al_get_bitmap_format (Allegro5_Bitmap bmp);
__EXTERN INTEGER al_get_bitmap_height (Allegro5_Bitmap bmp);
__EXTERN INTEGER al_get_bitmap_width (Allegro5_Bitmap bmp);
__EXTERN INTEGER al_get_bitmap_x (Allegro5_Bitmap bmp);
__EXTERN INTEGER al_get_bitmap_y (Allegro5_Bitmap bmp);
__EXTERN INTEGER al_get_clipboard_text (Allegro5_Display display);
__EXTERN void al_get_clipping_rectangle (INTEGER *x, INTEGER *y, INTEGER *w, INTEGER *h);
__EXTERN Allegro5_Display al_get_current_display (void);
__EXTERN Allegro5_PEventSource al_get_display_event_source (Allegro5_Display display);
__EXTERN SET al_get_display_flags (Allegro5_Display display);
__EXTERN INTEGER al_get_display_height (Allegro5_Display display);
__EXTERN INTEGER al_get_display_option (Allegro5_Display display, INTEGER option);
__EXTERN INTEGER al_get_display_width (Allegro5_Display display);
__EXTERN Allegro5_PEventSource al_get_keyboard_event_source (void);
__EXTERN BOOLEAN al_get_monitor_info (INTEGER adapter, Allegro5_MonitorInfo *info);
__EXTERN Allegro5_PEventSource al_get_mouse_event_source (void);
__EXTERN SET al_get_new_bitmap_flags (void);
__EXTERN INTEGER al_get_new_bitmap_format (void);
__EXTERN BOOLEAN al_get_next_event (Allegro5_EventQueue queue, Allegro5_Event *event);
__EXTERN INTEGER al_get_num_video_adapters (void);
__EXTERN Allegro5_Bitmap al_get_parent_bitmap (Allegro5_Bitmap bmp);
__EXTERN Allegro5_Bitmap al_get_target_bitmap (void);
__EXTERN REAL al_get_time (void);
__EXTERN Allegro5_PEventSource al_get_timer_event_source (Allegro5_Timer timer);
__EXTERN void al_get_window_position (Allegro5_Display display, INTEGER *x, INTEGER *y);
__EXTERN BOOLEAN al_hide_mouse_cursor (Allegro5_Display display);
__EXTERN void al_hold_bitmap_drawing (BOOLEAN hold);
__EXTERN void al_identity_transform (Allegro5_Transform *trans);
__EXTERN BOOLEAN al_init_acodec_addon (void);
__EXTERN BOOLEAN al_init_audio_addon (void);
__EXTERN BOOLEAN al_init_font_addon (void);
__EXTERN BOOLEAN al_init_image_addon (void);
__EXTERN BOOLEAN al_init_native_dialog_addon (void);
__EXTERN BOOLEAN al_init_primitives_addon (void);
__EXTERN void al_init_user_event_source (Allegro5_EventSource *src);
__EXTERN BOOLEAN al_install_keyboard (void);
__EXTERN BOOLEAN al_install_mouse (void);
__EXTERN BOOLEAN al_install_system (INTEGER version, INTEGER atexit);
__EXTERN BOOLEAN al_is_bitmap_drawing_held (void);
__EXTERN BOOLEAN al_is_bitmap_locked (Allegro5_Bitmap bmp);
__EXTERN BOOLEAN al_is_compatible_bitmap (Allegro5_Bitmap bmp);
__EXTERN BOOLEAN al_is_event_queue_empty (Allegro5_EventQueue queue);
__EXTERN BOOLEAN al_is_sub_bitmap (Allegro5_Bitmap bmp);
__EXTERN Allegro5_Bitmap al_load_bitmap (CHAR *filename, INTEGER filename__len);
__EXTERN Allegro5_Bitmap al_load_bitmap_flags (CHAR *filename, INTEGER filename__len, SET flags);
__EXTERN Allegro5_LockedRegion al_lock_bitmap (Allegro5_Bitmap bmp, INTEGER format, INTEGER flags);
__EXTERN Allegro5_LockedRegion al_lock_bitmap_region (Allegro5_Bitmap bmp, INTEGER x, INTEGER y, INTEGER w, INTEGER h, INTEGER format, INTEGER flags);
__EXTERN BOOLEAN al_peek_next_event (Allegro5_EventQueue queue, Allegro5_Event *event);
__EXTERN void al_put_blended_pixel (INTEGER x, INTEGER y, Allegro5_Color c);
__EXTERN void al_put_pixel (INTEGER x, INTEGER y, Allegro5_Color c);
__EXTERN void al_register_event_source (Allegro5_EventQueue queue, Allegro5_PEventSource source);
__EXTERN void al_reparent_bitmap (Allegro5_Bitmap bmp, Allegro5_Bitmap parent, INTEGER x, INTEGER y, INTEGER w, INTEGER h);
__EXTERN void al_reset_clipping_rectangle (void);
__EXTERN BOOLEAN al_resize_display (Allegro5_Display display, INTEGER width, INTEGER height);
__EXTERN void al_rest (REAL seconds);
__EXTERN void al_resume_timer (Allegro5_Timer timer);
__EXTERN BOOLEAN al_save_bitmap (CHAR *filename, INTEGER filename__len, Allegro5_Bitmap *bitmap);
__EXTERN BOOLEAN al_set_clipboard_text (Allegro5_Display display, INTEGER text);
__EXTERN void al_set_clipping_rectangle (INTEGER x, INTEGER y, INTEGER w, INTEGER h);
__EXTERN BOOLEAN al_set_display_flag (Allegro5_Display display, INTEGER flag, BOOLEAN on);
__EXTERN void al_set_display_icon (Allegro5_Display display, Allegro5_Bitmap icon);
__EXTERN void al_set_display_icons (Allegro5_Display display, INTEGER numIcons, Allegro5_Bitmap *icons, INTEGER icons__len);
__EXTERN void al_set_display_option (Allegro5_Display display, INTEGER option, INTEGER value);
__EXTERN void al_set_new_bitmap_flags (SET flags);
__EXTERN void al_set_new_bitmap_format (INTEGER format);
__EXTERN void al_set_new_display_flags (SET flags);
__EXTERN void al_set_new_display_option (INTEGER option, INTEGER value, INTEGER importance);
__EXTERN void al_set_new_window_position (INTEGER x, INTEGER y);
__EXTERN void al_set_new_window_title (CHAR *title, INTEGER title__len);
__EXTERN void al_set_target_backbuffer (Allegro5_Display display);
__EXTERN void al_set_target_bitmap (Allegro5_Bitmap bmp);
__EXTERN void al_set_window_position (Allegro5_Display display, INTEGER x, INTEGER y);
__EXTERN void al_set_window_title (Allegro5_Display display, CHAR *title, INTEGER title__len);
__EXTERN BOOLEAN al_show_mouse_cursor (Allegro5_Display display);
__EXTERN void al_start_timer (Allegro5_Timer timer);
__EXTERN void al_stop_timer (Allegro5_Timer timer);
__EXTERN void al_toggle_display_flag (Allegro5_Display display, INTEGER flag, BOOLEAN on);
__EXTERN void al_uninstall_system (void);
__EXTERN void al_unlock_bitmap (Allegro5_Bitmap bmp);
__EXTERN void al_use_transform (Allegro5_Transform *trans);
__EXTERN void al_wait_for_event (Allegro5_EventQueue queue, Allegro5_Event *event);
__EXTERN void al_wait_for_event_timed (Allegro5_EventQueue queue, Allegro5_Event *event, SHORTREAL secs);


#endif
