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");
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
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
WTF_EXTERN_C_END
#endif