first draft with new version working on wiiuse 0.10.

New system to get events.

git-svn-id: http://wiiusej.googlecode.com/svn/trunk@52 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
guilhem.duche
2008-02-14 17:52:20 +00:00
parent 24d167af3b
commit 49b8efa836
17 changed files with 979 additions and 574 deletions

View File

@@ -0,0 +1,68 @@
package wiiusej.wiiuseapievents;
public abstract class WiiUseApiEvent {
public static int GENERIC_EVENT = 1;
public static int STATUS_EVENT = 2;
public static int DISCONNECTION_EVENT = 3;
/* Event Type */
private int eventType;
/* ID */
private int wiimoteId = -1;
/**
* Default constructor.
*/
public WiiUseApiEvent(){
}
/**
* Construct the WiiUseApiEvent setting up the id.
*
* @param id
* the Wiimote id
* @param type
* type of the event
*/
public WiiUseApiEvent(int id, int type) {
wiimoteId = id;
eventType = type;
}
/**
* Get Wiimote ID
*
* @return the wiimote id.
*/
public int getWiimoteId() {
return wiimoteId;
}
/**
* Set Wiimote ID
*
* @param wiimoteId
* id of the wiimote
*/
void setWiimoteId(int wiimoteId) {
this.wiimoteId = wiimoteId;
}
/**
* Get the event type.
* @return the eventType
*/
public int getEventType() {
return eventType;
}
public abstract String toString();
}