summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-groups-windows-single-menu.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-groups-windows-single-menu.adb')
-rw-r--r--src/fltk-widgets-groups-windows-single-menu.adb23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fltk-widgets-groups-windows-single-menu.adb b/src/fltk-widgets-groups-windows-single-menu.adb
index 4f62763..6c0a5ef 100644
--- a/src/fltk-widgets-groups-windows-single-menu.adb
+++ b/src/fltk-widgets-groups-windows-single-menu.adb
@@ -13,10 +13,20 @@ package body FLTK.Widgets.Groups.Windows.Single.Menu is
(W, D : in System.Address);
pragma Import (C, menu_window_set_draw_hook, "menu_window_set_draw_hook");
+ procedure menu_window_set_handle_hook
+ (W, H : in System.Address);
+ pragma Import (C, menu_window_set_handle_hook, "menu_window_set_handle_hook");
+
procedure fl_menu_window_draw
(W : in System.Address);
pragma Import (C, fl_menu_window_draw, "fl_menu_window_draw");
+ function fl_menu_window_handle
+ (W : in System.Address;
+ E : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_menu_window_handle, "fl_menu_window_handle");
+
function new_fl_menu_window
(X, Y, W, H : in Interfaces.C.int;
Label : in Interfaces.C.char_array)
@@ -87,6 +97,18 @@ package body FLTK.Widgets.Groups.Windows.Single.Menu is
+ function Handle
+ (This : in out Menu_Window;
+ Event : in Event_Kind)
+ return Event_Outcome is
+ begin
+ return Event_Outcome'Val
+ (fl_menu_window_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
+ end Handle;
+
+
+
+
procedure Finalize
(This : in out Menu_Window) is
begin
@@ -120,6 +142,7 @@ package body FLTK.Widgets.Groups.Windows.Single.Menu is
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
menu_window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
+ menu_window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
end return;
end Create;