summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-groups-text_displays.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk-widgets-groups-text_displays.adb')
-rw-r--r--src/fltk-widgets-groups-text_displays.adb23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fltk-widgets-groups-text_displays.adb b/src/fltk-widgets-groups-text_displays.adb
index 9c571d3..e805ff5 100644
--- a/src/fltk-widgets-groups-text_displays.adb
+++ b/src/fltk-widgets-groups-text_displays.adb
@@ -13,10 +13,20 @@ package body FLTK.Widgets.Groups.Text_Displays is
(W, D : in System.Address);
pragma Import (C, text_display_set_draw_hook, "text_display_set_draw_hook");
+ procedure text_display_set_handle_hook
+ (W, H : in System.Address);
+ pragma Import (C, text_display_set_handle_hook, "text_display_set_handle_hook");
+
procedure fl_text_display_draw
(W : in System.Address);
pragma Import (C, fl_text_display_draw, "fl_text_display_draw");
+ function fl_text_display_handle
+ (W : in System.Address;
+ E : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_text_display_handle, "fl_text_display_handle");
+
function new_fl_text_display
(X, Y, W, H : in Interfaces.C.int;
Label : in Interfaces.C.char_array)
@@ -140,6 +150,18 @@ package body FLTK.Widgets.Groups.Text_Displays is
+ function Handle
+ (This : in out Text_Display;
+ Event : in Event_Kind)
+ return Event_Outcome is
+ begin
+ return Event_Outcome'Val
+ (fl_text_display_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
+ end Handle;
+
+
+
+
procedure Finalize
(This : in out Text_Display) is
begin
@@ -173,6 +195,7 @@ package body FLTK.Widgets.Groups.Text_Displays is
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
text_display_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
+ text_display_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
end return;
end Create;