#import "uipriv_darwin.h"
CFStringRef *uiprivFUTURE_kCTFontOpenTypeFeatureTag = NULL;
CFStringRef *uiprivFUTURE_kCTFontOpenTypeFeatureValue = NULL;
CFStringRef *uiprivFUTURE_kCTBackgroundColorAttributeName = NULL;
void uiprivLoadFutures(void)
{
void *handle;
handle = dlopen(NULL, RTLD_LAZY);
if (handle == NULL)
return;
#define GET(var, fn) *((void **) (&var)) = dlsym(handle, #fn)
GET(uiprivFUTURE_kCTFontOpenTypeFeatureTag, kCTFontOpenTypeFeatureTag);
GET(uiprivFUTURE_kCTFontOpenTypeFeatureValue, kCTFontOpenTypeFeatureValue);
GET(uiprivFUTURE_kCTBackgroundColorAttributeName, kCTBackgroundColorAttributeName);
dlclose(handle);
}
void uiprivFUTURE_NSLayoutConstraint_setIdentifier(NSLayoutConstraint *constraint, NSString *identifier)
{
id cid = (id) constraint;
if ([constraint respondsToSelector:@selector(setIdentifier:)])
[cid setIdentifier:identifier];
}
BOOL uiprivFUTURE_NSWindow_performWindowDragWithEvent(NSWindow *w, NSEvent *initialEvent)
{
id cw = (id) w;
if ([w respondsToSelector:@selector(performWindowDragWithEvent:)]) {
[cw performWindowDragWithEvent:initialEvent];
return YES;
}
return NO;
}