From 87671a2f2423efacd0b0c4ad0c34c244680ef565 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sun, 13 Oct 2024 02:00:32 +1300 Subject: Changed System.Address to Integer_Address --- src/fltk-widgets-inputs-integer.adb | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src/fltk-widgets-inputs-integer.adb') diff --git a/src/fltk-widgets-inputs-integer.adb b/src/fltk-widgets-inputs-integer.adb index bc794e4..a7e42f7 100644 --- a/src/fltk-widgets-inputs-integer.adb +++ b/src/fltk-widgets-inputs-integer.adb @@ -2,25 +2,23 @@ with - Interfaces.C.Strings, - System; + Interfaces.C.Strings; use type - Interfaces.C.Strings.chars_ptr, - System.Address; + Interfaces.C.Strings.chars_ptr; package body FLTK.Widgets.Inputs.Integer is procedure int_input_set_draw_hook - (W, D : in System.Address); + (W, D : in Storage.Integer_Address); pragma Import (C, int_input_set_draw_hook, "int_input_set_draw_hook"); pragma Inline (int_input_set_draw_hook); procedure int_input_set_handle_hook - (W, H : in System.Address); + (W, H : in Storage.Integer_Address); pragma Import (C, int_input_set_handle_hook, "int_input_set_handle_hook"); pragma Inline (int_input_set_handle_hook); @@ -30,12 +28,12 @@ package body FLTK.Widgets.Inputs.Integer is function new_fl_int_input (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) - return System.Address; + return Storage.Integer_Address; pragma Import (C, new_fl_int_input, "new_fl_int_input"); pragma Inline (new_fl_int_input); procedure free_fl_int_input - (F : in System.Address); + (F : in Storage.Integer_Address); pragma Import (C, free_fl_int_input, "free_fl_int_input"); pragma Inline (free_fl_int_input); @@ -43,12 +41,12 @@ package body FLTK.Widgets.Inputs.Integer is procedure fl_int_input_draw - (W : in System.Address); + (W : in Storage.Integer_Address); pragma Import (C, fl_int_input_draw, "fl_int_input_draw"); pragma Inline (fl_int_input_draw); function fl_int_input_handle - (W : in System.Address; + (W : in Storage.Integer_Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_int_input_handle, "fl_int_input_handle"); @@ -60,11 +58,11 @@ package body FLTK.Widgets.Inputs.Integer is procedure Finalize (This : in out Integer_Input) is begin - if This.Void_Ptr /= System.Null_Address and then + if This.Void_Ptr /= Null_Pointer and then This in Integer_Input'Class then free_fl_int_input (This.Void_Ptr); - This.Void_Ptr := System.Null_Address; + This.Void_Ptr := Null_Pointer; end if; Finalize (Input (This)); end Finalize; @@ -88,9 +86,9 @@ package body FLTK.Widgets.Inputs.Integer is Interfaces.C.To_C (Text)); fl_widget_set_user_data (This.Void_Ptr, - Widget_Convert.To_Address (This'Unchecked_Access)); - int_input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); - int_input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + Storage.To_Integer (Widget_Convert.To_Address (This'Unchecked_Access))); + int_input_set_draw_hook (This.Void_Ptr, Storage.To_Integer (Draw_Hook'Address)); + int_input_set_handle_hook (This.Void_Ptr, Storage.To_Integer (Handle_Hook'Address)); fl_widget_set_label (This.Void_Ptr, Interfaces.C.To_C (Text)); end return; end Create; -- cgit