diff options
Diffstat (limited to 'src/fltk-widgets-groups-windows.adb')
-rw-r--r-- | src/fltk-widgets-groups-windows.adb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fltk-widgets-groups-windows.adb b/src/fltk-widgets-groups-windows.adb index 866d502..f92a3a5 100644 --- a/src/fltk-widgets-groups-windows.adb +++ b/src/fltk-widgets-groups-windows.adb @@ -13,10 +13,20 @@ package body FLTK.Widgets.Groups.Windows is (W, D : in System.Address); pragma Import (C, window_set_draw_hook, "window_set_draw_hook"); + procedure window_set_handle_hook + (W, H : in System.Address); + pragma Import (C, window_set_handle_hook, "window_set_handle_hook"); + procedure fl_window_draw (W : in System.Address); pragma Import (C, fl_window_draw, "fl_window_draw"); + function fl_window_handle + (W : in System.Address; + E : in Interfaces.C.int) + return Interfaces.C.int; + pragma Import (C, fl_window_handle, "fl_window_handle"); + function new_fl_window (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) @@ -91,6 +101,18 @@ package body FLTK.Widgets.Groups.Windows is + function Handle + (This : in out Window; + Event : in Event_Kind) + return Event_Outcome is + begin + return Event_Outcome'Val + (fl_window_handle (This.Void_Ptr, Event_Kind'Pos (Event))); + end Handle; + + + + procedure Finalize (This : in out Window) is begin @@ -124,6 +146,7 @@ package body FLTK.Widgets.Groups.Windows is (This.Void_Ptr, Widget_Convert.To_Address (This'Unchecked_Access)); window_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); + window_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); end return; end Create; |