aboutsummaryrefslogtreecommitdiff
path: root/src/fltk-widgets-menus-menu_buttons.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-menus-menu_buttons.adb')
-rw-r--r--src/fltk-widgets-menus-menu_buttons.adb41
1 files changed, 19 insertions, 22 deletions
diff --git a/src/fltk-widgets-menus-menu_buttons.adb b/src/fltk-widgets-menus-menu_buttons.adb
index 890d847..b4fd002 100644
--- a/src/fltk-widgets-menus-menu_buttons.adb
+++ b/src/fltk-widgets-menus-menu_buttons.adb
@@ -2,24 +2,19 @@
with
- Interfaces.C,
- System;
-
-use type
-
- System.Address;
+ Interfaces.C;
package body FLTK.Widgets.Menus.Menu_Buttons is
procedure menu_button_set_draw_hook
- (W, D : in System.Address);
+ (W, D : in Storage.Integer_Address);
pragma Import (C, menu_button_set_draw_hook, "menu_button_set_draw_hook");
pragma Inline (menu_button_set_draw_hook);
procedure menu_button_set_handle_hook
- (W, H : in System.Address);
+ (W, H : in Storage.Integer_Address);
pragma Import (C, menu_button_set_handle_hook, "menu_button_set_handle_hook");
pragma Inline (menu_button_set_handle_hook);
@@ -29,12 +24,12 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
function new_fl_menu_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_menu_button, "new_fl_menu_button");
pragma Inline (new_fl_menu_button);
procedure free_fl_menu_button
- (M : in System.Address);
+ (M : in Storage.Integer_Address);
pragma Import (C, free_fl_menu_button, "free_fl_menu_button");
pragma Inline (free_fl_menu_button);
@@ -42,19 +37,19 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
procedure fl_menu_button_type
- (M : in System.Address;
+ (M : in Storage.Integer_Address;
T : in Interfaces.C.unsigned);
pragma Import (C, fl_menu_button_type, "fl_menu_button_type");
pragma Inline (fl_menu_button_type);
function fl_menu_button_popup
- (M : in System.Address)
- return System.Address;
+ (M : in Storage.Integer_Address)
+ return Storage.Integer_Address;
pragma Import (C, fl_menu_button_popup, "fl_menu_button_popup");
pragma Inline (fl_menu_button_popup);
function fl_menu_find_index2
- (M, I : in System.Address)
+ (M, I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_menu_find_index2, "fl_menu_find_index2");
pragma Inline (fl_menu_find_index2);
@@ -63,12 +58,12 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
procedure fl_menu_button_draw
- (W : in System.Address);
+ (W : in Storage.Integer_Address);
pragma Import (C, fl_menu_button_draw, "fl_menu_button_draw");
pragma Inline (fl_menu_button_draw);
function fl_menu_button_handle
- (W : in System.Address;
+ (W : in Storage.Integer_Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_menu_button_handle, "fl_menu_button_handle");
@@ -80,13 +75,13 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
procedure Finalize
(This : in out Menu_Button) is
begin
- if This.Void_Ptr /= System.Null_Address and then
+ if This.Void_Ptr /= Null_Pointer and then
This in Menu_Button'Class
then
if This.Needs_Dealloc then
free_fl_menu_button (This.Void_Ptr);
end if;
- This.Void_Ptr := System.Null_Address;
+ This.Void_Ptr := Null_Pointer;
end if;
Finalize (Menu (This));
end Finalize;
@@ -110,9 +105,11 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
Interfaces.C.To_C (Text));
fl_widget_set_user_data
(This.Void_Ptr,
- Widget_Convert.To_Address (This'Unchecked_Access));
- menu_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
- menu_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
+ Storage.To_Integer (Widget_Convert.To_Address (This'Unchecked_Access)));
+ menu_button_set_draw_hook
+ (This.Void_Ptr, Storage.To_Integer (Draw_Hook'Address));
+ menu_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;
@@ -135,7 +132,7 @@ package body FLTK.Widgets.Menus.Menu_Buttons is
return Extended_Index
is
use type Interfaces.C.int;
- Ptr : System.Address := fl_menu_button_popup (This.Void_Ptr);
+ Ptr : Storage.Integer_Address := fl_menu_button_popup (This.Void_Ptr);
begin
return Extended_Index (fl_menu_find_index2 (This.Void_Ptr, Ptr) + 1);
end Popup;