diff options
Diffstat (limited to 'body/fltk-widgets-groups-windows.adb')
-rw-r--r-- | body/fltk-widgets-groups-windows.adb | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/body/fltk-widgets-groups-windows.adb b/body/fltk-widgets-groups-windows.adb index 3ff2f32..55f3506 100644 --- a/body/fltk-widgets-groups-windows.adb +++ b/body/fltk-widgets-groups-windows.adb @@ -6,10 +6,8 @@ with - Ada.Command_Line, Interfaces.C.Strings, - FLTK.Images.RGB, - FLTK.Show_Argv; + FLTK.Args_Marshal; use type @@ -513,7 +511,7 @@ package body FLTK.Widgets.Groups.Windows is procedure Show_With_Args (This : in out Window) is begin - FLTK.Show_Argv.Dispatch (fl_window_show2'Access, This.Void_Ptr); + FLTK.Args_Marshal.Dispatch (fl_window_show2'Access, This.Void_Ptr); end Show_With_Args; @@ -638,7 +636,9 @@ package body FLTK.Widgets.Groups.Windows is end loop; fl_window_icons (This.Void_Ptr, - Storage.To_Integer (Pointers (Pointers'First)'Address), + (if Pointers'Length > 0 + then Storage.To_Integer (Pointers (Pointers'First)'Address) + else Null_Pointer), Pointers'Length); end Set_Icons; @@ -666,7 +666,9 @@ package body FLTK.Widgets.Groups.Windows is Pointers (Index) := Wrapper (Pics (Index)).Void_Ptr; end loop; fl_window_default_icons - (Storage.To_Integer (Pointers (Pointers'First)'Address), + ((if Pointers'Length > 0 + then Storage.To_Integer (Pointers (Pointers'First)'Address) + else Null_Pointer), Pointers'Length); end Set_Default_Icons; @@ -681,7 +683,7 @@ package body FLTK.Widgets.Groups.Windows is (This : in Window) return String is - Ptr : Interfaces.C.Strings.chars_ptr := fl_window_get_iconlabel (This.Void_Ptr); + Ptr : constant Interfaces.C.Strings.chars_ptr := fl_window_get_iconlabel (This.Void_Ptr); begin if Ptr = Interfaces.C.Strings.Null_Ptr then return ""; @@ -842,7 +844,7 @@ package body FLTK.Widgets.Groups.Windows is (This : in Window) return String is - Ptr : Interfaces.C.Strings.chars_ptr := fl_window_get_label (This.Void_Ptr); + Ptr : constant Interfaces.C.Strings.chars_ptr := fl_window_get_label (This.Void_Ptr); begin if Ptr = Interfaces.C.Strings.Null_Ptr then return ""; @@ -942,7 +944,7 @@ package body FLTK.Widgets.Groups.Windows is (This : in Window) return Boolean is - Result : Interfaces.C.int := fl_window_get_force_position (This.Void_Ptr); + Result : constant Interfaces.C.int := fl_window_get_force_position (This.Void_Ptr); begin return Boolean'Val (Result); exception @@ -1000,7 +1002,7 @@ package body FLTK.Widgets.Groups.Windows is (This : in Window) return String is - Result : Interfaces.C.Strings.chars_ptr := fl_window_get_xclass (This.Void_Ptr); + Result : constant Interfaces.C.Strings.chars_ptr := fl_window_get_xclass (This.Void_Ptr); begin if Result = Interfaces.C.Strings.Null_Ptr then return ""; @@ -1021,7 +1023,7 @@ package body FLTK.Widgets.Groups.Windows is function Get_Default_X_Class return String is - Result : Interfaces.C.Strings.chars_ptr := fl_window_get_default_xclass; + Result : constant Interfaces.C.Strings.chars_ptr := fl_window_get_default_xclass; begin if Result = Interfaces.C.Strings.Null_Ptr then return ""; |