aboutsummaryrefslogtreecommitdiff
path: root/src/fltk-widgets-inputs.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-inputs.adb')
-rw-r--r--src/fltk-widgets-inputs.adb100
1 files changed, 49 insertions, 51 deletions
diff --git a/src/fltk-widgets-inputs.adb b/src/fltk-widgets-inputs.adb
index 30334b8..82c14aa 100644
--- a/src/fltk-widgets-inputs.adb
+++ b/src/fltk-widgets-inputs.adb
@@ -2,26 +2,24 @@
with
- Interfaces.C.Strings,
- System;
+ Interfaces.C.Strings;
use type
Interfaces.C.int,
- Interfaces.C.Strings.chars_ptr,
- System.Address;
+ Interfaces.C.Strings.chars_ptr;
package body FLTK.Widgets.Inputs is
procedure input_set_draw_hook
- (W, D : in System.Address);
+ (W, D : in Storage.Integer_Address);
pragma Import (C, input_set_draw_hook, "input_set_draw_hook");
pragma Inline (input_set_draw_hook);
procedure input_set_handle_hook
- (W, H : in System.Address);
+ (W, H : in Storage.Integer_Address);
pragma Import (C, input_set_handle_hook, "input_set_handle_hook");
pragma Inline (input_set_handle_hook);
@@ -31,12 +29,12 @@ package body FLTK.Widgets.Inputs is
function new_fl_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_input, "new_fl_input");
pragma Inline (new_fl_input);
procedure free_fl_input
- (F : in System.Address);
+ (F : in Storage.Integer_Address);
pragma Import (C, free_fl_input, "free_fl_input");
pragma Inline (free_fl_input);
@@ -44,39 +42,39 @@ package body FLTK.Widgets.Inputs is
function fl_input_copy
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_copy, "fl_input_copy");
pragma Inline (fl_input_copy);
function fl_input_cut
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_cut, "fl_input_cut");
pragma Inline (fl_input_cut);
function fl_input_cut2
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
B : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_input_cut2, "fl_input_cut2");
pragma Inline (fl_input_cut2);
function fl_input_cut3
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
A, B : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_input_cut3, "fl_input_cut3");
pragma Inline (fl_input_cut3);
function fl_input_copy_cuts
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_copy_cuts, "fl_input_copy_cuts");
pragma Inline (fl_input_copy_cuts);
function fl_input_undo
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_undo, "fl_input_undo");
pragma Inline (fl_input_undo);
@@ -85,37 +83,37 @@ package body FLTK.Widgets.Inputs is
function fl_input_get_readonly
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_readonly, "fl_input_get_readonly");
pragma Inline (fl_input_get_readonly);
procedure fl_input_set_readonly
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_set_readonly, "fl_input_set_readonly");
pragma Inline (fl_input_set_readonly);
function fl_input_get_tab_nav
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_tab_nav, "fl_input_get_tab_nav");
pragma Inline (fl_input_get_tab_nav);
procedure fl_input_set_tab_nav
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_set_tab_nav, "fl_input_set_tab_nav");
pragma Inline (fl_input_set_tab_nav);
function fl_input_get_wrap
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_wrap, "fl_input_get_wrap");
pragma Inline (fl_input_get_wrap);
procedure fl_input_set_wrap
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_set_wrap, "fl_input_set_wrap");
pragma Inline (fl_input_set_wrap);
@@ -124,50 +122,50 @@ package body FLTK.Widgets.Inputs is
function fl_input_get_input_type
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_input_type, "fl_input_get_input_type");
pragma Inline (fl_input_get_input_type);
procedure fl_input_set_input_type
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_set_input_type, "fl_input_set_input_type");
pragma Inline (fl_input_set_input_type);
function fl_input_get_shortcut
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.unsigned_long;
pragma Import (C, fl_input_get_shortcut, "fl_input_get_shortcut");
pragma Inline (fl_input_get_shortcut);
procedure fl_input_set_shortcut
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.unsigned_long);
pragma Import (C, fl_input_set_shortcut, "fl_input_set_shortcut");
pragma Inline (fl_input_set_shortcut);
function fl_input_get_mark
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_mark, "fl_input_get_mark");
pragma Inline (fl_input_get_mark);
function fl_input_set_mark
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_input_set_mark, "fl_input_set_mark");
pragma Inline (fl_input_set_mark);
function fl_input_get_position
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_position, "fl_input_get_position");
pragma Inline (fl_input_get_position);
function fl_input_set_position
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_input_set_position, "fl_input_set_position");
@@ -177,14 +175,14 @@ package body FLTK.Widgets.Inputs is
function fl_input_index
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
P : in Interfaces.C.int)
return Interfaces.C.unsigned;
pragma Import (C, fl_input_index, "fl_input_index");
pragma Inline (fl_input_index);
function fl_input_insert
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
S : in Interfaces.C.char_array;
L : in Interfaces.C.int)
return Interfaces.C.int;
@@ -192,7 +190,7 @@ package body FLTK.Widgets.Inputs is
pragma Inline (fl_input_insert);
function fl_input_replace
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
B, E : in Interfaces.C.int;
S : in Interfaces.C.char_array;
L : in Interfaces.C.int)
@@ -201,7 +199,7 @@ package body FLTK.Widgets.Inputs is
pragma Inline (fl_input_replace);
procedure fl_input_set_value
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.char_array;
L : in Interfaces.C.int);
pragma Import (C, fl_input_set_value, "fl_input_set_value");
@@ -211,19 +209,19 @@ package body FLTK.Widgets.Inputs is
function fl_input_get_maximum_size
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_maximum_size, "fl_input_get_maximum_size");
pragma Inline (fl_input_get_maximum_size);
procedure fl_input_set_maximum_size
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_set_maximum_size, "fl_input_set_maximum_size");
pragma Inline (fl_input_set_maximum_size);
function fl_input_get_size
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_size, "fl_input_get_size");
pragma Inline (fl_input_get_size);
@@ -232,49 +230,49 @@ package body FLTK.Widgets.Inputs is
function fl_input_get_cursor_color
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.unsigned;
pragma Import (C, fl_input_get_cursor_color, "fl_input_get_cursor_color");
pragma Inline (fl_input_get_cursor_color);
procedure fl_input_set_cursor_color
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.unsigned);
pragma Import (C, fl_input_set_cursor_color, "fl_input_set_cursor_color");
pragma Inline (fl_input_set_cursor_color);
function fl_input_get_textcolor
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.unsigned;
pragma Import (C, fl_input_get_textcolor, "fl_input_get_textcolor");
pragma Inline (fl_input_get_textcolor);
procedure fl_input_set_textcolor
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.unsigned);
pragma Import (C, fl_input_set_textcolor, "fl_input_set_textcolor");
pragma Inline (fl_input_set_textcolor);
function fl_input_get_textfont
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_textfont, "fl_input_get_textfont");
pragma Inline (fl_input_get_textfont);
procedure fl_input_set_textfont
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_set_textfont, "fl_input_set_textfont");
pragma Inline (fl_input_set_textfont);
function fl_input_get_textsize
- (I : in System.Address)
+ (I : in Storage.Integer_Address)
return Interfaces.C.int;
pragma Import (C, fl_input_get_textsize, "fl_input_get_textsize");
pragma Inline (fl_input_get_textsize);
procedure fl_input_set_textsize
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
T : in Interfaces.C.int);
pragma Import (C, fl_input_set_textsize, "fl_input_set_textsize");
pragma Inline (fl_input_set_textsize);
@@ -283,7 +281,7 @@ package body FLTK.Widgets.Inputs is
procedure fl_input_set_size
- (I : in System.Address;
+ (I : in Storage.Integer_Address;
W, H : in Interfaces.C.int);
pragma Import (C, fl_input_set_size, "fl_input_set_size");
pragma Inline (fl_input_set_size);
@@ -292,12 +290,12 @@ package body FLTK.Widgets.Inputs is
procedure fl_input_draw
- (W : in System.Address);
+ (W : in Storage.Integer_Address);
pragma Import (C, fl_input_draw, "fl_input_draw");
pragma Inline (fl_input_draw);
function fl_input_handle
- (W : in System.Address;
+ (W : in Storage.Integer_Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_input_handle, "fl_input_handle");
@@ -309,13 +307,13 @@ package body FLTK.Widgets.Inputs is
procedure Finalize
(This : in out Input) is
begin
- if This.Void_Ptr /= System.Null_Address and then
+ if This.Void_Ptr /= Null_Pointer and then
This in Input'Class
then
if This.Needs_Dealloc then
free_fl_input (This.Void_Ptr);
end if;
- This.Void_Ptr := System.Null_Address;
+ This.Void_Ptr := Null_Pointer;
end if;
Finalize (Widget (This));
end Finalize;
@@ -339,9 +337,9 @@ package body FLTK.Widgets.Inputs is
Interfaces.C.To_C (Text));
fl_widget_set_user_data
(This.Void_Ptr,
- Widget_Convert.To_Address (This'Unchecked_Access));
- input_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
- input_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
+ Storage.To_Integer (Widget_Convert.To_Address (This'Unchecked_Access)));
+ input_set_draw_hook (This.Void_Ptr, Storage.To_Integer (Draw_Hook'Address));
+ 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;