From 2ed0018eb41c5b8fe2b39415facab3c1f7114b95 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Fri, 6 May 2005 23:06:18 +0000 Subject: Makefile.am (gtk_awt_peer_sources): Add GtkVolatileImage.java. 2005-05-06 Thomas Fitzsimmons * Makefile.am (gtk_awt_peer_sources): Add GtkVolatileImage.java. * Makefile.in: Regenerate. * gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java (createCompatibleVolatileImage(int,int)): Implement. (createCompatibleVolatileImage(int,int,ImageCapabilities)): Likewise. * gnu/java/awt/peer/gtk/GtkComponentPeer.java (backBuffer, caps): New fields. (createVolatileImage): Implement. (createBuffers): Likewise. (getBackBuffer): Likewise. (flip): Likewise. (destroyBuffers): Likewise. * gnu/java/awt/peer/gtk/GtkVolatileImage.java: New file. * java/awt/Canvas.java (CanvasBltBufferStrategy): New class. (CanvasFlipBufferStrategy): Likewise. (createBufferStrategy(int)): New method. (createBufferStrategy(int,BufferCapabilities)): Likewise. * java/awt/Component.java (BltBufferStrategy): Implement and document class. (FlipBufferStrategy): Likewise. * java/awt/Window.java (WindowBltBufferStrategy): New class. (WindowFlipBufferStrategy): Likewise. (createBufferStrategy(int)): New method. (createBufferStrategy(int,BufferCapabilities)): Likewise. (getBufferStrategy): Likewise. * java/awt/BufferCapabilities.java (BufferCapabilities): Rename front to frontCaps and back to backCaps. From-SVN: r99336 --- libjava/java/awt/peer/ComponentPeer.java | 55 ++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) (limited to 'libjava/java/awt/peer') diff --git a/libjava/java/awt/peer/ComponentPeer.java b/libjava/java/awt/peer/ComponentPeer.java index 0776904..95c7832 100644 --- a/libjava/java/awt/peer/ComponentPeer.java +++ b/libjava/java/awt/peer/ComponentPeer.java @@ -128,11 +128,60 @@ public interface ComponentPeer boolean canDetermineObscurity(); void coalescePaintEvent(PaintEvent e); void updateCursorImmediately(); - VolatileImage createVolatileImage(int width, int height); boolean handlesWheelScrolling(); - void createBuffers(int x, BufferCapabilities capabilities) throws AWTException; + + /** + * A convenience method that creates a volatile image. The volatile + * image is created on the screen device on which this component is + * displayed, in the device's current graphics configuration. + * + * @param width width of the image + * @param height height of the image + * + * @see VolatileImage + * + * @since 1.2 + */ + VolatileImage createVolatileImage(int width, int height); + + /** + * Create a number of image buffers that implement a buffering + * strategy according to the given capabilities. + * + * @param numBuffers the number of buffers + * @param caps the buffering capabilities + * + * @throws AWTException if the specified buffering strategy is not + * implemented + * + * @since 1.2 + */ + void createBuffers(int numBuffers, BufferCapabilities caps) + throws AWTException; + + /** + * Return the back buffer of this component. + * + * @return the back buffer of this component. + * + * @since 1.2 + */ Image getBackBuffer(); + + /** + * Perform a page flip, leaving the contents of the back buffer in + * the specified state. + * + * @param contents the state in which to leave the back buffer + * + * @since 1.2 + */ void flip(BufferCapabilities.FlipContents contents); + + /** + * Destroy the resources created by createBuffers. + * + * @since 1.2 + */ void destroyBuffers(); - } -- cgit v1.1