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  * Port to the D programming language:
11  *     Frank Benoit <benoit@tionex.de>
12  *******************************************************************************/
13 module org.eclipse.swt.graphics.Drawable;
14 
15 import java.lang.all;
16 
17 
18 import org.eclipse.swt.graphics.GCData;
19 import org.eclipse.swt.internal.gtk.OS;
20 
21 /**
22  * Implementers of <code>Drawable</code> can have a graphics context (GC)
23  * created for them, and then they can be drawn on by sending messages to
24  * their associated GC. SWT images, and device objects such as the Display
25  * device and the Printer device, are drawables.
26  * <p>
27  * <b>IMPORTANT:</b> This class is <em>not</em> part of the SWT
28  * public API. It is marked public only so that it can be shared
29  * within the packages provided by SWT. It should never be
30  * referenced from application code.
31  * </p>
32  *
33  * @see Device
34  * @see Image
35  * @see GC
36  */
37 public interface Drawable {
38 
39 /**
40  * Invokes platform specific functionality to allocate a new GC handle.
41  * <p>
42  * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
43  * API for <code>Drawable</code>. It is marked public only so that it
44  * can be shared within the packages provided by SWT. It is not
45  * available on all platforms, and should never be called from
46  * application code.
47  * </p>
48  *
49  * @param data the platform specific GC data
50  * @return the platform specific GC handle
51  */
52 
53 public GdkGC* internal_new_GC (GCData data);
54 
55 /**
56  * Invokes platform specific functionality to dispose a GC handle.
57  * <p>
58  * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
59  * API for <code>Drawable</code>. It is marked public only so that it
60  * can be shared within the packages provided by SWT. It is not
61  * available on all platforms, and should never be called from
62  * application code.
63  * </p>
64  *
65  * @param handle the platform specific GC handle
66  * @param data the platform specific GC data
67  */
68 public void internal_dispose_GC (GdkGC* handle, GCData data);
69 
70 }