org.eclipse.swt.graphics
Interface Drawable

All Known Implementing Classes:
Browser, Button, Canvas, CaptionedControl, Combo, Composite, ConstrainedText, Control, DateEditor, Decorations, Device, Display, HyperLink, Image, Label, List, ListBox, ListView, MobileShell, MultiPageDialog.MultiPageShell, ProgressBar, Scrollable, ScrolledText, Shell, Slider, SortedList, Table, Text, TextExtension, Tree, WrappedLabel

public interface Drawable

Implementers of Drawable can have a graphics context (GC) created for them, and then they can be drawn on by sending messages to their associated GC. SWT images, and device objects such as the Display device and the Printer device, are drawables.

IMPORTANT: This class is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It should never be referenced from application code.

See Also:
Device, Image, GC

Method Summary
 void internal_copyArea(int handle, int x, int y, int width, int height)
          Call's the object's appropriate platform copyArea() function.
 void internal_dispose_GC(int handle, InternalGCData data)
          Invokes platform specific functionality to dispose a GC handle.
 Rectangle internal_getBounds()
          Call's the object's appropriate getBounds() function.
 Rectangle internal_getDefaultClipping()
          Returns the appropriate clipping based on the type of object implementing Drawable.
 int internal_new_GC(InternalGCData data)
          Invokes platform specific functionality to allocate a new GC handle.
 

Method Detail

internal_new_GC

int internal_new_GC(InternalGCData data)
Invokes platform specific functionality to allocate a new GC handle.

IMPORTANT: This method is not part of the public API for Drawable. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Parameters:
data - the platform specific GC data
Returns:
the platform specific GC handle

internal_dispose_GC

void internal_dispose_GC(int handle,
                         InternalGCData data)
Invokes platform specific functionality to dispose a GC handle.

IMPORTANT: This method is not part of the public API for Drawable. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Parameters:
handle - the platform specific GC handle
data - the platform specific GC data

internal_getDefaultClipping

Rectangle internal_getDefaultClipping()
Returns the appropriate clipping based on the type of object implementing Drawable.

IMPORTANT: This method is not part of the public API for Drawable. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Returns:
the Rectangle representing the clipping of the object

internal_copyArea

void internal_copyArea(int handle,
                       int x,
                       int y,
                       int width,
                       int height)
Call's the object's appropriate platform copyArea() function.

IMPORTANT: This method is not part of the public API for Drawable. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Parameters:
handle - to the GC
x - coordinate of the area to be copied
y - coordinate of the area to be copied
width - of the area to be copied
height - of the area to be copied

internal_getBounds

Rectangle internal_getBounds()
Call's the object's appropriate getBounds() function.

IMPORTANT: This method is not part of the public API for Drawable. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Returns:
the Rectangle representing the bounds of the object