mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:20:38 +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
|
@ -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…
Add table
Add a link
Reference in a new issue