diff options
Diffstat (limited to 'src/fltk-images-rgb.adb')
-rw-r--r-- | src/fltk-images-rgb.adb | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/src/fltk-images-rgb.adb b/src/fltk-images-rgb.adb index 4382e93..69e1572 100644 --- a/src/fltk-images-rgb.adb +++ b/src/fltk-images-rgb.adb @@ -2,33 +2,28 @@ with - Interfaces.C, - System; - -use type - - System.Address; + Interfaces.C; package body FLTK.Images.RGB is function new_fl_rgb_image - (Data : in System.Address; + (Data : in Storage.Integer_Address; W, H, D, L : in Interfaces.C.int) - return System.Address; + return Storage.Integer_Address; pragma Import (C, new_fl_rgb_image, "new_fl_rgb_image"); pragma Inline (new_fl_rgb_image); function new_fl_rgb_image2 - (P : in System.Address; + (P : in Storage.Integer_Address; C : in Interfaces.C.unsigned) - return System.Address; + return Storage.Integer_Address; pragma Import (C, new_fl_rgb_image2, "new_fl_rgb_image2"); pragma Inline (new_fl_rgb_image2); procedure free_fl_rgb_image - (I : in System.Address); + (I : in Storage.Integer_Address); pragma Import (C, free_fl_rgb_image, "free_fl_rgb_image"); pragma Inline (free_fl_rgb_image); @@ -43,15 +38,15 @@ package body FLTK.Images.RGB is pragma Inline (fl_rgb_image_set_max_size); function fl_rgb_image_copy - (I : in System.Address; + (I : in Storage.Integer_Address; W, H : in Interfaces.C.int) - return System.Address; + return Storage.Integer_Address; pragma Import (C, fl_rgb_image_copy, "fl_rgb_image_copy"); pragma Inline (fl_rgb_image_copy); function fl_rgb_image_copy2 - (I : in System.Address) - return System.Address; + (I : in Storage.Integer_Address) + return Storage.Integer_Address; pragma Import (C, fl_rgb_image_copy2, "fl_rgb_image_copy2"); pragma Inline (fl_rgb_image_copy2); @@ -59,14 +54,14 @@ package body FLTK.Images.RGB is procedure fl_rgb_image_color_average - (I : in System.Address; + (I : in Storage.Integer_Address; C : in Interfaces.C.int; B : in Interfaces.C.C_float); pragma Import (C, fl_rgb_image_color_average, "fl_rgb_image_color_average"); pragma Inline (fl_rgb_image_color_average); procedure fl_rgb_image_desaturate - (I : in System.Address); + (I : in Storage.Integer_Address); pragma Import (C, fl_rgb_image_desaturate, "fl_rgb_image_desaturate"); pragma Inline (fl_rgb_image_desaturate); @@ -74,7 +69,7 @@ package body FLTK.Images.RGB is procedure fl_rgb_image_uncache - (I : in System.Address); + (I : in Storage.Integer_Address); pragma Import (C, fl_rgb_image_uncache, "fl_rgb_image_uncache"); pragma Inline (fl_rgb_image_uncache); @@ -82,13 +77,13 @@ package body FLTK.Images.RGB is procedure fl_rgb_image_draw2 - (I : in System.Address; + (I : in Storage.Integer_Address; X, Y : in Interfaces.C.int); pragma Import (C, fl_rgb_image_draw2, "fl_rgb_image_draw2"); pragma Inline (fl_rgb_image_draw2); procedure fl_rgb_image_draw - (I : in System.Address; + (I : in Storage.Integer_Address; X, Y, W, H, CX, CY : in Interfaces.C.int); pragma Import (C, fl_rgb_image_draw, "fl_rgb_image_draw"); pragma Inline (fl_rgb_image_draw); @@ -99,11 +94,11 @@ package body FLTK.Images.RGB is overriding procedure Finalize (This : in out RGB_Image) is begin - if This.Void_Ptr /= System.Null_Address and then + if This.Void_Ptr /= Null_Pointer and then This in RGB_Image'Class then free_fl_rgb_image (This.Void_Ptr); - This.Void_Ptr := System.Null_Address; + This.Void_Ptr := Null_Pointer; end if; Finalize (Image (This)); end Finalize; @@ -126,7 +121,7 @@ package body FLTK.Images.RGB is begin return This : RGB_Image do This.Void_Ptr := new_fl_rgb_image - (Data (Data'First)'Address, + (Storage.To_Integer (Data (Data'First)'Address), Interfaces.C.int (Width), Interfaces.C.int (Height), Interfaces.C.int (Depth), |