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-buttons-light-round.adb | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'src/fltk-widgets-buttons-light-round.adb') diff --git a/src/fltk-widgets-buttons-light-round.adb b/src/fltk-widgets-buttons-light-round.adb index bceb70e..4e96151 100644 --- a/src/fltk-widgets-buttons-light-round.adb +++ b/src/fltk-widgets-buttons-light-round.adb @@ -2,24 +2,19 @@ with - Interfaces.C, - System; - -use type - - System.Address; + Interfaces.C; package body FLTK.Widgets.Buttons.Light.Round is procedure round_button_set_draw_hook - (W, D : in System.Address); + (W, D : in Storage.Integer_Address); pragma Import (C, round_button_set_draw_hook, "round_button_set_draw_hook"); pragma Inline (round_button_set_draw_hook); procedure round_button_set_handle_hook - (W, H : in System.Address); + (W, H : in Storage.Integer_Address); pragma Import (C, round_button_set_handle_hook, "round_button_set_handle_hook"); pragma Inline (round_button_set_handle_hook); @@ -29,12 +24,12 @@ package body FLTK.Widgets.Buttons.Light.Round is function new_fl_round_button (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_round_button, "new_fl_round_button"); pragma Inline (new_fl_round_button); procedure free_fl_round_button - (B : in System.Address); + (B : in Storage.Integer_Address); pragma Import (C, free_fl_round_button, "free_fl_round_button"); pragma Inline (free_fl_round_button); @@ -42,12 +37,12 @@ package body FLTK.Widgets.Buttons.Light.Round is procedure fl_round_button_draw - (W : in System.Address); + (W : in Storage.Integer_Address); pragma Import (C, fl_round_button_draw, "fl_round_button_draw"); pragma Inline (fl_round_button_draw); function fl_round_button_handle - (W : in System.Address; + (W : in Storage.Integer_Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_round_button_handle, "fl_round_button_handle"); @@ -59,11 +54,11 @@ package body FLTK.Widgets.Buttons.Light.Round is procedure Finalize (This : in out Round_Button) is begin - if This.Void_Ptr /= System.Null_Address and then + if This.Void_Ptr /= Null_Pointer and then This in Round_Button'Class then free_fl_round_button (This.Void_Ptr); - This.Void_Ptr := System.Null_Address; + This.Void_Ptr := Null_Pointer; end if; Finalize (Light_Button (This)); end Finalize; @@ -87,9 +82,11 @@ package body FLTK.Widgets.Buttons.Light.Round is Interfaces.C.To_C (Text)); fl_widget_set_user_data (This.Void_Ptr, - Widget_Convert.To_Address (This'Unchecked_Access)); - round_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); - round_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + Storage.To_Integer (Widget_Convert.To_Address (This'Unchecked_Access))); + round_button_set_draw_hook + (This.Void_Ptr, Storage.To_Integer (Draw_Hook'Address)); + round_button_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