diff options
Diffstat (limited to 'body/fltk-images-pixmaps-xpm.adb')
-rw-r--r-- | body/fltk-images-pixmaps-xpm.adb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/body/fltk-images-pixmaps-xpm.adb b/body/fltk-images-pixmaps-xpm.adb index 006c8b4..beeb1d2 100644 --- a/body/fltk-images-pixmaps-xpm.adb +++ b/body/fltk-images-pixmaps-xpm.adb @@ -12,6 +12,10 @@ with package body FLTK.Images.Pixmaps.XPM is + ------------------------ + -- Functions From C -- + ------------------------ + function new_fl_xpm_image (F : in Interfaces.C.char_array) return Storage.Integer_Address; @@ -26,6 +30,10 @@ package body FLTK.Images.Pixmaps.XPM is + ------------------- + -- Destructors -- + ------------------- + overriding procedure Finalize (This : in out XPM_Image) is begin @@ -39,7 +47,7 @@ package body FLTK.Images.Pixmaps.XPM is -------------------- - -- Construction -- + -- Constructors -- -------------------- package body Forge is @@ -51,12 +59,7 @@ package body FLTK.Images.Pixmaps.XPM is return This : XPM_Image do This.Void_Ptr := new_fl_xpm_image (Interfaces.C.To_C (Filename)); - case fl_image_fail (This.Void_Ptr) is - when 1 => raise No_Image_Error; - when 2 => raise File_Access_Error; - when 3 => raise Format_Error; - when others => null; - end case; + Raise_Fail_Errors (This); end return; end Create; @@ -65,3 +68,4 @@ package body FLTK.Images.Pixmaps.XPM is end FLTK.Images.Pixmaps.XPM; + |