240
|
1 /*******************************************************************************
|
92
|
2 * Copyright (c) 2000, 2005 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
|
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>
|
|
29 */
|
|
30 public class TransferData {
|
|
31 /**
|
|
32 * The type is a unique identifier of a system format or user defined format.
|
|
33 * (Warning: This field is platform dependent)
|
|
34 * <p>
|
|
35 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
36 * public API. It is marked public only so that it can be shared
|
|
37 * within the packages provided by DWT. It is not available on all
|
|
38 * platforms and should never be accessed from application code.
|
|
39 * </p>
|
|
40 */
|
|
41 public void* type;
|
|
42
|
|
43 /**
|
|
44 * Specifies the number of units in pValue.
|
|
45 * (Warning: This field is platform dependent)
|
|
46 * <p>
|
|
47 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
48 * public API. It is marked public only so that it can be shared
|
|
49 * within the packages provided by DWT. It is not available on all
|
|
50 * platforms and should never be accessed from application code.
|
|
51 * </p>
|
|
52 *
|
|
53 * @see TransferData#format for the size of one unit
|
|
54 */
|
|
55 public int length;
|
|
56
|
|
57 /**
|
|
58 * Specifies the size in bits of a single unit in pValue.
|
|
59 * (Warning: This field is platform dependent)
|
|
60 * <p>
|
|
61 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
62 * public API. It is marked public only so that it can be shared
|
|
63 * within the packages provided by DWT. It is not available on all
|
|
64 * platforms and should never be accessed from application code.
|
|
65 * </p>
|
|
66 *
|
|
67 * This is most commonly 8 bits.
|
|
68 */
|
|
69 public int format;
|
|
70
|
|
71 /**
|
|
72 * Pointer to the data being transferred.
|
|
73 * (Warning: This field is platform dependent)
|
|
74 * <p>
|
|
75 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
76 * public API. It is marked public only so that it can be shared
|
|
77 * within the packages provided by DWT. It is not available on all
|
|
78 * platforms and should never be accessed from application code.
|
|
79 * </p>
|
|
80 */
|
|
81 public char* pValue;
|
|
82
|
|
83 /**
|
|
84 * The result field contains the result of converting a
|
|
85 * java data type into a platform specific value.
|
|
86 * (Warning: This field is platform dependent)
|
|
87 * <p>
|
|
88 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
|
|
89 * public API. It is marked public only so that it can be shared
|
|
90 * within the packages provided by DWT. It is not available on all
|
|
91 * platforms and should never be accessed from application code.
|
|
92 * </p>
|
|
93 * <p>The value of result is 1 if the conversion was successful.
|
|
94 * The value of result is 0 if the conversion failed.</p>
|
|
95 */
|
|
96 public int result;
|
|
97
|
|
98 }
|