]> git.saurik.com Git - iphone-api.git/blob - UIKit/UIKit.h
Unlocked some more APIs.
[iphone-api.git] / UIKit / UIKit.h
1 #ifndef UIKIT_UIKIT_H_
2 #define UIKIT_UIKIT_H_
3
4 @class NSString;
5
6 #import <Foundation/Foundation.h>
7 #import <GraphicsServices/GraphicsServices.h>
8 #import <CoreGraphics/CoreGraphics.h>
9
10 typedef double UIAccelerationValue;
11
12 /*XXX:*/typedef struct {
13 float top;
14 float left;
15 float bottom;
16 float right;
17 } CDAnonymousStruct2;
18
19 /*XXX:*/typedef struct {
20 unsigned int numberOfRows:7;
21 unsigned int delegateAlertSheetButtonClicked:1;
22 unsigned int delegateDidPresentAlertSheet:1;
23 unsigned int delegateDidDismissAlertSheet:1;
24 unsigned int hideButtonBar:1;
25 unsigned int alertStyle:3;
26 unsigned int dontDimBackground:1;
27 unsigned int dismissSuspended:1;
28 unsigned int dontBlockInteraction:1;
29 unsigned int sheetWasPoppedUp:1;
30 unsigned int animating:1;
31 unsigned int hideWhenDoneAnimating:1;
32 unsigned int layoutWhenDoneAnimating:1;
33 unsigned int titleMaxLineCount:2;
34 unsigned int bodyTextMaxLineCount:3;
35 unsigned int runsModal:1;
36 unsigned int runningModal:1;
37 unsigned int addedTextView:1;
38 unsigned int addedTableShadows:1;
39 unsigned int showOverSBAlerts:1;
40 unsigned int showMinTableContent:1;
41 unsigned int bodyTextTruncated:1;
42 unsigned int orientation:3;
43 unsigned int delegateBodyTextAlignment:1;
44 unsigned int delegateClickedButtonAtIndex:1;
45 unsigned int delegateClickedButtonAtIndex2:1;
46 unsigned int delegateCancel:1;
47 unsigned int delegateCancel2:1;
48 unsigned int delegateWillPresent:1;
49 unsigned int delegateWillPresent2:1;
50 unsigned int delegateDidPresent:1;
51 unsigned int delegateDidPresent2:1;
52 unsigned int delegateWillDismiss:1;
53 unsigned int delegateWillDismiss2:1;
54 unsigned int delegateDidDismiss:1;
55 unsigned int delegateDidDismiss2:1;
56 } CDAnonymousStruct7;
57
58 typedef enum {
59 UIBarButtonItemStylePlain,
60 UIBarButtonItemStyleBordered,
61 UIBarButtonItemStyleDone,
62 } UIBarButtonItemStyle;
63
64 typedef enum {
65 UIBarStyleDefault,
66 UIBarStyleBlackOpaque,
67 UIBarStyleBlackTranslucent,
68 } UIBarStyle;
69
70 typedef enum {
71 UIButtonTypeCustom,
72 UIButtonTypeRoundedRect,
73 UIButtonTypeDetailDisclosure,
74 UIButtonTypeInfoLight,
75 UIButtonTypeInfoDark,
76 UIButtonTypeContactAdd,
77 } UIButtonType;
78
79 enum {
80 UIControlEventTouchDown = 1 << 0,
81 UIControlEventTouchDownRepeat = 1 << 1,
82 UIControlEventTouchDragInside = 1 << 2,
83 UIControlEventTouchDragOutside = 1 << 3,
84 UIControlEventTouchDragEnter = 1 << 4,
85 UIControlEventTouchDragExit = 1 << 5,
86 UIControlEventTouchUpInside = 1 << 6,
87 UIControlEventTouchUpOutside = 1 << 7,
88 UIControlEventTouchCancel = 1 << 8,
89 UIControlEventValueChanged = 1 << 12,
90
91 UIControlEventEditingDidBegin = 1 << 16,
92 UIControlEventEditingChanged = 1 << 17,
93 UIControlEventEditingDidEnd = 1 << 18,
94 UIControlEventEditingDidEndOnExit = 1 << 19,
95
96 UIControlEventAllTouchEvents = 0x00000fff,
97 UIControlEventAllEditingEvents = 0x000f0000,
98 UIControlEventApplicationReserved = 0x0f000000,
99 UIControlEventSystemReserved = 0xf0000000,
100 UIControlEventAllEvents = 0xffffffff,
101 }; typedef NSUInteger UIControlEvents;
102
103 enum {
104 UIControlStateNormal = 0,
105 UIControlStateHighlighted = 1 << 0,
106 UIControlStateDisabled = 1 << 1,
107 UIControlStateSelected = 1 << 2,
108 UIControlStateApplication = 0x00ff0000,
109 UIControlStateReserved = 0xff000000,
110 }; typedef NSUInteger UIControlState;
111
112 typedef enum {
113 UIDeviceOrientationUnknown,
114 UIDeviceOrientationPortrait,
115 UIDeviceOrientationPortraitUpsideDown,
116 UIDeviceOrientationLandscapeLeft,
117 UIDeviceOrientationLandscapeRight,
118 UIDeviceOrientationFaceUp,
119 UIDeviceOrientationFaceDown,
120 } UIDeviceOrientation;
121
122 typedef enum {
123 UIGestureAttributeMinDegrees, /*float*/
124 UIGestureAttributeMaxDegrees, /*float*/
125 UIGestureAttributeMinScale, /*float*/
126 UIGestureAttributeMaxScale, /*float*/
127 UIGestureAttributeIsZoomRubberBandEnabled, /*BOOL*/
128 UIGestureAttributeZoomsFromCurrentToMinOrMax, /*BOOL*/
129 UIGestureAttributeVisibleSize, /*CGSize*/
130 UIGestureAttributeUpdatesScroller, /*BOOL*/
131 } UIGestureAttribute;
132
133 typedef enum {
134 UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
135 UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
136 UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
137 UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft,
138 } UIInterfaceOrientation;
139
140 typedef enum {
141 UIKeyboardTypeDefault,
142 UIKeyboardTypeASCIICapable,
143 UIKeyboardTypeNumbersAndPunctuation,
144 UIKeyboardTypeURL,
145 UIKeyboardTypeNumberPad,
146 UIKeyboardTypePhonePad,
147 UIKeyboardTypeNamePhonePad,
148 UIKeyboardTypeEmailAddress,
149 } UIKeyboardType;
150
151 typedef enum {
152 UINavigationButtonStyleNormal,
153 UINavigationButtonStyleBack,
154 UINavigationButtonStyleHighlighted,
155 UINavigationButtonStyleDestructive
156 } UINavigationButtonStyle;
157
158 typedef enum {
159 UIProgressIndicatorStyleLargeWhite,
160 UIProgressIndicatorStyleMediumWhite,
161 UIProgressIndicatorStyleMediumBrown,
162 UIProgressIndicatorStyleSmallWhite,
163 UIProgressIndicatorStyleSmallBlack,
164 UIProgressIndicatorStyleTinyWhite,
165 } UIProgressIndicatorStyle;
166
167 typedef enum {
168 UIReturnKeyDefault,
169 UIReturnKeyGo,
170 UIReturnKeyGoogle,
171 UIReturnKeyJoin,
172 UIReturnKeyNext,
173 UIReturnKeyRoute,
174 UIReturnKeySearch,
175 UIReturnKeySend,
176 UIReturnKeyYahoo,
177 UIReturnKeyDone,
178 UIReturnKeyEmergencyCall,
179 } UIReturnKeyType;
180
181 typedef enum {
182 UISegmentedControlStylePlain,
183 UISegmentedControlStyleBordered,
184 UISegmentedControlStyleBar,
185 } UISegmentedControlStyle;
186
187 typedef enum {
188 UITableViewCellEditingStyleNone,
189 UITableViewCellEditingStyleDelete,
190 UITableViewCellEditingStyleInsert
191 } UITableViewCellEditingStyle;
192
193 typedef enum {
194 UITableViewCellSeparatorStyleNone,
195 UITableViewCellSeparatorStyleSingleLine
196 } UITableViewCellSeparatorStyle;
197
198 typedef enum {
199 UITableViewRowAnimationFade,
200 UITableViewRowAnimationRight,
201 UITableViewRowAnimationLeft,
202 UITableViewRowAnimationTop,
203 UITableViewRowAnimationBottom,
204 } UITableViewRowAnimation;
205
206 typedef enum {
207 UITextAlignmentLeft,
208 UITextAlignmentCenter,
209 UITextAlignmentRight,
210 } UITextAlignment;
211
212 typedef enum {
213 UITextAutocapitalizationTypeNone,
214 UITextAutocapitalizationTypeWords,
215 UITextAutocapitalizationTypeSentences,
216 UITextAutocapitalizationTypeAllCharacters,
217 } UITextAutocapitalizationType;
218
219 typedef enum {
220 UITextAutocorrectionTypeDefault,
221 UITextAutocorrectionTypeNo,
222 UITextAutocorrectionTypeYes,
223 } UITextAutocorrectionType;
224
225 typedef enum {
226 UITransitionNone = 0,
227 UITransitionPushFromRight = 1,
228 UITransitionPushFromLeft = 2,
229 UITransitionPushFromBottom = 3,
230 UITransitionFade = 6,
231 UITransitionPushFromTop = 7,
232 } UITransition;
233
234 typedef enum {
235 UIViewAnimationCurveEaseInOut,
236 UIViewAnimationCurveEaseIn,
237 UIViewAnimationCurveEaseOut,
238 UIViewAnimationCurveLinear,
239 } UIViewAnimationCurve;
240
241 enum {
242 UIViewAutoresizingNone = 0,
243 UIViewAutoresizingFlexibleLeftMargin = 1 << 0,
244 UIViewAutoresizingFlexibleWidth = 1 << 1,
245 UIViewAutoresizingFlexibleRightMargin = 1 << 2,
246 UIViewAutoresizingFlexibleTopMargin = 1 << 3,
247 UIViewAutoresizingFlexibleHeight = 1 << 4,
248 UIViewAutoresizingFlexibleBottomMargin = 1 << 5,
249 }; typedef NSUInteger UIViewAutoresizing;
250
251 #import <UIKit/UIAcceleration.h>
252 #import <UIKit/UIAccelerometer.h>
253 #import <UIKit/UIActionSheet.h>
254 #import <UIKit/UIActionSheet-Private.h>
255 #import <UIKit/UIAlertView.h>
256 #import <UIKit/UIAnimator.h>
257 #import <UIKit/UIApplication.h>
258 #import <UIKit/UIBarButtonItem.h>
259 #import <UIKit/UIBezierPath.h>
260 #import <UIKit/UIBezierPath-UIInternal.h>
261 #import <UIKit/UIButton.h>
262 #import <UIKit/UIButton-UIButtonPrivate.h>
263 #import <UIKit/UIColor.h>
264 #import <UIKit/UIColor-UIColorSystemColors.h>
265 #import <UIKit/UIControl-UIControlPrivate.h>
266 #import <UIKit/UIDevice.h>
267 #import <UIKit/UIFieldEditor.h>
268 #import <UIKit/UIFrameAnimation.h>
269 #import <UIKit/UIFont.h>
270 #import <UIKit/UIHardware.h>
271 #import <UIKit/UIFieldEditor.h>
272 #import <UIKit/UIKeyboard.h>
273 #import <UIKit/UIKeyboardImpl.h>
274 #import <UIKit/UIImage.h>
275 #import <UIKit/UIImage-UIImageDeprecated.h>
276 #import <UIKit/UIImage-UIImageInternal.h>
277 #import <UIKit/UIImage-UIImagePrivate.h>
278 #import <UIKit/UIImageAndTextTableCell.h>
279 #import <UIKit/UIImageView.h>
280 #import <UIKit/UIKeyboard.h>
281 #import <UIKit/UIKeyboardImpl.h>
282 #import <UIKit/UIModalView.h>
283 #import <UIKit/UIModalView-Private.h>
284 #import <UIKit/UINavigationBar.h>
285 #import <UIKit/UINavigationBar-Static.h>
286 #import <UIKit/UINavigationButton.h>
287 #import <UIKit/UINavigationController.h>
288 #import <UIKit/UINavigationItem.h>
289 #import <UIKit/UIOldSliderControl.h>
290 #import <UIKit/UIPreferencesControlTableCell.h>
291 #import <UIKit/UIPreferencesTable.h>
292 #import <UIKit/UIPreferencesTableCell.h>
293 #import <UIKit/UIPreferencesTextTableCell.h>
294 #import <UIKit/UIProgressBar.h>
295 #import <UIKit/UIProgressHUD.h>
296 #import <UIKit/UIProgressHUD-Deprecated.h>
297 #import <UIKit/UIProgressIndicator.h>
298 #import <UIKit/UIPushButton.h>
299 #import <UIKit/UIScreen.h>
300 #import <UIKit/UISearchField.h>
301 #import <UIKit/UISegmentedControl.h>
302 #import <UIKit/UISectionList.h>
303 #import <UIKit/UISimpleTableCell.h>
304 #import <UIKit/_UISwitchSlider.h>
305 #import <UIKit/UITableCell.h>
306 #import <UIKit/UITableColumn.h>
307 #import <UIKit/UITableView.h>
308 #import <UIKit/UITableViewCell.h>
309 #import <UIKit/UITableViewController.h>
310 #import <UIKit/UITableViewDelegate-Protocol.h>
311 #import <UIKit/UITextField.h>
312 #import <UIKit/UITextInputTraits.h>
313 #import <UIKit/UITextLabel.h>
314 #import <UIKit/UITextView.h>
315 #import <UIKit/UIThreePartButton.h>
316 #import <UIKit/UIToolbar.h>
317 #import <UIKit/UIToolbar-UIButtonBarPrivate.h>
318 #import <UIKit/UITouch.h>
319 #import <UIKit/UITransitionView.h>
320 #import <UIKit/UIView-Animation.h>
321 #import <UIKit/UIView-Deprecated.h>
322 #import <UIKit/UIView-Geometry.h>
323 #import <UIKit/UIView-Gestures.h>
324 #import <UIKit/UIView-Hierarchy.h>
325 #import <UIKit/UIView-Internal.h>
326 #import <UIKit/UIView-Rendering.h>
327 #import <UIKit/UIViewController.h>
328 #import <UIKit/UIWebDocumentView.h>
329 #import <UIKit/UIWebDocumentView-Forms.h>
330 #import <UIKit/UIWebDocumentView-Messaging.h>
331 #import <UIKit/UIWebView.h>
332 #import <UIKit/UIWindow.h>
333 #import <UIKit/UIWindow-Static.h>
334
335 #import <UIKit/NSIndexPath-UITableView.h>
336
337 #import <UIKit/NSString-UIStringDrawing.h>
338 #import <UIKit/NSString-UIStringDrawingDeprecated.h>
339
340 #import <UIKit/NSURL-UIKitAdditions.h>
341
342 @protocol UIApplicationDelegate<NSObject>
343 @end
344
345 #ifdef __cplusplus
346 extern "C" {
347 #endif
348
349 int UIApplicationMain(int argc, char *argv[], NSString *principalClassName, NSString *delegateClassName);
350
351 UIImage *_UIImageWithName(NSString *name);
352
353 NSData *UIImageJPEGRepresentation(UIImage *image);
354 NSData *UIImagePNGRepresentation(UIImage *image);
355
356 CGContextRef UIGraphicsGetCurrentContext(void);
357 UIWindow *UIWindowFindWithWindowRef(GSWindowRef window);
358
359 void UIApplicationUseLegacyEvents(BOOL use);
360 void UIKeyboardEnableAutomaticAppearance(void);
361 void UIKeyboardDisableAutomaticAppearance(void);
362
363 extern NSString * const kUIButtonBarButtonAction;
364 extern NSString * const kUIButtonBarButtonInfo;
365 extern NSString * const kUIButtonBarButtonInfoOffset;
366 extern NSString * const kUIButtonBarButtonSelectedInfo;
367 extern NSString * const kUIButtonBarButtonStyle;
368 extern NSString * const kUIButtonBarButtonTag;
369 extern NSString * const kUIButtonBarButtonTarget;
370 extern NSString * const kUIButtonBarButtonTitle;
371 extern NSString * const kUIButtonBarButtonTitleVerticalHeight;
372 extern NSString * const kUIButtonBarButtonTitleWidth;
373 extern NSString * const kUIButtonBarButtonType;
374
375 extern NSString * const UIKeyboardWillShowNotification;
376 extern NSString * const UIKeyboardDidShowNotification;
377 extern NSString * const UIKeyboardWillHideNotification;
378 extern NSString * const UIKeyboardDidHideNotification;
379 extern NSString * const UIKeyboardCenterBeginUserInfoKey;
380 extern NSString * const UIKeyboardCenterEndUserInfoKey;
381 extern NSString * const UIKeyboardBoundsUserInfoKey;
382
383 extern NSString * const UIWebViewDidReceiveMessageNotification;
384 extern NSString * const UIWebViewDidClearMessagesNotification;
385
386 extern float const UIWebViewGrowsAndShrinksToFitHeight;
387 extern float const UIWebViewGrowsAndShrinksToFitWidth;
388 extern float const UIWebViewScalesToFitScale;
389
390 extern UIApplication * const UIApp;
391
392 //UIFont *UISystemFontWithSize(CGFloat size);
393
394 #ifdef __cplusplus
395 }
396 #endif
397
398 #endif//UIKIT_UIKIT_H_