//
//  privateapi.h
//  lara
//
//  Created by Duy Tran on 20/4/26.
//

@import Foundation;
@import QuartzCore;

id objc_alloc(Class cls);
void objc_release(id obj);
pthread_t pthread_main_thread_np(void);

#define CA_DEBUG_FLAG_PERFORMANCE_HUD 0x10000000
extern void CARenderServerGetDebugFlags(mach_port_t port, int key);
extern void CARenderServerGetDebugValue(mach_port_t port, int key);
extern void CARenderServerSetDebugFlags(mach_port_t port, int key, int value);
extern void CARenderServerSetDebugValue(mach_port_t port, int key, int value);

// return 3 gadget
extern int CGGetHardwareVectorCapabilities(void);

// os_eligibility.h
typedef CF_ENUM(uint64_t, EligibilityDomainType) {
    /// Install marketplace-distributed apps
    EligibilityDomainTypeHydrogen = 2,
    /// Update/restore marketplace-distributed apps
    EligibilityDomainTypeHelium = 3,
    /// Update/restore web browser engine host apps
    EligibilityDomainTypeLithium = 4,
    /// Update/restore embedded web engine apps
    EligibilityDomainTypeBoron = 6,
    /// Install web browser engine host apps
    EligibilityDomainTypeCarbon = 7,
    /// Install apps distributed via the web
    EligibilityDomainTypeArgon = 19,
    /// Update/restore apps distributed via the web
    EligibilityDomainTypePotassium = 20,
    /// Install embedded web engine apps
    EligibilityDomainTypeTitanium = 23,
    /// iPhone Mirroring
    EligibilityDomainTypeIron = 27,
};

typedef CF_ENUM(uint64_t, EligibilityAnswer) {
    EligibilityAnswerEligible = 4,
};

typedef CF_ENUM(uint64_t, EligibilityAnswerSource) {
    EligibilityAnswerSourceInvalid = 0,
    EligibilityAnswerSourceComputed = 1,
    EligibilityAnswerSourceForced = 2,
};

@interface CAMetalDrawable : NSObject
- (CGRect)dirtyRect;
- (void)setDirtyRect:(CGRect)rect;
@end
