mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 17:00:52 +00:00
Misc fixes and float->CGFloat updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@40246 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2cb655c463
commit
3397273582
4 changed files with 7 additions and 7 deletions
|
@ -79,7 +79,7 @@ extern unsigned long XGFontPropULong(Display *dpy, XFontStruct *font_struct,
|
||||||
- (void) drawGlyphs: (const NSGlyph *) glyphs length: (int) len
|
- (void) drawGlyphs: (const NSGlyph *) glyphs length: (int) len
|
||||||
onDisplay: (Display*) xdpy drawable: (Drawable) draw
|
onDisplay: (Display*) xdpy drawable: (Drawable) draw
|
||||||
with: (GC) xgcntxt at: (XPoint) xp;
|
with: (GC) xgcntxt at: (XPoint) xp;
|
||||||
- (float) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len;
|
- (CGFloat) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -408,7 +408,7 @@ Ones(unsigned int n)
|
||||||
len,
|
len,
|
||||||
&extents);
|
&extents);
|
||||||
|
|
||||||
return extents.width;
|
return (CGFloat)extents.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSMultibyteGlyphPacking)glyphPacking
|
- (NSMultibyteGlyphPacking)glyphPacking
|
||||||
|
|
|
@ -241,7 +241,7 @@ static BOOL XGInitAtoms(Display *dpy)
|
||||||
|
|
||||||
- (CGFloat) widthOf: (const char*) s length: (int) len
|
- (CGFloat) widthOf: (const char*) s length: (int) len
|
||||||
{
|
{
|
||||||
return XTextWidth(font_info, s, len);
|
return (CGFloat)XTextWidth(font_info, s, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CGFloat) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len
|
- (CGFloat) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len
|
||||||
|
@ -254,7 +254,7 @@ static BOOL XGInitAtoms(Display *dpy)
|
||||||
buf[i] = glyphs[i];
|
buf[i] = glyphs[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return XTextWidth(font_info, buf, len);
|
return (CGFloat)XTextWidth(font_info, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setActiveFor: (Display*) xdpy gc: (GC) xgcntxt
|
- (void) setActiveFor: (Display*) xdpy gc: (GC) xgcntxt
|
||||||
|
|
|
@ -106,7 +106,7 @@ cache_name()
|
||||||
if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO)
|
if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO)
|
||||||
{
|
{
|
||||||
NSLog(@"Library directory '%@' not available!", path);
|
NSLog(@"Library directory '%@' not available!", path);
|
||||||
return NO;
|
return nil;
|
||||||
}
|
}
|
||||||
path = [path stringByAppendingPathComponent: @"Fonts"];
|
path = [path stringByAppendingPathComponent: @"Fonts"];
|
||||||
if ([mgr fileExistsAtPath: path] == NO)
|
if ([mgr fileExistsAtPath: path] == NO)
|
||||||
|
@ -116,7 +116,7 @@ cache_name()
|
||||||
if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO)
|
if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO)
|
||||||
{
|
{
|
||||||
NSLog(@"Fonts directory '%@' not available!", path);
|
NSLog(@"Fonts directory '%@' not available!", path);
|
||||||
return NO;
|
return nil;
|
||||||
}
|
}
|
||||||
path = [path stringByAppendingPathComponent: @"Cache"];
|
path = [path stringByAppendingPathComponent: @"Cache"];
|
||||||
if ([mgr fileExistsAtPath: path] == NO)
|
if ([mgr fileExistsAtPath: path] == NO)
|
||||||
|
@ -126,7 +126,7 @@ cache_name()
|
||||||
if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO)
|
if ([mgr fileExistsAtPath: path isDirectory: &flag] == NO || flag == NO)
|
||||||
{
|
{
|
||||||
NSLog(@"Fonts directory '%@' not available!", path);
|
NSLog(@"Fonts directory '%@' not available!", path);
|
||||||
return NO;
|
return nil;
|
||||||
}
|
}
|
||||||
cacheName = [path stringByAppendingPathComponent: file_name];
|
cacheName = [path stringByAppendingPathComponent: file_name];
|
||||||
RETAIN(cacheName);
|
RETAIN(cacheName);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue