mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:40:48 +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
|
@ -1,3 +1,8 @@
|
||||||
|
1999-09-13 Pedro Ivo Andrade Tavares <ptavares@iname.com>
|
||||||
|
|
||||||
|
* NSScreen.m: added the Mac OS X messages -visibleFrame: and
|
||||||
|
-supportedWindowDepths. The messages are not generalized right now.
|
||||||
|
|
||||||
1999-09-14 Adam Fedor <fedor@gnu.org>
|
1999-09-14 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Source/NSCell.m ([NSCell
|
* Source/NSCell.m ([NSCell
|
||||||
|
|
|
@ -61,6 +61,11 @@
|
||||||
- (NSRect)frame;
|
- (NSRect)frame;
|
||||||
- (NSDictionary *)deviceDescription;
|
- (NSDictionary *)deviceDescription;
|
||||||
|
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
- (const NSWindowDepth*) supportedWindowDepths;
|
||||||
|
- (NSRect) visibleFrame;
|
||||||
|
#endif
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifndef NO_GNUSTEP
|
#ifndef NO_GNUSTEP
|
||||||
|
|
|
@ -28,7 +28,10 @@
|
||||||
|
|
||||||
#include <gnustep/gui/config.h>
|
#include <gnustep/gui/config.h>
|
||||||
#include <Foundation/NSDictionary.h>
|
#include <Foundation/NSDictionary.h>
|
||||||
|
#include <Foundation/NSArray.h>
|
||||||
|
#include <AppKit/NSApplication.h>
|
||||||
#include <AppKit/NSScreen.h>
|
#include <AppKit/NSScreen.h>
|
||||||
|
#include <AppKit/NSInterfaceStyle.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +40,7 @@
|
||||||
//
|
//
|
||||||
// Class variables
|
// Class variables
|
||||||
//
|
//
|
||||||
NSScreen *mainScreen = nil;
|
static NSScreen *mainScreen = nil;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Class methods
|
// Class methods
|
||||||
|
@ -66,12 +69,12 @@ NSScreen *mainScreen = nil;
|
||||||
|
|
||||||
+ (NSScreen *)deepestScreen
|
+ (NSScreen *)deepestScreen
|
||||||
{
|
{
|
||||||
return nil;
|
return [self mainScreen];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSArray *)screens
|
+ (NSArray *)screens
|
||||||
{
|
{
|
||||||
return nil;
|
return [NSArray arrayWithObject: [self mainScreen]];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -114,4 +117,31 @@ NSDictionary *d = [[NSDictionary alloc] initWithDictionary: device_desc];
|
||||||
return d;
|
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
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue