|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.gnome.glib.Glib
org.gnome.screenshot.Screenshot
public final class Screenshot
Take screenshots. This class is explicitly here to support taking the screenshots used as illustrations in the java-gnome API documentation.
Usage is simple: given a Window, present()
it, and then call the capture
method here.
final Window window; final Pixbuf result; window.present(); result = Screenshot.capture(); result.save(...);
Note that for some reason taking screenshots is a very slow and CPU intensive process. Unfortunately, it occurs within the GDK lock and thus will block your UI for a few seconds. Threading can't help you parallelize this.
LICENCE WARNING
This native code used to take screenshots is licenced under the GNU General
Public Licence, version 2. As a result, use of this class in an application
will mean that entire application will need to be available under a GPL v2
compatible licence.
Method Summary | |
---|---|
static Pixbuf |
capture()
Take a screenshot of the Window which has focus. |
Methods inherited from class org.gnome.glib.Glib |
---|
formatSizeForDisplay, getRealName, getSystemConfigDirs, getSystemDataDirs, getUserCacheDir, getUserConfigDir, getUserDataDir, getUserName, getUserSpecialDir, markupEscapeText, reloadUserSpecialDirsCache, setProgramName |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Pixbuf capture()
setDecorated(false)
on your Window). An alpha blended drop-shadow will be added for effect.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |