diff options
Diffstat (limited to 'src/fltk-widgets-groups-text_displays-text_editors.adb')
-rw-r--r-- | src/fltk-widgets-groups-text_displays-text_editors.adb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fltk-widgets-groups-text_displays-text_editors.adb b/src/fltk-widgets-groups-text_displays-text_editors.adb index 06564ef..afe4dd4 100644 --- a/src/fltk-widgets-groups-text_displays-text_editors.adb +++ b/src/fltk-widgets-groups-text_displays-text_editors.adb @@ -12,10 +12,20 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is (W, D : in System.Address); pragma Import (C, text_editor_set_draw_hook, "text_editor_set_draw_hook"); + procedure text_editor_set_handle_hook + (W, H : in System.Address); + pragma Import (C, text_editor_set_handle_hook, "text_editor_set_handle_hook"); + procedure fl_text_editor_draw (W : in System.Address); pragma Import (C, fl_text_editor_draw, "fl_text_editor_draw"); + function fl_text_editor_handle + (W : in System.Address; + E : in Interfaces.C.int) + return Interfaces.C.int; + pragma Import (C, fl_text_editor_handle, "fl_text_editor_handle"); + function new_fl_text_editor (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) @@ -82,6 +92,18 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is + function Handle + (This : in out Text_Editor; + Event : in Event_Kind) + return Event_Outcome is + begin + return Event_Outcome'Val + (fl_text_editor_handle (This.Void_Ptr, Event_Kind'Pos (Event))); + end Handle; + + + + procedure Finalize (This : in out Text_Editor) is begin @@ -115,6 +137,7 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is (This.Void_Ptr, Widget_Convert.To_Address (This'Unchecked_Access)); text_editor_set_draw_hook (This.Void_Ptr, Draw_Hook'Address); + text_editor_set_handle_hook (This.Void_Ptr, Handle_Hook'Address); end return; end Create; |