diff options
Diffstat (limited to 'body/fltk-widgets-buttons.adb')
-rw-r--r-- | body/fltk-widgets-buttons.adb | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/body/fltk-widgets-buttons.adb b/body/fltk-widgets-buttons.adb index 1e7ef60..2d1e169 100644 --- a/body/fltk-widgets-buttons.adb +++ b/body/fltk-widgets-buttons.adb @@ -17,6 +17,8 @@ package body FLTK.Widgets.Buttons is -- Functions From C -- ------------------------ + -- Allocation -- + function new_fl_button (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) @@ -32,6 +34,8 @@ package body FLTK.Widgets.Buttons is + -- State -- + function fl_button_get_state (B : in Storage.Integer_Address) return Interfaces.C.int; @@ -52,6 +56,8 @@ package body FLTK.Widgets.Buttons is + -- Settings -- + function fl_button_get_down_box (B : in Storage.Integer_Address) return Interfaces.C.int; @@ -79,6 +85,8 @@ package body FLTK.Widgets.Buttons is + -- Drawing, Events -- + procedure fl_button_draw (W : in Storage.Integer_Address); pragma Import (C, fl_button_draw, "fl_button_draw"); @@ -94,6 +102,8 @@ package body FLTK.Widgets.Buttons is + -- Miscellaneous -- + procedure fl_button_simulate_key_action (B : in Storage.Integer_Address); pragma Import (C, fl_button_simulate_key_action, "fl_button_simulate_key_action"); @@ -106,22 +116,6 @@ package body FLTK.Widgets.Buttons is -- Destructors -- ------------------- - -- Clipper route successfully navigated - procedure button_extra_final_hook - (Ada_Obj : in Storage.Integer_Address); - pragma Export (C, button_extra_final_hook, "button_extra_final_hook"); - - procedure button_extra_final_hook - (Ada_Obj : in Storage.Integer_Address) - is - My_Button : Button; - for My_Button'Address use Storage.To_Address (Ada_Obj); - pragma Import (Ada, My_Button); - begin - Extra_Final (My_Button); - end button_extra_final_hook; - - procedure Extra_Final (This : in out Button) is begin @@ -196,11 +190,11 @@ package body FLTK.Widgets.Buttons is begin return This : Button do This.Void_Ptr := new_fl_button - (Interfaces.C.int (X), - Interfaces.C.int (Y), - Interfaces.C.int (W), - Interfaces.C.int (H), - Interfaces.C.To_C (Text)); + (Interfaces.C.int (X), + Interfaces.C.int (Y), + Interfaces.C.int (W), + Interfaces.C.int (H), + Interfaces.C.To_C (Text)); Extra_Init (This, X, Y, W, H, Text); end return; end Create; @@ -226,6 +220,8 @@ package body FLTK.Widgets.Buttons is -- API Subprograms -- ----------------------- + -- State -- + function Is_On (This : in Button) return Boolean is @@ -259,6 +255,8 @@ package body FLTK.Widgets.Buttons is + -- Settings -- + function Get_Down_Box (This : in Button) return Box_Kind is @@ -279,7 +277,7 @@ package body FLTK.Widgets.Buttons is (This : in Button) return Key_Combo is begin - return To_Ada (fl_button_get_shortcut (This.Void_Ptr)); + return To_Ada (Interfaces.C.unsigned (fl_button_get_shortcut (This.Void_Ptr))); end Get_Shortcut; @@ -293,6 +291,8 @@ package body FLTK.Widgets.Buttons is + -- Drawing, Events -- + procedure Draw (This : in out Button) is begin @@ -311,6 +311,8 @@ package body FLTK.Widgets.Buttons is + -- Miscellaneous -- + procedure Simulate_Key_Action (This : in out Button) is begin |