forked from LIJI32/SameBoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGBLayout.h
49 lines (41 loc) · 1.47 KB
/
GBLayout.h
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
#import <UIKit/UIKit.h>
#import "GBTheme.h"
@interface GBLayout : NSObject
- (instancetype)initWithTheme:(GBTheme *)theme;
@property (readonly) GBTheme *theme;
@property (readonly) UIImage *background;
@property (readonly) CGRect screenRect;
@property (readonly) CGRect logoRect;
@property (readonly) CGPoint dpadLocation;
@property (readonly) CGPoint aLocation;
@property (readonly) CGPoint bLocation;
@property (readonly) CGPoint abComboLocation;
@property (readonly) CGPoint startLocation;
@property (readonly) CGPoint selectLocation;
- (CGRect)viewRectForOrientation:(UIInterfaceOrientation)orientation;
@end
#ifdef GBLayoutInternal
@interface GBLayout()
@property UIImage *background;
@property CGRect screenRect;
@property CGPoint dpadLocation;
@property CGPoint aLocation;
@property CGPoint bLocation;
@property CGPoint abComboLocation;
@property CGPoint startLocation;
@property CGPoint selectLocation;
@property (readonly) CGSize resolution; // Always vertical
@property (readonly) CGSize size; // Size in pixels, override to make horizontal
@property (readonly) unsigned factor;
@property (readonly) unsigned minY;
@property (readonly) unsigned homeBar;
@property (readonly) unsigned cutout;
@property (readonly) bool hasFractionalPixels;
- (void)drawBackground;
- (void)drawScreenBezels;
- (void)drawLogoInVerticalRange:(NSRange)range;
- (void)drawLabels;
- (void)drawThemedLabelsWithBlock:(void (^)(void))block;
- (CGSize)buttonDeltaForMaxHorizontalDistance:(double)distance;
@end
#endif