summaryrefslogtreecommitdiff
path: root/src/fltk-devices-surface.ads
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2024-12-23 17:02:34 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2024-12-23 17:02:34 +1300
commitb3f9e96403aa5cb9d7db2330aa579356d1d58b6f (patch)
treea2f6b68e3582b128e3a7e475757696f156084962 /src/fltk-devices-surface.ads
parentdb014c7a249b319e40052f2cff6305b0d09d7ca5 (diff)
Tweaked the names of Surface_Device subhierarchy
Diffstat (limited to 'src/fltk-devices-surface.ads')
-rw-r--r--src/fltk-devices-surface.ads65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/fltk-devices-surface.ads b/src/fltk-devices-surface.ads
new file mode 100644
index 0000000..8ca367c
--- /dev/null
+++ b/src/fltk-devices-surface.ads
@@ -0,0 +1,65 @@
+
+
+-- Programmed by Jedidiah Barber
+-- Released into the public domain
+
+
+with
+
+ FLTK.Devices.Graphics;
+
+
+package FLTK.Devices.Surface is
+
+
+ pragma Elaborate_Body (FLTK.Devices.Surface);
+
+
+
+
+ type Surface_Device is new Device with private;
+
+ type Surface_Device_Reference (Data : not null access Surface_Device'Class) is
+ limited null record with Implicit_Dereference => Data;
+
+
+
+
+ package Forge is
+
+ function Create
+ (Graphics : in out FLTK.Devices.Graphics.Graphics_Driver)
+ return Surface_Device;
+
+ end Forge;
+
+
+
+
+ function Get_Current
+ return access Surface_Device'Class;
+
+ procedure Set_Current
+ (This : in out Surface_Device);
+
+
+private
+
+
+ type Surface_Device is new Device with null record;
+
+ overriding procedure Finalize
+ (This : in out Surface_Device);
+
+
+ Original_Surface : aliased Surface_Device;
+ Current_Ptr : access Surface_Device'Class := Original_Surface'Access;
+
+
+ pragma Inline (Get_Current);
+ pragma Inline (Set_Current);
+
+
+end FLTK.Devices.Surface;
+
+