git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

iOS/GBLayout.h

      1 #import <UIKit/UIKit.h>
      2 #import "GBTheme.h"
      3 
      4 @interface GBLayout : NSObject
      5 - (instancetype)initWithTheme:(GBTheme *)theme;
      6 @property (readonly) GBTheme *theme;
      7 
      8 @property (readonly) UIImage *background;
      9 @property (readonly) CGRect screenRect;
     10 @property (readonly) CGRect fullScreenRect;
     11 @property (readonly) CGRect logoRect;
     12 @property (readonly) CGPoint dpadLocation;
     13 @property (readonly) CGPoint aLocation;
     14 @property (readonly) CGPoint bLocation;
     15 @property (readonly) CGPoint abComboLocation;
     16 @property (readonly) CGPoint startLocation;
     17 @property (readonly) CGPoint selectLocation;
     18 @property (readonly) unsigned cutout;
     19 
     20 - (CGRect)viewRectForOrientation:(UIInterfaceOrientation)orientation;
     21 @end
     22 
     23 #ifdef GBLayoutInternal
     24 
     25 @interface GBLayout()
     26 @property UIImage *background;
     27 @property CGRect screenRect;
     28 @property CGRect fullScreenRect;
     29 @property CGPoint dpadLocation;
     30 @property CGPoint aLocation;
     31 @property CGPoint bLocation;
     32 @property CGPoint abComboLocation;
     33 @property CGPoint startLocation;
     34 @property CGPoint selectLocation;
     35 @property (readonly) CGSize resolution; // Always vertical
     36 @property (readonly) CGSize size; // Size in pixels, override to make horizontal
     37 @property (readonly) unsigned factor;
     38 @property (readonly) unsigned minY;
     39 @property (readonly) unsigned homeBar;
     40 @property (readonly) bool hasFractionalPixels;
     41 
     42 - (void)drawBackground;
     43 - (void)drawScreenBezels;
     44 - (void)drawLogoInVerticalRange:(NSRange)range controlPadding:(double)padding;
     45 - (void)drawLabels;
     46 - (void)drawThemedLabelsWithBlock:(void (^)(void))block;
     47 
     48 - (CGSize)buttonDeltaForMaxHorizontalDistance:(double)distance;
     49 @end
     50 
     51 #endif

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.