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