* Source/GSDisplayServer.m:

* Headers/Additions/GNUstepGUI/GSDisplayServer.h: Add a new API for taking
screenshots: -contentsOfScreen:inRect:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33442 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-07-03 23:43:07 +00:00
parent de89388c7f
commit 7a47a5e929
3 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2011-07-03 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSDisplayServer.m:
* Headers/Additions/GNUstepGUI/GSDisplayServer.h: Add a new API for taking
screenshots: -contentsOfScreen:inRect:
2011-07-03 Eric Wasylishen <ewasylishen@gmail.com> 2011-07-03 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSTextView.m: Use respectFraction: YES when deciding whether * Source/NSTextView.m: Use respectFraction: YES when deciding whether

View file

@ -113,6 +113,9 @@ APPKIT_EXPORT NSString *GSScreenNumber;
- (NSImage *) iconTileImage; - (NSImage *) iconTileImage;
- (NSSize) iconSize; - (NSSize) iconSize;
/* Screen capture */
- (NSImage *) contentsOfScreen: (int)screen inRect: (NSRect)rect;
@end @end
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */

View file

@ -507,6 +507,15 @@ GSCurrentServer(void)
return NSMakeSize(64.0, 64.0); return NSMakeSize(64.0, 64.0);
} }
/**
* Returns a screenshot of the specified rectangle of the specified screen.
* The mouse cursor should be ommitted from the returned image.
*/
- (NSImage *) contentsOfScreen: (int)screen inRect: (NSRect)rect
{
return nil;
}
@end @end
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */