MobileGestaltSPI.h [plain text]
#pragma once
#import <wtf/Platform.h>
#if PLATFORM(IOS_FAMILY)
#include <CoreFoundation/CoreFoundation.h>
#if USE(APPLE_INTERNAL_SDK)
#include <MobileGestalt.h>
#else
static const CFStringRef kMGQAppleInternalInstallCapability = CFSTR("apple-internal-install");
static const CFStringRef kMGQMainScreenClass = CFSTR("main-screen-class");
static const CFStringRef kMGQMainScreenPitch = CFSTR("main-screen-pitch");
static const CFStringRef kMGQMainScreenScale = CFSTR("main-screen-scale");
static const CFStringRef kMGQiPadCapability = CFSTR("ipad");
static const CFStringRef kMGQDeviceName = CFSTR("DeviceName");
static const CFStringRef kMGQDeviceClassNumber = CFSTR("DeviceClassNumber");
static const CFStringRef kMGQHasExtendedColorDisplay = CFSTR("HasExtendedColorDisplay");
static const CFStringRef kMGQDeviceCornerRadius = CFSTR("DeviceCornerRadius");
static const CFStringRef kMGQMainScreenStaticInfo CFSTR("MainScreenStaticInfo");
static const CFStringRef kMGQSupportsForceTouch CFSTR("eQd5mlz0BN0amTp/2ccMoA");
static const CFStringRef kMGQBluetoothCapability CFSTR("bluetooth");
static const CFStringRef kMGQDeviceProximityCapability CFSTR("DeviceProximityCapability");
static const CFStringRef kMGQDeviceSupportsARKit CFSTR("arkit");
static const CFStringRef kMGQTimeSyncCapability CFSTR("LJ8aZhTg8lXUeVxHzT+hMw");
static const CFStringRef kMGQWAPICapability CFSTR("wapi");
static const CFStringRef kMGQMainDisplayRotation CFSTR("MainDisplayRotation");
typedef enum {
MGDeviceClassInvalid = -1,
MGDeviceClassiPhone = 1,
MGDeviceClassiPod = 2,
MGDeviceClassiPad = 3,
MGDeviceClassAppleTV = 4,
MGDeviceClassWatch = 6,
} MGDeviceClass;
typedef enum {
MGScreenClassPad2 = 4,
MGScreenClassPad3 = 6,
MGScreenClassPad4 = 7,
} MGScreenClass;
#endif
#ifdef __OBJC__
@interface MobileGestaltHelperProxy : NSObject
- (BOOL) proxyRebuildCache;
@end
#endif
WTF_EXTERN_C_BEGIN
CFTypeRef MGCopyAnswer(CFStringRef question, CFDictionaryRef options);
#ifndef MGGetBoolAnswer
bool MGGetBoolAnswer(CFStringRef question);
#endif
#ifndef MGGetSInt32Answer
SInt32 MGGetSInt32Answer(CFStringRef question, SInt32 defaultValue);
#endif
#ifndef MGGetFloat32Answer
Float32 MGGetFloat32Answer(CFStringRef question, Float32 defaultValue);
#endif
bool _MGCacheValid();
WTF_EXTERN_C_END
#endif