|
| 1 | +using System; |
| 2 | +using CoreGraphics; |
| 3 | +using Foundation; |
| 4 | +using ObjCRuntime; |
| 5 | +using UIKit; |
| 6 | + |
| 7 | +namespace MBProgressHUDMaui { |
| 8 | + |
| 9 | + // typedef void (^MBProgressHUDCompletionBlock)(); |
| 10 | + delegate void MBProgressHUDCompletionBlock(); |
| 11 | + |
| 12 | + // @interface MBProgressHUD : UIView |
| 13 | + [BaseType(typeof(UIView))] |
| 14 | + interface MBProgressHUD |
| 15 | + { |
| 16 | + // +(instancetype _Nonnull)showHUDAddedTo:(UIView * _Nonnull)view animated:(BOOL)animated; |
| 17 | + [Static] |
| 18 | + [Export("showHUDAddedTo:animated:")] |
| 19 | + MBProgressHUD ShowHUD(UIView view, bool animated); |
| 20 | + |
| 21 | + // +(BOOL)hideHUDForView:(UIView * _Nonnull)view animated:(BOOL)animated; |
| 22 | + [Static] |
| 23 | + [Export("hideHUDForView:animated:")] |
| 24 | + bool HideHUD(UIView view, bool animated); |
| 25 | + |
| 26 | + // +(MBProgressHUD * _Nullable)HUDForView:(UIView * _Nonnull)view; |
| 27 | + [Static] |
| 28 | + [Export("HUDForView:")] |
| 29 | + [return: NullAllowed] |
| 30 | + MBProgressHUD HUDForView(UIView view); |
| 31 | + |
| 32 | + // -(instancetype _Nonnull)initWithView:(UIView * _Nonnull)view; |
| 33 | + [Export("initWithView:")] |
| 34 | + IntPtr Constructor(UIView view); |
| 35 | + |
| 36 | + // -(void)showAnimated:(BOOL)animated; |
| 37 | + [Export("showAnimated:")] |
| 38 | + void Show(bool animated); |
| 39 | + |
| 40 | + // -(void)hideAnimated:(BOOL)animated; |
| 41 | + [Export("hideAnimated:")] |
| 42 | + void Hide(bool animated); |
| 43 | + |
| 44 | + // -(void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay; |
| 45 | + [Export("hideAnimated:afterDelay:")] |
| 46 | + void Hide(bool animated, double delay); |
| 47 | + |
| 48 | + [Wrap("WeakDelegate")] |
| 49 | + [NullAllowed] |
| 50 | + MBProgressHUDDelegate Delegate { get; set; } |
| 51 | + |
| 52 | + // @property (nonatomic, weak) id<MBProgressHUDDelegate> _Nullable delegate; |
| 53 | + [NullAllowed, Export("delegate", ArgumentSemantic.Weak)] |
| 54 | + NSObject WeakDelegate { get; set; } |
| 55 | + |
| 56 | + // @property (copy) MBProgressHUDCompletionBlock _Nullable completionBlock; |
| 57 | + [NullAllowed, Export("completionBlock", ArgumentSemantic.Copy)] |
| 58 | + MBProgressHUDCompletionBlock CompletionBlock { get; set; } |
| 59 | + |
| 60 | + // @property (assign, nonatomic) NSTimeInterval graceTime; |
| 61 | + [Export("graceTime")] |
| 62 | + double GraceTime { get; set; } |
| 63 | + |
| 64 | + // @property (assign, nonatomic) NSTimeInterval minShowTime; |
| 65 | + [Export("minShowTime")] |
| 66 | + double MinShowTime { get; set; } |
| 67 | + |
| 68 | + // @property (assign, nonatomic) BOOL removeFromSuperViewOnHide; |
| 69 | + [Export("removeFromSuperViewOnHide")] |
| 70 | + bool RemoveFromSuperViewOnHide { get; set; } |
| 71 | + |
| 72 | + // @property (assign, nonatomic) MBProgressHUDMode mode; |
| 73 | + [Export("mode", ArgumentSemantic.Assign)] |
| 74 | + MBProgressHUDMode Mode { get; set; } |
| 75 | + |
| 76 | + // @property (nonatomic, strong) UIColor * _Nullable contentColor __attribute__((annotate("ui_appearance_selector"))); |
| 77 | + [NullAllowed, Export("contentColor", ArgumentSemantic.Strong)] |
| 78 | + UIColor ContentColor { get; set; } |
| 79 | + |
| 80 | + // @property (assign, nonatomic) MBProgressHUDAnimation animationType __attribute__((annotate("ui_appearance_selector"))); |
| 81 | + [Export("animationType", ArgumentSemantic.Assign)] |
| 82 | + MBProgressHUDAnimation AnimationType { get; set; } |
| 83 | + |
| 84 | + // @property (assign, nonatomic) CGPoint offset __attribute__((annotate("ui_appearance_selector"))); |
| 85 | + [Export("offset", ArgumentSemantic.Assign)] |
| 86 | + CGPoint Offset { get; set; } |
| 87 | + |
| 88 | + // @property (assign, nonatomic) CGFloat margin __attribute__((annotate("ui_appearance_selector"))); |
| 89 | + [Export("margin")] |
| 90 | + nfloat Margin { get; set; } |
| 91 | + |
| 92 | + // @property (assign, nonatomic) CGSize minSize __attribute__((annotate("ui_appearance_selector"))); |
| 93 | + [Export("minSize", ArgumentSemantic.Assign)] |
| 94 | + CGSize MinSize { get; set; } |
| 95 | + |
| 96 | + // @property (getter = isSquare, assign, nonatomic) BOOL square __attribute__((annotate("ui_appearance_selector"))); |
| 97 | + [Export("square")] |
| 98 | + bool Square { [Bind("isSquare")] get; set; } |
| 99 | + |
| 100 | + // @property (getter = areDefaultMotionEffectsEnabled, assign, nonatomic) BOOL defaultMotionEffectsEnabled __attribute__((annotate("ui_appearance_selector"))); |
| 101 | + [Export("defaultMotionEffectsEnabled")] |
| 102 | + bool DefaultMotionEffectsEnabled { [Bind("areDefaultMotionEffectsEnabled")] get; set; } |
| 103 | + |
| 104 | + // @property (assign, nonatomic) float progress; |
| 105 | + [Export("progress")] |
| 106 | + float Progress { get; set; } |
| 107 | + |
| 108 | + // @property (nonatomic, strong) NSProgress * _Nullable progressObject; |
| 109 | + [NullAllowed, Export("progressObject", ArgumentSemantic.Strong)] |
| 110 | + NSProgress ProgressObject { get; set; } |
| 111 | + |
| 112 | + // @property (readonly, nonatomic, strong) MBBackgroundView * _Nonnull bezelView; |
| 113 | + [Export("bezelView", ArgumentSemantic.Strong)] |
| 114 | + MBBackgroundView BezelView { get; } |
| 115 | + |
| 116 | + // @property (readonly, nonatomic, strong) MBBackgroundView * _Nonnull backgroundView; |
| 117 | + [Export("backgroundView", ArgumentSemantic.Strong)] |
| 118 | + MBBackgroundView BackgroundView { get; } |
| 119 | + |
| 120 | + // @property (nonatomic, strong) UIView * _Nullable customView; |
| 121 | + [NullAllowed, Export("customView", ArgumentSemantic.Strong)] |
| 122 | + UIView CustomView { get; set; } |
| 123 | + |
| 124 | + // @property (readonly, nonatomic, strong) UILabel * _Nonnull label; |
| 125 | + [Export("label", ArgumentSemantic.Strong)] |
| 126 | + UILabel Label { get; } |
| 127 | + |
| 128 | + // @property (readonly, nonatomic, strong) UILabel * _Nonnull detailsLabel; |
| 129 | + [Export("detailsLabel", ArgumentSemantic.Strong)] |
| 130 | + UILabel DetailsLabel { get; } |
| 131 | + |
| 132 | + // @property (readonly, nonatomic, strong) UIButton * _Nonnull button; |
| 133 | + [Export("button", ArgumentSemantic.Strong)] |
| 134 | + UIButton Button { get; } |
| 135 | + } |
| 136 | + |
| 137 | + // @protocol MBProgressHUDDelegate <NSObject> |
| 138 | + [Protocol, Model] |
| 139 | + [BaseType(typeof(NSObject))] |
| 140 | + interface MBProgressHUDDelegate |
| 141 | + { |
| 142 | + // @optional -(void)hudWasHidden:(MBProgressHUD * _Nonnull)hud; |
| 143 | + [Export("hudWasHidden:")] |
| 144 | + void HudWasHidden(MBProgressHUD hud); |
| 145 | + } |
| 146 | + |
| 147 | + // @interface MBRoundProgressView : UIView |
| 148 | + [BaseType(typeof(UIView))] |
| 149 | + interface MBRoundProgressView |
| 150 | + { |
| 151 | + // @property (assign, nonatomic) float progress; |
| 152 | + [Export("progress")] |
| 153 | + float Progress { get; set; } |
| 154 | + |
| 155 | + // @property (nonatomic, strong) UIColor * _Nonnull progressTintColor; |
| 156 | + [Export("progressTintColor", ArgumentSemantic.Strong)] |
| 157 | + UIColor ProgressTintColor { get; set; } |
| 158 | + |
| 159 | + // @property (nonatomic, strong) UIColor * _Nonnull backgroundTintColor; |
| 160 | + [Export("backgroundTintColor", ArgumentSemantic.Strong)] |
| 161 | + UIColor BackgroundTintColor { get; set; } |
| 162 | + |
| 163 | + // @property (getter = isAnnular, assign, nonatomic) BOOL annular; |
| 164 | + [Export("annular")] |
| 165 | + bool Annular { [Bind("isAnnular")] get; set; } |
| 166 | + } |
| 167 | + |
| 168 | + // @interface MBBarProgressView : UIView |
| 169 | + [BaseType(typeof(UIView))] |
| 170 | + interface MBBarProgressView |
| 171 | + { |
| 172 | + // @property (assign, nonatomic) float progress; |
| 173 | + [Export("progress")] |
| 174 | + float Progress { get; set; } |
| 175 | + |
| 176 | + // @property (nonatomic, strong) UIColor * _Nonnull lineColor; |
| 177 | + [Export("lineColor", ArgumentSemantic.Strong)] |
| 178 | + UIColor LineColor { get; set; } |
| 179 | + |
| 180 | + // @property (nonatomic, strong) UIColor * _Nonnull progressRemainingColor; |
| 181 | + [Export("progressRemainingColor", ArgumentSemantic.Strong)] |
| 182 | + UIColor ProgressRemainingColor { get; set; } |
| 183 | + |
| 184 | + // @property (nonatomic, strong) UIColor * _Nonnull progressColor; |
| 185 | + [Export("progressColor", ArgumentSemantic.Strong)] |
| 186 | + UIColor ProgressColor { get; set; } |
| 187 | + } |
| 188 | + |
| 189 | + // @interface MBBackgroundView : UIView |
| 190 | + [BaseType(typeof(UIView))] |
| 191 | + interface MBBackgroundView |
| 192 | + { |
| 193 | + // @property (nonatomic) MBProgressHUDBackgroundStyle style; |
| 194 | + [Export("style", ArgumentSemantic.Assign)] |
| 195 | + MBProgressHUDBackgroundStyle Style { get; set; } |
| 196 | + |
| 197 | + // @property (nonatomic) UIBlurEffectStyle blurEffectStyle; |
| 198 | + [Export("blurEffectStyle", ArgumentSemantic.Assign)] |
| 199 | + UIBlurEffectStyle BlurEffectStyle { get; set; } |
| 200 | + |
| 201 | + // @property (nonatomic, strong) UIColor * _Nonnull color; |
| 202 | + [Export("color", ArgumentSemantic.Strong)] |
| 203 | + UIColor Color { get; set; } |
| 204 | + } |
| 205 | + |
| 206 | +} |
0 commit comments