| 1 | package LibUI::Control 0.01 { | ||
| 2 | 1 | ▶ | use 5.008001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use lib '../lib', '../blib/arch', '../blib/lib'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use Affix; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use LibUI; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 8 | $|++; | ||
| 9 | # | ||
| 10 | { | ||
| 11 | typedef 'LibUI::Control' => Struct [ | ||
| 12 | Signature => ULong, | ||
| 13 | OSSignature => ULong, | ||
| 14 | TypeSignature => ULong, | ||
| 15 | Destroy => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Void ], | ||
| 16 | Handle => | ||
| 17 | CodeRef [ [ InstanceOf ['LibUI::Control'] ] => InstanceOf ['LibUI::Control'] ], | ||
| 18 | Parent => | ||
| 19 | CodeRef [ [ InstanceOf ['LibUI::Control'] ] => InstanceOf ['LibUI::Control'] ], | ||
| 20 | SetParent => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Void ], | ||
| 21 | Toplevel => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Int ], | ||
| 22 | Visible => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Int ], | ||
| 23 | Show => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Void ], | ||
| 24 | Hide => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Void ], | ||
| 25 | Enabled => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Int ], | ||
| 26 | Enable => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Void ], | ||
| 27 | Disable => CodeRef [ [ InstanceOf ['LibUI::Control'] ] => Void ] | ||
| 28 | ]; | ||
| 29 | # | ||
| 30 | affix( | ||
| 31 | LibUI::lib(), 'uiControlDestroy', [ InstanceOf ['LibUI::Control'] ] => Void, | ||
| 32 | 'Destroy' | ||
| 33 | ); | ||
| 34 | affix( LibUI::lib(), 'uiControlHandle', | ||
| 35 | [ InstanceOf ['LibUI::Control'] ] => Pointer [UInt] ); | ||
| 36 | affix( LibUI::lib(), 'uiControlParent', | ||
| 37 | [ InstanceOf ['LibUI::Control'] ] => InstanceOf ['LibUI::Control'] ); | ||
| 38 | affix( LibUI::lib(), 'uiControlSetParent', | ||
| 39 | [ InstanceOf ['LibUI::Control'], InstanceOf ['LibUI::Control'] ] => Void ); | ||
| 40 | affix( LibUI::lib(), 'uiControlToplevel', [ InstanceOf ['LibUI::Control'] ] => Int ); | ||
| 41 | affix( LibUI::lib(), 'uiControlVisible', [ InstanceOf ['LibUI::Control'] ] => Int ); | ||
| 42 | affix( LibUI::lib(), 'uiControlShow', [ InstanceOf ['LibUI::Control'] ] => Void, 'show' ); | ||
| 43 | affix( LibUI::lib(), 'uiControlHide', [ InstanceOf ['LibUI::Control'] ] => Void ); | ||
| 44 | affix( LibUI::lib(), 'uiControlEnabled', [ InstanceOf ['LibUI::Control'] ] => Int ); | ||
| 45 | affix( LibUI::lib(), 'uiControlEnable', [ InstanceOf ['LibUI::Control'] ] => Void ); | ||
| 46 | affix( LibUI::lib(), 'uiControlDisable', [ InstanceOf ['LibUI::Control'] ] => Void ); | ||
| 47 | affix( LibUI::lib(), 'uiAllocControl', | ||
| 48 | [ Size_t, ULong, ULong, Str ] => InstanceOf ['LibUI::Control'] ); | ||
| 49 | affix( LibUI::lib(), 'uiFreeControl', [ InstanceOf ['LibUI::Control'] ] => Void ); | ||
| 50 | # | ||
| 51 | affix( LibUI::lib(), 'uiControlVerifySetParent', | ||
| 52 | [ InstanceOf ['LibUI::Control'], InstanceOf ['LibUI::Control'] ] => Void ); | ||
| 53 | affix( LibUI::lib(), 'uiControlEnabledToUser', [ InstanceOf ['LibUI::Control'] ] => Int ); | ||
| 54 | |||
| 55 | # Upstream TODO: Move this to private API? According to old/new.md this should be used by toplevel controls. | ||
| 56 | affix( LibUI::lib(), 'uiUserBugCannotSetParentOnToplevel', [Str] => Void ); | ||
| 57 | } | ||
| 58 | }; | ||
| 59 | 1; | ||
| 60 | # | ||
| 61 | __END__ | ||