This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
#include <dlfcn.h> | |
static const CFStringRef kMGDieID = CFSTR("DieId"); | |
typedef NS_ENUM(NSInteger, BKSInterfaceOrientation) { | |
BKSInterfaceOrientationPortrait = 1, | |
BKSInterfaceOrientationPortraitUpsideDown = 2, | |
BKSInterfaceOrientationLandscapeRight = 3, | |
BKSInterfaceOrientationLandscapeLeft = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* It is recommended to use dlopen & dlsym to call these functions, and use this header as a reference. | |
Example: | |
void *IOMobileFramebuffer = dlopen("/System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer", RTLD_LAZY); | |
IOMobileFramebufferReturn (*IOMobileFramebufferGetMainDisplay)(IOMobileFramebufferRef *pointer) = dlsym(IOMobileFramebuffer, "IOMobileFramebufferGetMainDisplay"); | |
dlclose(IOMobileFramebuffer); */ | |
/* You may have to include your IOSurface header to compile, because of the IOMobileFramebufferGetLayerDefaultSurface function. If you do not have it, you may just uncomment the typedef to an IOSurface below. */ | |
#include <stdio.h> | |
#include <sys/mman.h> | |
#include <mach/mach.h> |