sdlada_2.5.20_cd53c280/src/inputs/sdl-inputs-mice-cursors.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--------------------------------------------------------------------------------------------------------------------
--  This source code is subject to the Zlib license, see the LICENCE file in the root of this directory.
--------------------------------------------------------------------------------------------------------------------
--  SDL.Inputs.Mice.Cursors
--------------------------------------------------------------------------------------------------------------------
with Ada.Finalization;
private with SDL.C_Pointers;

package SDL.Inputs.Mice.Cursors is
   pragma Preelaborate;

   --  Don't confuse this package with any type of Ada iterator, this is for visual mouse cursors.

   type Cursor is new Ada.Finalization.Limited_Controlled with private;

   overriding
   procedure Finalize (Self : in out Cursor);

   type System_Cursors is
     (Arrow,
      I_Beam,
      Wait,
      Cross_Hair,
      Wait_Arrow,
      Size_NWSE,
      Size_NESW,
      Size_WE,
      size_NS,
      Size_All,
      No,
      Hand) with
     Convention => C;

   --  SDL_CreateColorCursor
   --  SDL_CreateCursor

   procedure Create_System_Cursor (Self : in out Cursor; Cursor_Name : System_Cursors);

   procedure Get_Cursor (Self : in out Cursor);

   procedure Set_Cursor (Self : in Cursor);
private
   type Cursor is new Ada.Finalization.Limited_Controlled with
      record
         Internal : SDL.C_Pointers.Cursor_Pointer := null;
         Owns     : Boolean                       := True;
      end record;
end SDL.Inputs.Mice.Cursors;