summaryrefslogtreecommitdiff
path: root/spec/fltk-widgets-groups-windows-double-cairo.ads
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-21 21:04:54 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-21 21:04:54 +1300
commitb4438b2fbe895694be98e6e8426103deefc51448 (patch)
tree760d86cd7c06420a91dad102cc9546aee73146fc /spec/fltk-widgets-groups-windows-double-cairo.ads
parenta4703a65b015140cd4a7a985db66264875ade734 (diff)
Split public API and private implementation files into different directories
Diffstat (limited to 'spec/fltk-widgets-groups-windows-double-cairo.ads')
-rw-r--r--spec/fltk-widgets-groups-windows-double-cairo.ads115
1 files changed, 115 insertions, 0 deletions
diff --git a/spec/fltk-widgets-groups-windows-double-cairo.ads b/spec/fltk-widgets-groups-windows-double-cairo.ads
new file mode 100644
index 0000000..8073a81
--- /dev/null
+++ b/spec/fltk-widgets-groups-windows-double-cairo.ads
@@ -0,0 +1,115 @@
+
+
+-- Programmed by Jedidiah Barber
+-- Released into the public domain
+
+
+with
+
+ System;
+
+
+package FLTK.Widgets.Groups.Windows.Double.Cairo is
+
+
+ -- If FLTK has not been built with Cairo support then
+ -- this will just be a duplicate of Double_Window and the
+ -- callback set with Set_Cairo_Draw will never be triggered.
+
+ -- Building with Cairo support requires either of
+ -- 1. CMake option FLTK_OPTION_CAIRO_WINDOW
+ -- 2. configure -enable-cairo
+ -- when building FLTK itself.
+
+
+ type Cairo_Window is new Double_Window with private;
+
+ type Cairo_Window_Reference (Data : not null access Cairo_Window'Class) is
+ limited null record with Implicit_Dereference => Data;
+
+ type Cairo_Callback is access procedure
+ (This : in out Cairo_Window;
+ Context : in System.Address);
+
+
+
+
+ package Forge is
+
+ function Create
+ (X, Y, W, H : in Integer;
+ Text : in String := "")
+ return Cairo_Window;
+
+ function Create
+ (Parent : in out Groups.Group'Class;
+ X, Y, W, H : in Integer;
+ Text : in String := "")
+ return Cairo_Window;
+
+ function Create
+ (W, H : in Integer;
+ Text : in String)
+ return Cairo_Window;
+
+ function Create
+ (Parent : in out Groups.Group'Class;
+ W, H : in Integer;
+ Text : in String)
+ return Cairo_Window;
+
+ function Create
+ (W, H : in Integer)
+ return Cairo_Window;
+
+ function Create
+ (Parent : in out Groups.Group'Class;
+ W, H : in Integer)
+ return Cairo_Window;
+
+ end Forge;
+
+
+
+
+ procedure Set_Cairo_Draw
+ (This : in out Cairo_Window;
+ Func : in Cairo_Callback);
+
+
+
+
+ procedure Draw
+ (This : in out Cairo_Window);
+
+
+private
+
+
+ type Cairo_Window is new Double_Window with record
+ My_Func : Cairo_Callback;
+ end record;
+
+ overriding procedure Initialize
+ (This : in out Cairo_Window);
+
+ overriding procedure Finalize
+ (This : in out Cairo_Window);
+
+ procedure Extra_Init
+ (This : in out Cairo_Window;
+ X, Y, W, H : in Integer;
+ Text : in String);
+
+ procedure Extra_Final
+ (This : in out Cairo_Window);
+
+
+ pragma Inline (Set_Cairo_Draw);
+
+ pragma Inline (Draw);
+
+
+end FLTK.Widgets.Groups.Windows.Double.Cairo;
+
+