diff options
Diffstat (limited to 'src/fltk-widgets-buttons-light-round-radio.adb')
-rw-r--r-- | src/fltk-widgets-buttons-light-round-radio.adb | 74 |
1 files changed, 29 insertions, 45 deletions
diff --git a/src/fltk-widgets-buttons-light-round-radio.adb b/src/fltk-widgets-buttons-light-round-radio.adb index eeaee2b..58d92e4 100644 --- a/src/fltk-widgets-buttons-light-round-radio.adb +++ b/src/fltk-widgets-buttons-light-round-radio.adb @@ -16,15 +16,6 @@ package body FLTK.Widgets.Buttons.Light.Round.Radio is (W, H : in System.Address); pragma Import (C, radio_round_button_set_handle_hook, "radio_round_button_set_handle_hook"); - procedure fl_radio_round_button_draw - (W : in System.Address); - pragma Import (C, fl_radio_round_button_draw, "fl_radio_round_button_draw"); - - function fl_radio_round_button_handle - (W : in System.Address; - E : in Interfaces.C.int) - return Interfaces.C.int; - pragma Import (C, fl_radio_round_button_handle, "fl_radio_round_button_handle"); function new_fl_radio_round_button (X, Y, W, H : in Interfaces.C.int; @@ -37,43 +28,15 @@ package body FLTK.Widgets.Buttons.Light.Round.Radio is pragma Import (C, free_fl_radio_round_button, "free_fl_radio_round_button"); + procedure fl_radio_round_button_draw + (W : in System.Address); + pragma Import (C, fl_radio_round_button_draw, "fl_radio_round_button_draw"); - - procedure Draw_Hook (U : in System.Address); - pragma Convention (C, Draw_Hook); - - procedure Draw_Hook - (U : in System.Address) - is - package Radio_Round_Button_Convert is new - System.Address_To_Access_Conversions (Radio_Round_Button'Class); - - Ada_Radio_Round_Button : access Radio_Round_Button'Class := - Radio_Round_Button_Convert.To_Pointer (U); - begin - Ada_Radio_Round_Button.Draw; - end Draw_Hook; - - - - - procedure Draw - (This : in out Radio_Round_Button) is - begin - fl_radio_round_button_draw (This.Void_Ptr); - end Draw; - - - - - function Handle - (This : in out Radio_Round_Button; - Event : in Event_Kind) - return Event_Outcome is - begin - return Event_Outcome'Val - (fl_radio_round_button_handle (This.Void_Ptr, Event_Kind'Pos (Event))); - end Handle; + function fl_radio_round_button_handle + (W : in System.Address; + E : in Interfaces.C.int) + return Interfaces.C.int; + pragma Import (C, fl_radio_round_button_handle, "fl_radio_round_button_handle"); @@ -114,5 +77,26 @@ package body FLTK.Widgets.Buttons.Light.Round.Radio is end Create; + + + procedure Draw + (This : in out Radio_Round_Button) is + begin + fl_radio_round_button_draw (This.Void_Ptr); + end Draw; + + + + + function Handle + (This : in out Radio_Round_Button; + Event : in Event_Kind) + return Event_Outcome is + begin + return Event_Outcome'Val + (fl_radio_round_button_handle (This.Void_Ptr, Event_Kind'Pos (Event))); + end Handle; + + end FLTK.Widgets.Buttons.Light.Round.Radio; |