From 2bc98da4d5b964de2d0d5e40927aa777704f2f29 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Mon, 3 Feb 2025 14:38:29 +1300 Subject: More test programs added: button, buttons, clock, color_chooser, cursor, curve, hello --- body/fltk.adb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'body/fltk.adb') diff --git a/body/fltk.adb b/body/fltk.adb index d729364..0e391e3 100644 --- a/body/fltk.adb +++ b/body/fltk.adb @@ -23,6 +23,12 @@ package body FLTK is pragma Import (C, fl_enum_rgb_color, "fl_enum_rgb_color"); pragma Inline (fl_enum_rgb_color); + function fl_enum_contrast + (F, B : in Interfaces.C.unsigned) + return Interfaces.C.unsigned; + pragma Import (C, fl_enum_contrast, "fl_enum_contrast"); + pragma Inline (fl_enum_contrast); + @@ -120,6 +126,16 @@ package body FLTK is end RGB_Color; + function Contrast + (Fore, Back : in Color) + return Color is + begin + return Color (fl_enum_contrast + (Interfaces.C.unsigned (Fore), + Interfaces.C.unsigned (Back))); + end Contrast; + + function "+" -- cgit