1. -- 
  2. -- Copyright (c) 2013 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. with Allegro.Bitmaps;                   use Allegro.Bitmaps; 
  10.  
  11. -- Allegro 5.0.9 - Mouse routines - Mouse cursors 
  12. package Allegro.Mouse.Cursors is 
  13.  
  14.     type Allegro_Mouse_Cursor is limited private; 
  15.     type A_Allegro_Mouse_Cursor is access all Allegro_Mouse_Cursor; 
  16.  
  17.     type Allegro_System_Mouse_Cursor is private; 
  18.     ALLEGRO_SYSTEM_MOUSE_CURSOR_NONE        : constant Allegro_System_Mouse_Cursor; 
  19.     ALLEGRO_SYSTEM_MOUSE_CURSOR_DEFAULT     : constant Allegro_System_Mouse_Cursor; 
  20.     ALLEGRO_SYSTEM_MOUSE_CURSOR_ARROW       : constant Allegro_System_Mouse_Cursor; 
  21.     ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY        : constant Allegro_System_Mouse_Cursor; 
  22.     ALLEGRO_SYSTEM_MOUSE_CURSOR_QUESTION    : constant Allegro_System_Mouse_Cursor; 
  23.     ALLEGRO_SYSTEM_MOUSE_CURSOR_EDIT        : constant Allegro_System_Mouse_Cursor; 
  24.     ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE        : constant Allegro_System_Mouse_Cursor; 
  25.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N    : constant Allegro_System_Mouse_Cursor; 
  26.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_W    : constant Allegro_System_Mouse_Cursor; 
  27.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_S    : constant Allegro_System_Mouse_Cursor; 
  28.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E    : constant Allegro_System_Mouse_Cursor; 
  29.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW   : constant Allegro_System_Mouse_Cursor; 
  30.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SW   : constant Allegro_System_Mouse_Cursor; 
  31.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SE   : constant Allegro_System_Mouse_Cursor; 
  32.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE   : constant Allegro_System_Mouse_Cursor; 
  33.     ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS    : constant Allegro_System_Mouse_Cursor; 
  34.     ALLEGRO_SYSTEM_MOUSE_CURSOR_PRECISION   : constant Allegro_System_Mouse_Cursor; 
  35.     ALLEGRO_SYSTEM_MOUSE_CURSOR_LINK        : constant Allegro_System_Mouse_Cursor; 
  36.     ALLEGRO_SYSTEM_MOUSE_CURSOR_ALT_SELECT  : constant Allegro_System_Mouse_Cursor; 
  37.     ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE : constant Allegro_System_Mouse_Cursor; 
  38.  
  39.     function Al_Create_Mouse_Cursor( sprite : A_Allegro_Bitmap; 
  40.                                      xfocus, 
  41.                                      yfocus : Integer ) return A_Allegro_Mouse_Cursor; 
  42.     pragma Import( C, Al_Create_Mouse_Cursor, "al_create_mouse_cursor" ); 
  43.  
  44.     procedure Al_Destroy_Mouse_Cursor( cursor : in out A_Allegro_Mouse_Cursor ); 
  45.  
  46.     function Al_Set_Mouse_Cursor( display : A_Allegro_Display; 
  47.                                   cursor  : A_Allegro_Mouse_Cursor ) return Boolean; 
  48.  
  49.     -- Calls Al_Set_Mouse_Cursor, ignoring any errors. 
  50.     procedure Al_Set_Mouse_Cursor( display : A_Allegro_Display; 
  51.                                    cursor  : A_Allegro_Mouse_Cursor ); 
  52.  
  53.     function Al_Set_System_Mouse_Cursor( display   : A_Allegro_Display; 
  54.                                          cursor_id : Allegro_System_Mouse_Cursor ) return Boolean; 
  55.  
  56.     -- Calls Al_Set_System_Mouse_Cursor, ignoring any errors. 
  57.     procedure Al_Set_System_Mouse_Cursor( display   : A_Allegro_Display; 
  58.                                           cursor_id : Allegro_System_Mouse_Cursor ); 
  59.  
  60.     function Al_Hide_Mouse_Cursor( display : A_Allegro_Display ) return Boolean; 
  61.  
  62.     -- Calls Al_Hide_Mouse_Cursor, ignoring any errors. 
  63.     procedure Al_Hide_Mouse_Cursor( display : A_Allegro_Display ); 
  64.  
  65.     function Al_Show_Mouse_Cursor( display : A_Allegro_Display ) return Boolean; 
  66.  
  67.     -- Calls Al_Show_Mouse_Cursor, ignoring any errors. 
  68.     procedure Al_Show_Mouse_Cursor( display : A_Allegro_Display ); 
  69.  
  70. private 
  71.  
  72.     type Allegro_Mouse_Cursor is limited null record; 
  73.     pragma Convention( C, Allegro_Mouse_Cursor ); 
  74.  
  75.     type Allegro_System_Mouse_Cursor is new Integer; 
  76.     ALLEGRO_SYSTEM_MOUSE_CURSOR_NONE        : constant Allegro_System_Mouse_Cursor :=  0; 
  77.     ALLEGRO_SYSTEM_MOUSE_CURSOR_DEFAULT     : constant Allegro_System_Mouse_Cursor :=  1; 
  78.     ALLEGRO_SYSTEM_MOUSE_CURSOR_ARROW       : constant Allegro_System_Mouse_Cursor :=  2; 
  79.     ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY        : constant Allegro_System_Mouse_Cursor :=  3; 
  80.     ALLEGRO_SYSTEM_MOUSE_CURSOR_QUESTION    : constant Allegro_System_Mouse_Cursor :=  4; 
  81.     ALLEGRO_SYSTEM_MOUSE_CURSOR_EDIT        : constant Allegro_System_Mouse_Cursor :=  5; 
  82.     ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE        : constant Allegro_System_Mouse_Cursor :=  6; 
  83.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N    : constant Allegro_System_Mouse_Cursor :=  7; 
  84.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_W    : constant Allegro_System_Mouse_Cursor :=  8; 
  85.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_S    : constant Allegro_System_Mouse_Cursor :=  9; 
  86.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E    : constant Allegro_System_Mouse_Cursor := 10; 
  87.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW   : constant Allegro_System_Mouse_Cursor := 11; 
  88.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SW   : constant Allegro_System_Mouse_Cursor := 12; 
  89.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_SE   : constant Allegro_System_Mouse_Cursor := 13; 
  90.     ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE   : constant Allegro_System_Mouse_Cursor := 14; 
  91.     ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS    : constant Allegro_System_Mouse_Cursor := 15; 
  92.     ALLEGRO_SYSTEM_MOUSE_CURSOR_PRECISION   : constant Allegro_System_Mouse_Cursor := 16; 
  93.     ALLEGRO_SYSTEM_MOUSE_CURSOR_LINK        : constant Allegro_System_Mouse_Cursor := 17; 
  94.     ALLEGRO_SYSTEM_MOUSE_CURSOR_ALT_SELECT  : constant Allegro_System_Mouse_Cursor := 18; 
  95.     ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE : constant Allegro_System_Mouse_Cursor := 19; 
  96.  
  97. end Allegro.Mouse.Cursors;