diff options
Diffstat (limited to 'src/fltk-widgets-buttons.adb')
-rw-r--r-- | src/fltk-widgets-buttons.adb | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/fltk-widgets-buttons.adb b/src/fltk-widgets-buttons.adb index fb2735f..f4f1e78 100644 --- a/src/fltk-widgets-buttons.adb +++ b/src/fltk-widgets-buttons.adb @@ -2,24 +2,19 @@ with - Interfaces.C, - System; - -use type - - System.Address; + Interfaces.C; package body FLTK.Widgets.Buttons is procedure button_set_draw_hook - (W, D : in System.Address); + (W, D : in Storage.Integer_Address); pragma Import (C, button_set_draw_hook, "button_set_draw_hook"); pragma Inline (button_set_draw_hook); procedure button_set_handle_hook - (W, H : in System.Address); + (W, H : in Storage.Integer_Address); pragma Import (C, button_set_handle_hook, "button_set_handle_hook"); pragma Inline (button_set_handle_hook); @@ -29,12 +24,12 @@ package body FLTK.Widgets.Buttons is function new_fl_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_button, "new_fl_button"); pragma Inline (new_fl_button); procedure free_fl_button - (B : in System.Address); + (B : in Storage.Integer_Address); pragma Import (C, free_fl_button, "free_fl_button"); pragma Inline (free_fl_button); @@ -42,19 +37,19 @@ package body FLTK.Widgets.Buttons is function fl_button_get_state - (B : in System.Address) + (B : in Storage.Integer_Address) return Interfaces.C.int; pragma Import (C, fl_button_get_state, "fl_button_get_state"); pragma Inline (fl_button_get_state); procedure fl_button_set_state - (B : in System.Address; + (B : in Storage.Integer_Address; S : in Interfaces.C.int); pragma Import (C, fl_button_set_state, "fl_button_set_state"); pragma Inline (fl_button_set_state); procedure fl_button_set_only - (B : in System.Address); + (B : in Storage.Integer_Address); pragma Import (C, fl_button_set_only, "fl_button_set_only"); pragma Inline (fl_button_set_only); @@ -62,25 +57,25 @@ package body FLTK.Widgets.Buttons is function fl_button_get_down_box - (B : in System.Address) + (B : in Storage.Integer_Address) return Interfaces.C.int; pragma Import (C, fl_button_get_down_box, "fl_button_get_down_box"); pragma Inline (fl_button_get_down_box); procedure fl_button_set_down_box - (B : in System.Address; + (B : in Storage.Integer_Address; T : in Interfaces.C.int); pragma Import (C, fl_button_set_down_box, "fl_button_set_down_box"); pragma Inline (fl_button_set_down_box); function fl_button_get_shortcut - (B : in System.Address) + (B : in Storage.Integer_Address) return Interfaces.C.int; pragma Import (C, fl_button_get_shortcut, "fl_button_get_shortcut"); pragma Inline (fl_button_get_shortcut); procedure fl_button_set_shortcut - (B : in System.Address; + (B : in Storage.Integer_Address; T : in Interfaces.C.int); pragma Import (C, fl_button_set_shortcut, "fl_button_set_shortcut"); pragma Inline (fl_button_set_shortcut); @@ -89,12 +84,12 @@ package body FLTK.Widgets.Buttons is procedure fl_button_draw - (W : in System.Address); + (W : in Storage.Integer_Address); pragma Import (C, fl_button_draw, "fl_button_draw"); pragma Inline (fl_button_draw); function fl_button_handle - (W : in System.Address; + (W : in Storage.Integer_Address; E : in Interfaces.C.int) return Interfaces.C.int; pragma Import (C, fl_button_handle, "fl_button_handle"); @@ -106,11 +101,11 @@ package body FLTK.Widgets.Buttons is procedure Finalize (This : in out Button) is begin - if This.Void_Ptr /= System.Null_Address and then + if This.Void_Ptr /= Null_Pointer and then This in Button'Class then free_fl_button (This.Void_Ptr); - This.Void_Ptr := System.Null_Address; + This.Void_Ptr := Null_Pointer; end if; Finalize (Widget (This)); end Finalize; @@ -134,9 +129,9 @@ package body FLTK.Widgets.Buttons is Interfaces.C.To_C (Text)); fl_widget_set_user_data (This.Void_Ptr, - Widget_Convert.To_Address (This'Unchecked_Access)); - button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); - button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); + Storage.To_Integer (Widget_Convert.To_Address (This'Unchecked_Access))); + button_set_draw_hook (This.Void_Ptr, Storage.To_Integer (Draw_Hook'Address)); + 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; |