diff options
author | Jed Barber <jjbarber@y7mail.com> | 2018-03-01 18:08:56 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2018-03-01 18:08:56 +1100 |
commit | 77ac8c71bc7c3ab4b04e1c22df8b2e9ec7ddd28a (patch) | |
tree | b94dea312526624ad2a33155705b886f1c106103 /src/fltk-widgets-clocks.ads | |
parent | 577c8306c16b756ba1bf0106b300cc5dc8af21bc (diff) |
Added FLTK.Widgets.Clocks
Diffstat (limited to 'src/fltk-widgets-clocks.ads')
-rw-r--r-- | src/fltk-widgets-clocks.ads | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/src/fltk-widgets-clocks.ads b/src/fltk-widgets-clocks.ads new file mode 100644 index 0000000..d78fd45 --- /dev/null +++ b/src/fltk-widgets-clocks.ads @@ -0,0 +1,76 @@ + + +package FLTK.Widgets.Clocks is + + + type Clock is new Widget with private; + + subtype Hour is Integer range 0 .. 23; + subtype Minute is Integer range 0 .. 59; + subtype Second is Integer range 0 .. 60; + + type Time_Value is mod 2 ** 32; + + + + + function Create + (X, Y, W, H : in Integer; + Text : in String) + return Clock; + + + + + function Get_Hour + (This : in Clock) + return Hour; + + function Get_Minute + (This : in Clock) + return Minute; + + function Get_Second + (This : in Clock) + return Second; + + + + + function Get_Time + (This : in Clock) + return Time_Value; + + procedure Set_Time + (This : in out Clock; + To : in Time_Value); + + procedure Set_Time + (This : in out Clock; + Hours : in Hour; + Minutes : in Minute; + Seconds : in Second); + + + + + procedure Draw + (This : in out Clock); + + function Handle + (This : in out Clock; + Event : in Event_Kind) + return Event_Outcome; + + +private + + + type Clock is new Widget with null record; + + overriding procedure Finalize + (This : in out Clock); + + +end FLTK.Widgets.Clocks; + |