mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Fix ATSUI/Core Text compilation issues on Tiger
This commit is contained in:
@@ -8,10 +8,11 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#if ENABLE_ATSUI
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "MMTextView.h"
|
||||
#import "Miscellaneous.h"
|
||||
|
||||
#if MM_ENABLE_ATSUI
|
||||
|
||||
enum { MMMaxCellsPerChar = 2 };
|
||||
|
||||
@@ -100,4 +101,4 @@ enum { MMMaxCellsPerChar = 2 };
|
||||
|
||||
@end
|
||||
|
||||
#endif // ENABLE_ATSUI
|
||||
#endif // MM_ENABLE_ATSUI
|
||||
|
||||
@@ -25,15 +25,13 @@
|
||||
* resized.
|
||||
*/
|
||||
|
||||
#if ENABLE_ATSUI
|
||||
|
||||
#import "MMAppController.h"
|
||||
#import "MMAtsuiTextView.h"
|
||||
#import "MMTextViewHelper.h"
|
||||
#import "MMVimController.h"
|
||||
#import "MMWindowController.h"
|
||||
#import "Miscellaneous.h"
|
||||
|
||||
#if MM_ENABLE_ATSUI
|
||||
|
||||
// TODO: What does DRAW_TRANSP flag do? If the background isn't drawn when
|
||||
// this flag is set, then sometimes the character after the cursor becomes
|
||||
@@ -1272,4 +1270,4 @@ defaultLineHeightForFont(NSFont *font)
|
||||
|
||||
@end // MMAtsuiTextView (Drawing)
|
||||
|
||||
#endif // ENABLE_ATSUI
|
||||
#endif // MM_ENABLE_ATSUI
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "Miscellaneous.h" // Defines MM_ENABLE_ATSUI
|
||||
|
||||
#if !MM_ENABLE_ATSUI
|
||||
|
||||
@class MMTextViewHelper;
|
||||
|
||||
@@ -95,3 +97,5 @@
|
||||
- (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
|
||||
|
||||
@end
|
||||
|
||||
#endif // !MM_ENABLE_ATSUI
|
||||
|
||||
@@ -25,12 +25,15 @@
|
||||
* resized.
|
||||
*/
|
||||
|
||||
#import "Miscellaneous.h" // Defines MM_ENABLE_ATSUI
|
||||
|
||||
#if !MM_ENABLE_ATSUI
|
||||
|
||||
#import "MMAppController.h"
|
||||
#import "MMCoreTextView.h"
|
||||
#import "MMTextViewHelper.h"
|
||||
#import "MMVimController.h"
|
||||
#import "MMWindowController.h"
|
||||
#import "Miscellaneous.h"
|
||||
|
||||
|
||||
// TODO: What does DRAW_TRANSP flag do? If the background isn't drawn when
|
||||
@@ -1292,3 +1295,5 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGSize *advances,
|
||||
}
|
||||
|
||||
@end // MMCoreTextView (Drawing)
|
||||
|
||||
#endif // !MM_ENABLE_ATSUI
|
||||
|
||||
+11
-7
@@ -18,6 +18,8 @@
|
||||
* the view is filled by the text view.
|
||||
*/
|
||||
|
||||
#import "Miscellaneous.h" // Defines MM_ENABLE_ATSUI
|
||||
|
||||
#if MM_ENABLE_ATSUI
|
||||
# import "MMAtsuiTextView.h"
|
||||
#else
|
||||
@@ -27,7 +29,6 @@
|
||||
#import "MMVimController.h"
|
||||
#import "MMVimView.h"
|
||||
#import "MMWindowController.h"
|
||||
#import "Miscellaneous.h"
|
||||
#import <PSMTabBarControl/PSMTabBarControl.h>
|
||||
|
||||
|
||||
@@ -96,17 +97,20 @@ enum {
|
||||
NSInteger renderer = [ud integerForKey:MMRendererKey];
|
||||
ASLogInfo(@"Use renderer=%d", renderer);
|
||||
|
||||
#if MM_ENABLE_ATSUI
|
||||
if (MMRendererATSUI == renderer) {
|
||||
// HACK! 'textView' has type MMTextView, but MMAtsuiTextView is not
|
||||
// derived from MMTextView.
|
||||
textView = [[MMAtsuiTextView alloc] initWithFrame:frame];
|
||||
}
|
||||
#else
|
||||
if (MMRendererCoreText == renderer) {
|
||||
// HACK! 'textView' has type MMTextView, but MMCoreTextView is not
|
||||
// derived from MMTextView.
|
||||
textView = [[MMCoreTextView alloc] initWithFrame:frame];
|
||||
#if MM_ENABLE_ATSUI
|
||||
} else if (MMRendererATSUI == renderer) {
|
||||
// HACK! 'textView' has type MMTextView, but MMAtsuiTextView is not
|
||||
// derived from MMTextView.
|
||||
textView = [[MMAtsuiTextView alloc] initWithFrame:frame];
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
else {
|
||||
// Use Cocoa text system for text rendering.
|
||||
textView = [[MMTextView alloc] initWithFrame:frame];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user