1 /******************************************************************************* 2 * Copyright (c) 2000, 2004 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.swt.graphics; 12 13 14 /** 15 * Implementers of <code>Drawable</code> can have a graphics context (GC) 16 * created for them, and then they can be drawn on by sending messages to 17 * their associated GC. SWT images, and device objects such as the Display 18 * device and the Printer device, are drawables. 19 * <p> 20 * <b>IMPORTANT:</b> This class is <em>not</em> part of the SWT 21 * public API. It is marked public only so that it can be shared 22 * within the packages provided by SWT. It should never be 23 * referenced from application code. 24 * </p> 25 * 26 * @see Device 27 * @see Image 28 * @see GC 29 */ 30 public interface Drawable { 31 32 /** 33 * Invokes platform specific functionality to allocate a new GC handle. 34 * <p> 35 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public 36 * API for <code>Drawable</code>. It is marked public only so that it 37 * can be shared within the packages provided by SWT. It is not 38 * available on all platforms, and should never be called from 39 * application code. 40 * </p> 41 * 42 * @param data the platform specific GC data 43 * @return the platform specific GC handle 44 */ 45 46 public int /*long*/ internal_new_GC (GCData data); 47 48 /** 49 * Invokes platform specific functionality to dispose a GC handle. 50 * <p> 51 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public 52 * API for <code>Drawable</code>. It is marked public only so that it 53 * can be shared within the packages provided by SWT. It is not 54 * available on all platforms, and should never be called from 55 * application code. 56 * </p> 57 * 58 * @param handle the platform specific GC handle 59 * @param data the platform specific GC data 60 */ 61 public void internal_dispose_GC (int /*long*/ handle, GCData data); 62 63 } 64