mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:37:39 +00:00
Update for MacOSX
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4895 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
39cbb103e7
commit
43faeba934
3 changed files with 43 additions and 3 deletions
|
@ -28,7 +28,10 @@
|
|||
|
||||
#include <gnustep/gui/config.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/NSScreen.h>
|
||||
#include <AppKit/NSInterfaceStyle.h>
|
||||
|
||||
|
||||
|
||||
|
@ -37,7 +40,7 @@
|
|||
//
|
||||
// Class variables
|
||||
//
|
||||
NSScreen *mainScreen = nil;
|
||||
static NSScreen *mainScreen = nil;
|
||||
|
||||
//
|
||||
// Class methods
|
||||
|
@ -66,12 +69,12 @@ NSScreen *mainScreen = nil;
|
|||
|
||||
+ (NSScreen *)deepestScreen
|
||||
{
|
||||
return nil;
|
||||
return [self mainScreen];
|
||||
}
|
||||
|
||||
+ (NSArray *)screens
|
||||
{
|
||||
return nil;
|
||||
return [NSArray arrayWithObject: [self mainScreen]];
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -114,4 +117,31 @@ NSDictionary *d = [[NSDictionary alloc] initWithDictionary: device_desc];
|
|||
return d;
|
||||
}
|
||||
|
||||
// Mac OS X methods
|
||||
- (const NSWindowDepth*) supportedWindowDepths
|
||||
{
|
||||
// Skeletal implementation
|
||||
NSWindowDepth* retval = NSZoneMalloc([self zone], sizeof(NSWindowDepth)*2);
|
||||
retval[1] = depth;
|
||||
retval[2] = 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
-(NSRect) visibleFrame
|
||||
{
|
||||
NSRect visFrame = frame;
|
||||
switch ([NSApp interfaceStyle])
|
||||
{
|
||||
case NSMacintoshInterfaceStyle:
|
||||
// What is the size of the Mac menubar?
|
||||
visFrame.size.height -= 25;
|
||||
return visFrame;
|
||||
case NSWindows95InterfaceStyle:
|
||||
case NSNextStepInterfaceStyle:
|
||||
case NSNoInterfaceStyle:
|
||||
default:
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue