-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApiDefinition.cs
252 lines (195 loc) · 7.42 KB
/
ApiDefinition.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
using System;
using System.Drawing;
using MonoTouch.ObjCRuntime;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace MWPhotoBrowser {
[BaseType (typeof (UIToolbar))]
public partial interface MWCaptionView {
[Export ("initWithPhoto:")]
IntPtr Constructor (MWPhoto photo);
[Export ("setupCaption")]
void SetupCaption ();
[Export ("sizeThatFits:")]
SizeF SizeThatFits (SizeF size);
}
[BaseType (typeof (NSObject))]
public partial interface MWPhoto {
[Export ("caption", ArgumentSemantic.Retain)]
string Caption { get; set; }
[Export ("image")]
UIImage Image { get; }
[Export ("photoURL")]
NSUrl PhotoURL { get; }
[Export ("filePath")]
string FilePath { get; }
[Static, Export ("photoWithImage:")]
MWPhoto PhotoWithImage (UIImage image);
[Static, Export ("photoWithFilePath:")]
MWPhoto PhotoWithFilePath (string path);
[Static, Export ("photoWithURL:")]
MWPhoto PhotoWithURL (NSUrl url);
[Export ("initWithImage:")]
IntPtr Constructor (UIImage image);
[Export ("initWithURL:")]
IntPtr Constructor (NSUrl url);
[Export ("initWithFilePath:")]
IntPtr Constructor (string path);
[Export ("underlyingImage", ArgumentSemantic.Retain)]
UIImage UnderlyingImage { get; set; }
[Export ("loadUnderlyingImageAndNotify")]
void LoadUnderlyingImageAndNotify ();
[Export ("performLoadUnderlyingImageAndNotify")]
void PerformLoadUnderlyingImageAndNotify ();
[Export ("unloadUnderlyingImage")]
void UnloadUnderlyingImage ();
[Export ("cancelAnyLoading")]
void CancelAnyLoading ();
}
[Model, BaseType (typeof (NSObject)), Protocol]
public partial interface MWPhotoBrowserDelegate {
[Export ("numberOfPhotosInPhotoBrowser:")]
int numberOfPhotosInPhotoBrowser(MWPhotoBrowser photoBrowser);
[Export ("photoBrowser:photoAtIndex:")]
MWPhoto PhotoAtIndex (MWPhotoBrowser photoBrowser, uint index);
[Export ("photoBrowser:thumbPhotoAtIndex:")]
MWPhoto ThumbPhotoAtIndex (MWPhotoBrowser photoBrowser, uint index);
[Export ("photoBrowser:captionViewForPhotoAtIndex:")]
MWCaptionView CaptionViewForPhotoAtIndex (MWPhotoBrowser photoBrowser, uint index);
[Export ("photoBrowser:didDisplayPhotoAtIndex:")]
void DidDisplayPhotoAtIndex (MWPhotoBrowser photoBrowser, uint index);
[Export ("photoBrowser:actionButtonPressedForPhotoAtIndex:")]
void ActionButtonPressedForPhotoAtIndex (MWPhotoBrowser photoBrowser, uint index);
[Export ("photoBrowser:isPhotoSelectedAtIndex:")]
bool IsPhotoSelectedAtIndex (MWPhotoBrowser photoBrowser, uint index);
[Export ("photoBrowser:photoAtIndex:selectedChanged:")]
void PhotoAtIndex (MWPhotoBrowser photoBrowser, uint index, bool selected);
}
[BaseType (typeof (UIViewController))]
public partial interface MWPhotoBrowser{ //: UIScrollViewDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate {
[Export ("delegate", ArgumentSemantic.Assign)]
MWPhotoBrowserDelegate Delegate { get; set; }
[Export ("zoomPhotosToFill")]
bool ZoomPhotosToFill { get; set; }
[Export ("displayNavArrows")]
bool DisplayNavArrows { get; set; }
[Export ("displayActionButton")]
bool DisplayActionButton { get; set; }
[Export ("displaySelectionButtons")]
bool DisplaySelectionButtons { get; set; }
[Export ("alwaysShowControls")]
bool AlwaysShowControls { get; set; }
[Export ("enableGrid")]
bool EnableGrid { get; set; }
[Export ("startOnGrid")]
bool StartOnGrid { get; set; }
[Export ("currentIndex")]
uint CurrentIndex { get; }
[Export ("initWithPhotos:")]
IntPtr Constructor (NSObject [] photosArray);
[Export ("initWithDelegate:")]
IntPtr Constructor (MWPhotoBrowserDelegate mwPhotoBrowserDelegate);
[Export ("reloadData")]
void ReloadData ();
[Export ("currentPhotoIndex")]
uint CurrentPhotoIndex { set; }
[Export ("initialPageIndex")]
uint InitialPageIndex { set; }
[Export ("changeBackgroundColor:")]
void ChangeBackgroundColor (UIColor color);
[Export ("changeNavigationBarTintColor:")]
void ChangeNavigationBarTintColor (UIColor color);
[Export ("changeNavigationBarBackgroundTintColor:")]
void ChangeNavigationBarBackgroundTintColor (UIColor color);
[Export ("changeNavigationBarBackgroundImage:")]
void ChangeNavigationBarBackgroundImage (UIImage image);
[Export ("changeToolbarBackgroundTintColor:")]
void ChangeToolbarBackgroundTintColor (UIColor color);
[Export ("changeToolbarTintColor:")]
void ChangeToolbarTintColor (UIColor color);
[Export ("changeToolbarBackgroundImage:")]
void ChangeToolbarBackgroundImage (UIImage image);
[Export ("showNextPhotoAnimated:")]
void ShowNextPhotoAnimated (bool animated);
[Export ("showPreviousPhotoAnimated:")]
void ShowPreviousPhotoAnimated (bool animated);
}
}
//namespace SDWebImage
//{
// [BaseType (typeof (UIView))]
// [Model]
// interface SDWebImageManagerDelegate
// {
// [Export ("webImageManager:didProgressWithPartialImage:forURL:userInfo:")]
// void DidProgressWithPartialImage (SDWebImageManager imageManager, UIImage image, NSUrl url, NSDictionary info);
//
// [Export ("webImageManager:didProgressWithPartialImage:forURL:")]
// void DidProgressWithPartialImage (SDWebImageManager imageManager, UIImage image, NSUrl url);
//
// [Export ("webImageManager:didFinishWithImage:forURL:userInfo:")]
// void DidFinishWithImage (SDWebImageManager imageManager, UIImage image, NSUrl url, NSDictionary info);
//
// [Export ("webImageManager:didFinishWithImage:forURL:")]
// void DidFinishWithImage (SDWebImageManager imageManager, UIImage image, NSUrl url);
//
// [Export ("webImageManager:didFinishWithImage:")]
// void DidFinishWithImage (SDWebImageManager imageManager, UIImage image);
//
// [Export ("webImageManager:didFailWithError:forURL:userInfo:")]
// void DidFailWithError (SDWebImageManager imageManager, NSError error, NSUrl url, NSDictionary info);
//
// [Export ("webImageManager:didFailWithError:forURL:")]
// void DidFailWithError (SDWebImageManager imageManager, NSError error, NSUrl url);
//
// [Export ("webImageManager:didFailWithError:")]
// void DidFailWithError (SDWebImageManager imageManager, NSError error);
// }
//
// public delegate void SDWebImageSuccessBlock (UIImage image, bool cached);
// public delegate void SDWebImageFailureBlock (NSError error);
//
// [BaseType (typeof (NSObject))]
// interface SDWebImageManager
// {
// [Static, Export ("sharedManager")]
// SDWebImageManager SharedManager { get; }
//
// [Export ("cancelForDelegate:")]
// void CancelForDelegate (NSObject del);
//
// [Bind ("setImageWithURL:")]
// void SetImage ([Target] UIImageView view, NSUrl url);
//
// [Bind ("setImageWithURL:")]
// void SetImage ([Target] UIButton view, NSUrl url);
//
// [Bind ("setBackgroundImageWithURL:")]
// void SetBackgroundImage ([Target] UIButton view, NSUrl url);
//
// [Export ("downloadWithURL:delegate:options:")]
// void Download (NSUrl url, NSObject del, SDWebImageOptions options);
//
// [Export ("downloadWithURL:delegate:options:success:failure:")]
// void Download (NSUrl url, [NullAllowed]NSObject del, SDWebImageOptions options, SDWebImageSuccessBlock success, SDWebImageFailureBlock failure);
// }
//
// [BaseType (typeof (NSObject))]
// interface SDImageCache
// {
// [Static, Export("sharedImageCache")]
// SDImageCache SharedImageCache { get; }
//
// [Static, Export ("setMaxCacheAge:")]
// void SetMaxCacheAge (int age);
//
// [Export("cleanDisk")]
// void CleanDisk();
//
// [Export("clearDisk")]
// void ClearDisk();
//
// [Export("getSize")]
// int GetSize();
// }
//}