FreeRDP/client/iOS/Views/BlockUI.h

75 lines
2.6 KiB
C
Raw Normal View History

//
// BlockUI.h
//
// Created by Gustavo Ambrozio on 14/2/12.
//
#ifndef BlockUI_h
#define BlockUI_h
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
2019-11-06 17:24:51 +03:00
#define NSTextAlignmentCenter UITextAlignmentCenter
#define NSLineBreakByWordWrapping UILineBreakModeWordWrap
#define NSLineBreakByClipping UILineBreakModeClip
#endif
#ifndef IOS_LESS_THAN_6
2019-11-06 17:24:51 +03:00
#define IOS_LESS_THAN_6 \
!([[[UIDevice currentDevice] systemVersion] compare:@"6.0" \
options:NSNumericSearch] != NSOrderedAscending)
#endif
2019-11-06 17:24:51 +03:00
#define NeedsLandscapePhoneTweaks \
(UIInterfaceOrientationIsLandscape( \
[[UIApplication sharedApplication] statusBarOrientation]) && \
UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad)
// Action Sheet constants
2019-11-06 17:24:51 +03:00
#define kActionSheetBounce 10
#define kActionSheetBorder 10
#define kActionSheetButtonHeight 45
#define kActionSheetTopMargin 15
2019-11-06 17:24:51 +03:00
#define kActionSheetTitleFont [UIFont systemFontOfSize:18]
#define kActionSheetTitleTextColor [UIColor whiteColor]
#define kActionSheetTitleShadowColor [UIColor blackColor]
#define kActionSheetTitleShadowOffset CGSizeMake(0, -1)
2019-11-06 17:24:51 +03:00
#define kActionSheetButtonFont [UIFont boldSystemFontOfSize:20]
#define kActionSheetButtonTextColor [UIColor whiteColor]
#define kActionSheetButtonShadowColor [UIColor blackColor]
#define kActionSheetButtonShadowOffset CGSizeMake(0, -1)
2019-11-06 17:24:51 +03:00
#define kActionSheetBackground @"action-sheet-panel.png"
#define kActionSheetBackgroundCapHeight 30
// Alert View constants
2019-11-06 17:24:51 +03:00
#define kAlertViewBounce 20
#define kAlertViewBorder (NeedsLandscapePhoneTweaks ? 5 : 10)
#define kAlertButtonHeight (NeedsLandscapePhoneTweaks ? 35 : 44)
2019-11-06 17:24:51 +03:00
#define kAlertViewTitleFont [UIFont boldSystemFontOfSize:20]
#define kAlertViewTitleTextColor [UIColor colorWithWhite:244.0 / 255.0 alpha:1.0]
#define kAlertViewTitleShadowColor [UIColor blackColor]
#define kAlertViewTitleShadowOffset CGSizeMake(0, -1)
2019-11-06 17:24:51 +03:00
#define kAlertViewMessageFont [UIFont systemFontOfSize:18]
#define kAlertViewMessageTextColor [UIColor colorWithWhite:244.0 / 255.0 alpha:1.0]
#define kAlertViewMessageShadowColor [UIColor blackColor]
#define kAlertViewMessageShadowOffset CGSizeMake(0, -1)
2019-11-06 17:24:51 +03:00
#define kAlertViewButtonFont [UIFont boldSystemFontOfSize:18]
#define kAlertViewButtonTextColor [UIColor whiteColor]
#define kAlertViewButtonShadowColor [UIColor blackColor]
#define kAlertViewButtonShadowOffset CGSizeMake(0, -1)
2019-11-06 17:24:51 +03:00
#define kAlertViewBackground @"alert-window.png"
#define kAlertViewBackgroundLandscape @"alert-window-landscape.png"
#define kAlertViewBackgroundCapHeight 38
#endif