mirror of
https://github.com/gnustep/libs-back.git
synced 2025-06-01 17:52:33 +00:00
Fix compile warnings in gpbs.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@39822 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0b5756acc6
commit
28dfe59d6b
2 changed files with 130 additions and 116 deletions
|
@ -2881,12 +2881,16 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
|
||||||
*cid = (void*)hCursor;
|
*cid = (void*)hCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) imagecursor: (NSPoint)hotp : (NSImage *)image : (void **)cid
|
- (BITMAP) createBitmapFromImage: (NSImage*)image
|
||||||
{
|
{
|
||||||
if (cid)
|
BITMAP bm = NULL;
|
||||||
|
|
||||||
|
return(bm);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (HICON) createIconFromImage: (NSImage*)image
|
||||||
{
|
{
|
||||||
// Default the return cursur ID to NULL...
|
HICON icon = NULL;
|
||||||
*cid = NULL;
|
|
||||||
|
|
||||||
NSBitmapImageRep *rep = getStandardBitmap(image);
|
NSBitmapImageRep *rep = getStandardBitmap(image);
|
||||||
if (rep == nil)
|
if (rep == nil)
|
||||||
|
@ -2977,7 +2981,7 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
|
||||||
iconinfo.hbmColor = hXorMaskBitmap;
|
iconinfo.hbmColor = hXorMaskBitmap;
|
||||||
|
|
||||||
// Finally, try to create the cursor...
|
// Finally, try to create the cursor...
|
||||||
*cid = CreateIconIndirect(&iconinfo);
|
icon = CreateIconIndirect(&iconinfo);
|
||||||
|
|
||||||
// Cleanup the DC's...
|
// Cleanup the DC's...
|
||||||
DeleteDC(hXorMaskDC);
|
DeleteDC(hXorMaskDC);
|
||||||
|
@ -2991,14 +2995,24 @@ LRESULT CALLBACK windowEnumCallback(HWND hwnd, LPARAM lParam)
|
||||||
|
|
||||||
// Release the screen HDC...
|
// Release the screen HDC...
|
||||||
ReleaseDC(NULL,hDC);
|
ReleaseDC(NULL,hDC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) imagecursor: (NSPoint)hotp : (NSImage *)image : (void **)cid
|
||||||
|
{
|
||||||
|
if (cid)
|
||||||
|
{
|
||||||
|
// Try to create the cursor...
|
||||||
|
*cid = [self createIconFromImage: image];
|
||||||
|
|
||||||
// Need to save these created cursors to remove later...
|
// Need to save these created cursors to remove later...
|
||||||
[systemCursors setObject:[NSValue valueWithPointer:*cid] forKey:[NSValue valueWithPointer:*cid]];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*cid == NULL)
|
if (*cid == NULL)
|
||||||
NSWarnMLog(@"error creating cursor - status: %p", GetLastError());
|
NSWarnMLog(@"error creating cursor - status: %p", GetLastError());
|
||||||
}
|
else
|
||||||
|
[systemCursors setObject:[NSValue valueWithPointer:*cid] forKey:[NSValue valueWithPointer:*cid]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1236,7 +1236,7 @@ init(int argc, char** argv, char **env)
|
||||||
{
|
{
|
||||||
if ([filemgr createDirectoryAtPath:filepath withIntermediateDirectories:YES attributes:nil error:&error] == NO)
|
if ([filemgr createDirectoryAtPath:filepath withIntermediateDirectories:YES attributes:nil error:&error] == NO)
|
||||||
{
|
{
|
||||||
NSLog(@"%s:error creating path: %@ error: %@", __PRETTY_FUNCTION__, error);
|
NSLog(@"%s:error creating path: %@ error: %@", __PRETTY_FUNCTION__, filepath, error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1284,7 +1284,7 @@ init(int argc, char** argv, char **env)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"GSGPBSLoggingAttachPid"] == NO)
|
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"GSGPBSLoggingAttachPid"] == NO)
|
||||||
filename = [filename stringByAppendingFormat:@"_%ld",getpid()];
|
filename = [filename stringByAppendingFormat:@"_%ld",(long)getpid()];
|
||||||
|
|
||||||
NSString *outfile = [filename stringByAppendingFormat:@"_out.log"];
|
NSString *outfile = [filename stringByAppendingFormat:@"_out.log"];
|
||||||
NSString *outpath = [filepath stringByAppendingPathComponent:outfile];
|
NSString *outpath = [filepath stringByAppendingPathComponent:outfile];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue