diff --git a/common/attrstr.h b/common/attrstr.h index 1dae7d63..d0ff049b 100644 --- a/common/attrstr.h +++ b/common/attrstr.h @@ -5,6 +5,8 @@ #define uiprivAlloc(x, y) uiAlloc(x, y) #define uiprivRealloc(x, y, z) uiRealloc(x, y, z) #define uiprivFree(x) uiFree(x) +#define uiprivStrdup(x) strdup(x) +#define uiprivStricmp(x, y) strcasecmp(x, y) // attribute.c extern uiAttribute *uiprivAttributeRetain(uiAttribute *a); diff --git a/darwin/attrstr.m b/darwin/attrstr.m index f067956a..cc42d4c6 100644 --- a/darwin/attrstr.m +++ b/darwin/attrstr.m @@ -281,7 +281,7 @@ static backgroundBlock mkBackgroundBlock(size_t start, size_t end, double r, dou brush.G = g; brush.B = b; brush.A = a; - drawTextBackground(c, x, y, layout, start, end, &brush, 0); +//TODO drawTextBackground(c, x, y, layout, start, end, &brush, 0); }); } @@ -463,7 +463,7 @@ CFAttributedStringRef uiprivAttributedStringToCFAttributedString(uiDrawTextLayou CFMutableAttributedStringRef mas; struct foreachParams fep; - cfstr = CFStringCreateWithCharacters(NULL, attrstrUTF16(p->String), attrstrUTF16Len(p->String)); + cfstr = CFStringCreateWithCharacters(NULL, uiprivAttributedStringUTF16String(p->String), uiprivAttributedStringUTF16Len(p->String)); if (cfstr == NULL) { // TODO } diff --git a/darwin/fontmatch.m b/darwin/fontmatch.m index 9645662f..f459a165 100644 --- a/darwin/fontmatch.m +++ b/darwin/fontmatch.m @@ -450,7 +450,7 @@ CTFontDescriptorRef uiprivCTFontDescriptorAppendFeatures(CTFontDescriptorRef des CFDictionaryRef attrs; const void *keys[1], *values[1]; - featuresArray = otfToFeaturesArray(otf); + featuresArray = uiprivOpenTypeFeaturesToCTFeatures(otf); keys[0] = kCTFontFeatureSettingsAttribute; values[0] = featuresArray; attrs = CFDictionaryCreate(NULL, diff --git a/darwin/main.m b/darwin/main.m index 12c528ff..865fb942 100644 --- a/darwin/main.m +++ b/darwin/main.m @@ -1,5 +1,6 @@ // 6 april 2015 #import "uipriv_darwin.h" +#import "attrstr.h" static BOOL canQuit = NO; static NSAutoreleasePool *globalPool; @@ -128,7 +129,7 @@ const char *uiInit(uiInitOptions *o) uiprivSetupFontPanel(); - initUnderlineColors(); + uiprivInitUnderlineColors(); } globalPool = [[NSAutoreleasePool alloc] init]; @@ -144,7 +145,7 @@ void uiUninit(void) [globalPool release]; @autoreleasepool { - uninitUnderlineColors(); + uiprivUninitUnderlineColors(); [delegate release]; [realNSApp() setDelegate:nil]; [app release];