mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:40:48 +00:00
Implemented [GSResolutionForScreen:] with code from NSScreen.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11858 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
224a230676
commit
fa8b04cfe4
1 changed files with 9 additions and 0 deletions
|
@ -1000,6 +1000,8 @@ NSGraphicsContext *GSCurrentContext()
|
||||||
GET_IMP(@selector(GSWindowDepthForScreen:));
|
GET_IMP(@selector(GSWindowDepthForScreen:));
|
||||||
methodTable.GSAvailableDepthsForScreen_ =
|
methodTable.GSAvailableDepthsForScreen_ =
|
||||||
GET_IMP(@selector(GSAvailableDepthsForScreen:));
|
GET_IMP(@selector(GSAvailableDepthsForScreen:));
|
||||||
|
methodTable.GSResolutionForScreen_ =
|
||||||
|
GET_IMP(@selector(GSResolutionForScreen:));
|
||||||
|
|
||||||
mptr = NSZoneMalloc(_globalGSZone, sizeof(gsMethodTable));
|
mptr = NSZoneMalloc(_globalGSZone, sizeof(gsMethodTable));
|
||||||
memcpy(mptr, &methodTable, sizeof(gsMethodTable));
|
memcpy(mptr, &methodTable, sizeof(gsMethodTable));
|
||||||
|
@ -2727,4 +2729,11 @@ NSGraphicsContext *GSCurrentContext()
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSSize) GSResolutionForScreen: (int) screen
|
||||||
|
{
|
||||||
|
// This is a fixed value for screens.
|
||||||
|
// All screens I checked under OS4.2 report 72.
|
||||||
|
return NSMakeSize(72, 72);
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue