summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-menus.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-20 00:42:19 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-20 00:42:19 +1300
commit82eb9509e9e273e8e9e7e584553ccc49f476d4a3 (patch)
treefcd903955511ba8798e76f76154c4d5b841ad6a5 /src/fltk-widgets-menus.adb
parentf27eb859eff94ec9c13239daee15f60ffecde089 (diff)
Filled holes in Fl_Text_Editor binding and make key/modifier/shortcut/flag representations more in line with C++
Diffstat (limited to 'src/fltk-widgets-menus.adb')
-rw-r--r--src/fltk-widgets-menus.adb37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/fltk-widgets-menus.adb b/src/fltk-widgets-menus.adb
index 3e5df01..034cd4c 100644
--- a/src/fltk-widgets-menus.adb
+++ b/src/fltk-widgets-menus.adb
@@ -14,7 +14,6 @@ with
use type
Interfaces.C.int,
- Interfaces.C.unsigned_long,
Interfaces.C.Strings.chars_ptr;
@@ -68,9 +67,9 @@ package body FLTK.Widgets.Menus is
function fl_menu_add2
(M : in Storage.Integer_Address;
T : in Interfaces.C.char_array;
- S : in Interfaces.C.unsigned_long;
+ S : in Interfaces.C.int;
U : in Storage.Integer_Address;
- F : in Interfaces.C.unsigned_long)
+ F : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_menu_add2, "fl_menu_add2");
pragma Inline (fl_menu_add2);
@@ -79,7 +78,7 @@ package body FLTK.Widgets.Menus is
(M : in Storage.Integer_Address;
T, S : in Interfaces.C.char_array;
U : in Storage.Integer_Address;
- F : in Interfaces.C.unsigned_long)
+ F : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_menu_add3, "fl_menu_add3");
pragma Inline (fl_menu_add3);
@@ -88,9 +87,9 @@ package body FLTK.Widgets.Menus is
(M : in Storage.Integer_Address;
P : in Interfaces.C.int;
T : in Interfaces.C.char_array;
- S : in Interfaces.C.unsigned_long;
+ S : in Interfaces.C.int;
U : in Storage.Integer_Address;
- F : in Interfaces.C.unsigned_long)
+ F : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_menu_insert, "fl_menu_insert");
pragma Inline (fl_menu_insert);
@@ -100,7 +99,7 @@ package body FLTK.Widgets.Menus is
P : in Interfaces.C.int;
T, S : in Interfaces.C.char_array;
U : in Storage.Integer_Address;
- F : in Interfaces.C.unsigned_long)
+ F : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_menu_insert2, "fl_menu_insert2");
pragma Inline (fl_menu_insert2);
@@ -230,21 +229,21 @@ package body FLTK.Widgets.Menus is
procedure fl_menu_shortcut
(M : in Storage.Integer_Address;
I : in Interfaces.C.int;
- S : in Interfaces.C.unsigned_long);
+ S : in Interfaces.C.int);
pragma Import (C, fl_menu_shortcut, "fl_menu_shortcut");
pragma Inline (fl_menu_shortcut);
function fl_menu_get_mode
(M : in Storage.Integer_Address;
I : in Interfaces.C.int)
- return Interfaces.C.unsigned_long;
+ return Interfaces.C.int;
pragma Import (C, fl_menu_get_mode, "fl_menu_get_mode");
pragma Inline (fl_menu_get_mode);
procedure fl_menu_set_mode
(M : in Storage.Integer_Address;
I : in Interfaces.C.int;
- F : in Interfaces.C.unsigned_long);
+ F : in Interfaces.C.int);
pragma Import (C, fl_menu_set_mode, "fl_menu_set_mode");
pragma Inline (fl_menu_set_mode);
@@ -577,7 +576,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
end Add;
@@ -596,7 +595,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
return Index (Added_Spot + 1);
@@ -615,7 +614,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
Interfaces.C.To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
end Add;
@@ -634,7 +633,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
Interfaces.C.To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
return Index (Added_Spot + 1);
@@ -655,7 +654,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
end Insert;
@@ -676,7 +675,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
return Index (Added_Spot + 1);
@@ -697,7 +696,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
Interfaces.C.To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
end Insert;
@@ -718,7 +717,7 @@ package body FLTK.Widgets.Menus is
Interfaces.C.To_C (Text),
Interfaces.C.To_C (Shortcut),
Callback_Convert.To_Address (Action),
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
begin
This.Adjust_Item_Store;
return Index (Added_Spot + 1);
@@ -1169,7 +1168,7 @@ package body FLTK.Widgets.Menus is
fl_menu_set_mode
(This.Void_Ptr,
Interfaces.C.int (Place) - 1,
- Interfaces.C.unsigned_long (Flags));
+ Interfaces.C.int (Flags));
end Set_Flags;