52 |
52 |
53 #define UICOLOR_HW_YELLOW_BODER [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xC0/255 blue:0 alpha:1] |
53 #define UICOLOR_HW_YELLOW_BODER [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xC0/255 blue:0 alpha:1] |
54 #define UICOLOR_HW_YELLOW_TEXT [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1] |
54 #define UICOLOR_HW_YELLOW_TEXT [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1] |
55 #define UICOLOR_HW_DARKBLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:1] |
55 #define UICOLOR_HW_DARKBLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:1] |
56 #define UICOLOR_HW_ALPHABLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:0.58f] |
56 #define UICOLOR_HW_ALPHABLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:0.58f] |
57 #define UICOLOR_HW_ALMOSTBLACK (IS_NOT_POWERFUL()) ? [UIColor blackColor] : [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6] |
57 #define UICOLOR_HW_ALMOSTBLACK (IS_NOT_POWERFUL(getModelType())) ? [UIColor blackColor] : [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6] |
58 |
58 |
59 #define IS_DUALHEAD() ([[UIScreen class] respondsToSelector:@selector(screens)] && [[UIScreen screens] count] > 1) |
59 #define IS_DUALHEAD() ([[UIScreen class] respondsToSelector:@selector(screens)] && [[UIScreen screens] count] > 1) |
60 #define IS_IPAD() (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) |
60 #define IS_IPAD() (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) |
61 #define IS_NOT_POWERFUL() ([modelType() hasPrefix:@"iPhone1"] || [modelType() hasPrefix:@"iPod1,1"] || [modelType() hasPrefix:@"iPod2,1"]) |
61 #define IS_NOT_POWERFUL(x) ([x hasPrefix:@"iPhone1"] || [x hasPrefix:@"iPod1,1"] || [x hasPrefix:@"iPod2,1"]) |
62 #define IS_NOT_VERY_POWERFUL() ([modelType() hasPrefix:@"iPad1"] || [modelType() hasPrefix:@"iPhone2"] || [modelType() hasPrefix:@"iPod3"] || [modelType() hasPrefix:@"iPod4"] ) |
62 #define IS_NOT_VERY_POWERFUL(x) ([x hasPrefix:@"iPad1"] || [x hasPrefix:@"iPhone2"] || [x hasPrefix:@"iPod3"] || [x hasPrefix:@"iPod4"]) |
63 #define IS_VERY_POWERFUL() (IS_NOT_POWERFUL() == NO && IS_NOT_VERY_POWERFUL() == NO) |
63 #define IS_VERY_POWERFUL(x) (IS_NOT_POWERFUL(x) == NO && IS_NOT_VERY_POWERFUL(x) == NO) |
64 |
64 |
|
65 #define rotationManager(x) (x == UIInterfaceOrientationLandscapeRight) || (x == UIInterfaceOrientationLandscapeLeft) |
65 |
66 |
66 void print_free_memory (void); |
67 void print_free_memory (void); |
67 void playSound (NSString *snd); |
68 void playSound (NSString *snd); |
68 void popError (const char *title, const char *message); |
|
69 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation); |
|
70 BOOL isApplePhone (void); |
69 BOOL isApplePhone (void); |
71 NSInteger randomPort (void); |
70 NSInteger randomPort (void); |
72 NSString *modelType (void); |
71 |
|
72 NSString *getModelType (void); |
73 NSArray *getAvailableColors (void); |
73 NSArray *getAvailableColors (void); |
|
74 |
74 UILabel *createBlueLabel (NSString *title, CGRect frame); |
75 UILabel *createBlueLabel (NSString *title, CGRect frame); |
75 UILabel *createLabelWithParams (NSString *title, CGRect frame, CGFloat borderWidth, UIColor *borderColor, UIColor *backgroundColor); |
76 UILabel *createLabelWithParams (NSString *title, CGRect frame, CGFloat borderWidth, UIColor *borderColor, UIColor *backgroundColor); |
76 |
77 |
77 CGSize PSPNGSizeFromMetaData (NSString *aFileName); |
78 CGSize PSPNGSizeFromMetaData (NSString *aFileName); |
78 |
79 |