starting to add classic controller and guitar hero controller support

git-svn-id: http://wiiusej.googlecode.com/svn/trunk@177 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
guilhem.duche
2008-06-05 17:46:57 +00:00
parent f7869c0b6d
commit 4f3ae569cd
4 changed files with 187 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
/**
* This file is part of WiiuseJ.
*
* WiiuseJ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WiiuseJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WiiuseJ. If not, see <http://www.gnu.org/licenses/>.
*/
package wiiusej.wiiusejevents.wiiuseapievents;
/**
* Event that represents the connection of a classic controller to a wiimote.
*
* @author guiguito
*
*/
public class ClassicControllerInsertedEvent extends WiiUseApiEvent {
/**
* Construct the ClassicControllerInsertedEvent setting up the id.
*
* @param id
* id of the wiimote.
*/
public ClassicControllerInsertedEvent(int id) {
super(id, WIIUSE_CLASSIC_CTRL_INSERTED);
}
@Override
public String toString() {
String out = "";
/* Status */
out += "/*********** CLASSIC CONTROLLER INSERTED EVENT : WIIMOTE ID :"
+ super.getWiimoteId() + " ********/\n";
return out;
}
}

View File

@@ -0,0 +1,47 @@
/**
* This file is part of WiiuseJ.
*
* WiiuseJ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WiiuseJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WiiuseJ. If not, see <http://www.gnu.org/licenses/>.
*/
package wiiusej.wiiusejevents.wiiuseapievents;
/**
* Event that represents the disconnection of a classic controller from a
* wiimote.
*
* @author guiguito
*
*/
public class ClassicControllerRemovedEvent extends WiiUseApiEvent {
/**
* Construct the ClassicControllerRemovedEvent setting up the id.
*
* @param id
* id of the wiimote.
*/
public ClassicControllerRemovedEvent(int id) {
super(id, WIIUSE_CLASSIC_CTRL_REMOVED);
}
@Override
public String toString() {
String out = "";
/* Status */
out += "/*********** CLASSIC CONTROLLER REMOVED EVENT : WIIMOTE ID :"
+ super.getWiimoteId() + " ********/\n";
return out;
}
}

View File

@@ -0,0 +1,47 @@
/**
* This file is part of WiiuseJ.
*
* WiiuseJ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WiiuseJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WiiuseJ. If not, see <http://www.gnu.org/licenses/>.
*/
package wiiusej.wiiusejevents.wiiuseapievents;
/**
* Event that represents the connection of a Guitar hero controller to a
* wiimote.
*
* @author guiguito
*
*/
public class GuitarHeroInsertedEvent extends WiiUseApiEvent {
/**
* Construct the GuitarHeroInsertedEvent setting up the id.
*
* @param id
* id of the wiimote.
*/
public GuitarHeroInsertedEvent(int id) {
super(id, WIIUSE_GUITAR_HERO_3_CTRL_INSERTED);
}
@Override
public String toString() {
String out = "";
/* Status */
out += "/*********** GUITAR HERO INSERTED EVENT : WIIMOTE ID :"
+ super.getWiimoteId() + " ********/\n";
return out;
}
}

View File

@@ -0,0 +1,47 @@
/**
* This file is part of WiiuseJ.
*
* WiiuseJ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WiiuseJ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WiiuseJ. If not, see <http://www.gnu.org/licenses/>.
*/
package wiiusej.wiiusejevents.wiiuseapievents;
/**
* Event that represents the disconnection of a guitar hero controller from a
* wiimote.
*
* @author guiguito
*
*/
public class GuitarHeroRemovedEvent extends WiiUseApiEvent {
/**
* Construct the GuitarHeroRemovedEvent setting up the id.
*
* @param id
* id of the wiimote.
*/
public GuitarHeroRemovedEvent(int id) {
super(id, WIIUSE_GUITAR_HERO_3_CTRL_REMOVED);
}
@Override
public String toString() {
String out = "";
/* Status */
out += "/*********** GUITAR HERO REMOVED EVENT : WIIMOTE ID :"
+ super.getWiimoteId() + " ********/\n";
return out;
}
}