Ticket #20486: emacs-cocoa.diff
File emacs-cocoa.diff, 2.3 KB (added by tobypeterson, 15 years ago) |
---|
-
src/nsfns.m
1771 1771 { 1772 1772 check_ns (); 1773 1773 #ifdef NS_IMPL_COCOA 1774 PSFlush ();1775 1774 #endif 1776 1775 /*ns_delete_terminal (dpyinfo->terminal); */ 1777 1776 [NSApp terminate: NSApp]; -
src/nsfont.m
238 238 return w; 239 239 } 240 240 #endif 241 w = [ sfont widthOfString: cstr];241 w = [cstr sizeWithAttributes:[NSDictionary dictionaryWithObject:sfont forKey:NSFontAttributeName]].width; 242 242 return max (w, 2.0); 243 243 } 244 244 … … 841 841 /* set up metrics portion of font struct */ 842 842 font->ascent = [sfont ascender]; 843 843 font->descent = -[sfont descender]; 844 font->min_width = [ sfont widthOfString: @"|"]; /* FIXME */844 font->min_width = [@"|" sizeWithAttributes:[NSDictionary dictionaryWithObject:sfont forKey:NSFontAttributeName]].width; 845 845 font->space_width = lrint (ns_char_width (sfont, ' ')); 846 846 font->average_width = lrint (font_info->width); 847 847 font->max_width = lrint (font_info->max_bounds.width); … … 1432 1432 } 1433 1433 1434 1434 /* NSGlyphStorage protocol */ 1435 - ( unsigned int)layoutOptions1435 - (NSUInteger)layoutOptions 1436 1436 { 1437 1437 return 0; 1438 1438 } … … 1442 1442 return attrStr; 1443 1443 } 1444 1444 1445 - (void)insertGlyphs: (const NSGlyph *)glyphs length: ( unsigned int)length1446 forStartingGlyphAtIndex: ( unsigned int)glyphIndex1447 characterIndex: ( unsigned int)charIndex1445 - (void)insertGlyphs: (const NSGlyph *)glyphs length: (NSUInteger)length 1446 forStartingGlyphAtIndex: (NSUInteger)glyphIndex 1447 characterIndex: (NSUInteger)charIndex 1448 1448 { 1449 1449 len = glyphIndex+length; 1450 1450 for (i =glyphIndex; i<len; i++) … … 1453 1453 maxGlyph = len; 1454 1454 } 1455 1455 1456 - (void)setIntAttribute: ( int)attributeTag value: (int)val1457 forGlyphAtIndex: ( unsigned)glyphIndex1456 - (void)setIntAttribute: (NSInteger)attributeTag value: (NSInteger)val 1457 forGlyphAtIndex: (NSUInteger)glyphIndex 1458 1458 { 1459 1459 return; 1460 1460 } -
src/nsgui.h
134 134 typedef struct _NSRect { NSPoint origin; NSSize size; } NSRect; 135 135 #endif 136 136 137 #define NativeRectangle struct _NSRect137 #define NativeRectangle NSRect 138 138 139 139 #define CONVERT_TO_XRECT(xr, nr) \ 140 140 ((xr).x = (nr).origin.x, \