package jGPIO;

import com.sun.jna.Structure;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Hide;

@BA.ShortName("Linux_Input_Event")

public class input_event extends Structure {

	public timeval time;
	
	/**
	 * 16 bit unsigned
	 */
	public short type;
	
	/**
	 * 16 bit unsigned
	 */
	public short code;
	
	/**
	 * 32 bit signed
	 */
	public int value;
	
	public input_event() {
		super();
	}
	
	public input_event(timeval _time, short _type, short _code, int _value) {
		super();
		this.time = _time;
		this.type = _type;
		this.code = _code;
		this.value = _value;
	}
	
	protected ByReference newByReference() {
		ByReference s = new ByReference();
		s.useMemory(getPointer());
		write();
		s.read();
		return s;
	}
	protected ByValue newByValue() {
		ByValue s = new ByValue();
		s.useMemory(getPointer());
		write();
		s.read();
		return s;
	}
	
	protected input_event newInstance() {
		input_event s = new input_event();
		s.useMemory(getPointer());
		write();
		s.read();
		return s;
	}
	
	@Override
	@Hide
	public void autoWrite() {super.autoWrite();}
	
	@Override
	@Hide
	public void autoRead() {super.autoRead();}
	
	public static class ByReference extends input_event implements com.sun.jna.Structure.ByReference {}
	public static class ByValue extends input_event implements com.sun.jna.Structure.ByValue {}
}
