1 /* 2 * %W% %E% 3 * 4 * Copyright 2002 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 /***************************************************************************** 8 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * - Redistribution of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 15 * - Redistribution in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materails provided with the distribution. 18 * 19 * Neither the name Sun Microsystems, Inc. or the names of the contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * This software is provided "AS IS," without a warranty of any kind. 24 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING 25 * ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR 26 * NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND 27 * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS 28 * A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS 29 * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST 30 * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, 31 * INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY 32 * OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE, 33 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 34 * 35 * You acknowledge that this software is not designed or intended for us in 36 * the design, construction, operation or maintenance of any nuclear facility 37 * 38 *****************************************************************************/ 39 package net.java.games.input; 40 41 /** OSX Event structure corresponding to IOHIDEventStruct 42 * @author elias 43 * @version 1.0 44 */ 45 class OSXEvent { 46 private long type; 47 private long cookie; 48 private int value; 49 private long nanos; 50 set(long type, long cookie, int value, long nanos)51 public void set(long type, long cookie, int value, long nanos) { 52 this.type = type; 53 this.cookie = cookie; 54 this.value = value; 55 this.nanos = nanos; 56 } 57 getType()58 public long getType() { 59 return type; 60 } 61 getCookie()62 public long getCookie() { 63 return cookie; 64 } 65 getValue()66 public int getValue() { 67 return value; 68 } 69 getNanos()70 public long getNanos() { 71 return nanos; 72 } 73 } 74