mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Updating xdps backend
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4083 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ff966ba409
commit
a697248374
4 changed files with 39 additions and 11 deletions
|
@ -1,3 +1,12 @@
|
|||
1999-04-14 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Headers/gnustep/gui/NSScreen.h: Add initializer.
|
||||
* Source/NSScreen.m (initWithDeviceDescription:): New method to
|
||||
make it easier to determine screen information.
|
||||
|
||||
* Source/NSBundleAdditions.m (+loadNibFile:): Fix unarchiver
|
||||
method name.
|
||||
|
||||
Wed Apr 14 16:58:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
Applied changes by Tim.Bissell@dresdnerkb.com -
|
||||
|
|
|
@ -63,4 +63,11 @@
|
|||
|
||||
@end
|
||||
|
||||
#ifndef NO_GNUSTEP
|
||||
// Need this definition for backend classes
|
||||
@interface NSScreen (GNUstep)
|
||||
- initWithDeviceDescription: (NSDictionary *)dict;
|
||||
@end
|
||||
#endif
|
||||
|
||||
#endif // _GNUstep_H_NSScreen
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
{
|
||||
NSUnarchiver *unarchiver;
|
||||
|
||||
unarchiver = [[NSUnarchiver alloc] initWithData: data];
|
||||
unarchiver = [[NSUnarchiver alloc] initForReadingWithData: data];
|
||||
if (unarchiver)
|
||||
{
|
||||
id obj;
|
||||
|
|
|
@ -53,10 +53,15 @@ NSScreen *mainScreen = nil;
|
|||
//
|
||||
+ (NSScreen *)mainScreen
|
||||
{
|
||||
if (!mainScreen)
|
||||
mainScreen = [[NSScreen alloc] init];
|
||||
|
||||
return mainScreen;
|
||||
NSMutableDictionary *dict;
|
||||
|
||||
if (mainScreen)
|
||||
return mainScreen;
|
||||
|
||||
dict = [NSMutableDictionary dictionary];
|
||||
[dict setObject: @"Main" forKey: @"NSScreenKeyName"];
|
||||
mainScreen = [[NSScreen alloc] initWithDeviceDescription: dict];
|
||||
return mainScreen;
|
||||
}
|
||||
|
||||
+ (NSScreen *)deepestScreen
|
||||
|
@ -72,14 +77,21 @@ NSScreen *mainScreen = nil;
|
|||
//
|
||||
// Instance methods
|
||||
//
|
||||
- initWithDeviceDescription: (NSDictionary *)dict
|
||||
{
|
||||
[super init];
|
||||
depth = 0;
|
||||
frame = NSZeroRect;
|
||||
if (dict)
|
||||
device_desc = [dict mutableCopy];
|
||||
else
|
||||
device_desc = [[NSMutableDictionary dictionary] retain];
|
||||
return self;
|
||||
}
|
||||
|
||||
- init
|
||||
{
|
||||
[super init]; // Create our device description dictionary
|
||||
// The backend will have to fill the dictionary
|
||||
device_desc = [NSMutableDictionary dictionary];
|
||||
depth = 0;
|
||||
frame = NSZeroRect;
|
||||
return self;
|
||||
return [self initWithDeviceDescription: NULL];
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue