mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:00:47 +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
eb701c6e7c
commit
14a6ea332e
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>
|
Wed Apr 14 16:58:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
Applied changes by Tim.Bissell@dresdnerkb.com -
|
Applied changes by Tim.Bissell@dresdnerkb.com -
|
||||||
|
|
|
@ -63,4 +63,11 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
#ifndef NO_GNUSTEP
|
||||||
|
// Need this definition for backend classes
|
||||||
|
@interface NSScreen (GNUstep)
|
||||||
|
- initWithDeviceDescription: (NSDictionary *)dict;
|
||||||
|
@end
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _GNUstep_H_NSScreen
|
#endif // _GNUstep_H_NSScreen
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
{
|
{
|
||||||
NSUnarchiver *unarchiver;
|
NSUnarchiver *unarchiver;
|
||||||
|
|
||||||
unarchiver = [[NSUnarchiver alloc] initWithData: data];
|
unarchiver = [[NSUnarchiver alloc] initForReadingWithData: data];
|
||||||
if (unarchiver)
|
if (unarchiver)
|
||||||
{
|
{
|
||||||
id obj;
|
id obj;
|
||||||
|
|
|
@ -53,10 +53,15 @@ NSScreen *mainScreen = nil;
|
||||||
//
|
//
|
||||||
+ (NSScreen *)mainScreen
|
+ (NSScreen *)mainScreen
|
||||||
{
|
{
|
||||||
if (!mainScreen)
|
NSMutableDictionary *dict;
|
||||||
mainScreen = [[NSScreen alloc] init];
|
|
||||||
|
if (mainScreen)
|
||||||
return mainScreen;
|
return mainScreen;
|
||||||
|
|
||||||
|
dict = [NSMutableDictionary dictionary];
|
||||||
|
[dict setObject: @"Main" forKey: @"NSScreenKeyName"];
|
||||||
|
mainScreen = [[NSScreen alloc] initWithDeviceDescription: dict];
|
||||||
|
return mainScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSScreen *)deepestScreen
|
+ (NSScreen *)deepestScreen
|
||||||
|
@ -72,14 +77,21 @@ NSScreen *mainScreen = nil;
|
||||||
//
|
//
|
||||||
// Instance methods
|
// 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
|
- init
|
||||||
{
|
{
|
||||||
[super init]; // Create our device description dictionary
|
return [self initWithDeviceDescription: NULL];
|
||||||
// The backend will have to fill the dictionary
|
|
||||||
device_desc = [NSMutableDictionary dictionary];
|
|
||||||
depth = 0;
|
|
||||||
frame = NSZeroRect;
|
|
||||||
return self;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue