summaryrefslogtreecommitdiff
path: root/src/fltk_binding/fltk.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/fltk_binding/fltk.ads')
-rw-r--r--src/fltk_binding/fltk.ads11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fltk_binding/fltk.ads b/src/fltk_binding/fltk.ads
index c1844a6..fab93e0 100644
--- a/src/fltk_binding/fltk.ads
+++ b/src/fltk_binding/fltk.ads
@@ -20,10 +20,19 @@ package FLTK is
private
+ function Has_Valid_Ptr
+ (This : in Wrapper)
+ return Boolean;
+
+
type Wrapper is abstract new Ada.Finalization.Limited_Controlled with
record
Void_Ptr : System.Address;
- end record;
+ end record
+ with Type_Invariant => Has_Valid_Ptr (Wrapper);
+
+ -- unsure if the above invariant is doing what I'm after
+ -- oh well, something to work on
overriding procedure Initialize