src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java

Print this page
rev 12972 : 8140606: Update library code to use internal Unsafe
Reviewed-by: duke


  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.X11;
  27 
  28 import java.awt.datatransfer.Transferable;
  29 import java.awt.datatransfer.DataFlavor;
  30 
  31 import java.awt.dnd.DnDConstants;
  32 import java.awt.dnd.InvalidDnDOperationException;
  33 
  34 import java.util.Map;
  35 
  36 import sun.misc.Unsafe;
  37 
  38 /**
  39  * XDragSourceProtocol implementation for Motif DnD protocol.
  40  *
  41  * @since 1.5
  42  */
  43 class MotifDnDDragSourceProtocol extends XDragSourceProtocol
  44     implements XEventDispatcher {
  45 
  46     private static final Unsafe unsafe = XlibWrapper.unsafe;
  47 
  48     private long targetEnterServerTime = XConstants.CurrentTime;
  49 
  50     protected MotifDnDDragSourceProtocol(XDragSourceProtocolListener listener) {
  51         super(listener);
  52         XToolkit.addEventDispatcher(XWindow.getXAWTRootWindow().getWindow(), this);
  53     }
  54 
  55     /**
  56      * Creates an instance associated with the specified listener.




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.awt.X11;
  27 
  28 import java.awt.datatransfer.Transferable;
  29 import java.awt.datatransfer.DataFlavor;
  30 
  31 import java.awt.dnd.DnDConstants;
  32 import java.awt.dnd.InvalidDnDOperationException;
  33 
  34 import java.util.Map;
  35 
  36 import jdk.internal.misc.Unsafe;
  37 
  38 /**
  39  * XDragSourceProtocol implementation for Motif DnD protocol.
  40  *
  41  * @since 1.5
  42  */
  43 class MotifDnDDragSourceProtocol extends XDragSourceProtocol
  44     implements XEventDispatcher {
  45 
  46     private static final Unsafe unsafe = XlibWrapper.unsafe;
  47 
  48     private long targetEnterServerTime = XConstants.CurrentTime;
  49 
  50     protected MotifDnDDragSourceProtocol(XDragSourceProtocolListener listener) {
  51         super(listener);
  52         XToolkit.addEventDispatcher(XWindow.getXAWTRootWindow().getWindow(), this);
  53     }
  54 
  55     /**
  56      * Creates an instance associated with the specified listener.