240
|
1 /*******************************************************************************
|
259
|
2 * Copyright (c) 2000, 2008 IBM Corporation and others.
|
92
|
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
|
108
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
92
|
12 *******************************************************************************/
|
|
13 module dwt.dnd.TransferData;
|
|
14
|
|
15
|
|
16 /**
|
|
17 * The <code>TransferData</code> class is a platform specific data structure for
|
|
18 * describing the type and the contents of data being converted by a transfer agent.
|
|
19 *
|
|
20 * <p>As an application writer, you do not need to know the specifics of
|
|
21 * TransferData. TransferData instances are passed to a subclass of Transfer
|
|
22 * and the Transfer object manages the platform specific issues.
|
|
23 * You can ask a Transfer subclass if it can handle this data by calling
|
|
24 * Transfer.isSupportedType(transferData).</p>
|
|
25 *
|
|
26 * <p>You should only need to become familiar with the fields in this class if you
|
|
27 * are implementing a Transfer subclass and you are unable to subclass the
|
|
28 * ByteArrayTransfer class.</p>
|
259
|
29 *
|
|
30 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
|
92
|
31 */
|
|
32 public class TransferData {
|
|
33 /**
|
|
34 * The type is a unique identifier of a system format or user defined format.
|
|
35 * (Warning: This field is platform dependent)
|
|
36 * <p>
|
|
37 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
38 * public API. It is marked public only so that it can be shared
|
|
39 * within the packages provided by DWT. It is not available on all
|
|
40 * platforms and should never be accessed from application code.
|
|
41 * </p>
|
|
42 */
|
|
43 public void* type;
|
|
44
|
|
45 /**
|
|
46 * Specifies the number of units in pValue.
|
|
47 * (Warning: This field is platform dependent)
|
|
48 * <p>
|
|
49 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
50 * public API. It is marked public only so that it can be shared
|
|
51 * within the packages provided by DWT. It is not available on all
|
|
52 * platforms and should never be accessed from application code.
|
|
53 * </p>
|
|
54 *
|
|
55 * @see TransferData#format for the size of one unit
|
|
56 */
|
|
57 public int length;
|
|
58
|
|
59 /**
|
|
60 * Specifies the size in bits of a single unit in pValue.
|
|
61 * (Warning: This field is platform dependent)
|
|
62 * <p>
|
|
63 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
64 * public API. It is marked public only so that it can be shared
|
|
65 * within the packages provided by DWT. It is not available on all
|
|
66 * platforms and should never be accessed from application code.
|
|
67 * </p>
|
|
68 *
|
|
69 * This is most commonly 8 bits.
|
|
70 */
|
|
71 public int format;
|
|
72
|
|
73 /**
|
|
74 * Pointer to the data being transferred.
|
|
75 * (Warning: This field is platform dependent)
|
|
76 * <p>
|
|
77 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
78 * public API. It is marked public only so that it can be shared
|
|
79 * within the packages provided by DWT. It is not available on all
|
|
80 * platforms and should never be accessed from application code.
|
|
81 * </p>
|
|
82 */
|
|
83 public char* pValue;
|
|
84
|
|
85 /**
|
|
86 * The result field contains the result of converting a
|
|
87 * java data type into a platform specific value.
|
|
88 * (Warning: This field is platform dependent)
|
|
89 * <p>
|
|
90 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
91 * public API. It is marked public only so that it can be shared
|
|
92 * within the packages provided by DWT. It is not available on all
|
|
93 * platforms and should never be accessed from application code.
|
|
94 * </p>
|
|
95 * <p>The value of result is 1 if the conversion was successful.
|
|
96 * The value of result is 0 if the conversion failed.</p>
|
|
97 */
|
|
98 public int result;
|
|
99
|
|
100 }
|