From 3f1a529a3b82c322678163cb70a8884fdf3eb920 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 4 Oct 2016 18:52:32 +1100 Subject: Basic find functionality working --- fltk-widgets-inputs.adb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'fltk-widgets-inputs.adb') diff --git a/fltk-widgets-inputs.adb b/fltk-widgets-inputs.adb index 17ab621..9af8e87 100644 --- a/fltk-widgets-inputs.adb +++ b/fltk-widgets-inputs.adb @@ -1,6 +1,7 @@ with Interfaces.C; +with Interfaces.C.Strings; with System; use type System.Address; @@ -18,6 +19,11 @@ package body FLTK.Widgets.Inputs is (F : in System.Address); pragma Import (C, free_fl_input, "free_fl_input"); + function fl_input_get_value + (F : in System.Address) + return Interfaces.C.Strings.chars_ptr; + pragma Import (C, fl_input_get_value, "fl_input_get_value"); + @@ -54,5 +60,15 @@ package body FLTK.Widgets.Inputs is end Create; + + + function Get_Value + (This : in Input) + return String is + begin + return Interfaces.C.Strings.Value (fl_input_get_value (This.Void_Ptr)); + end Get_Value; + + end FLTK.Widgets.Inputs; -- cgit