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