wiiuse
events.h
Go to the documentation of this file.
1 /*
2  * wiiuse
3  *
4  * Written By:
5  * Michael Laforest < para >
6  * Email: < thepara (--AT--) g m a i l [--DOT--] com >
7  *
8  * Copyright 2006-2007
9  *
10  * This file is part of wiiuse.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program. If not, see <http://www.gnu.org/licenses/>.
24  *
25  * $Header$
26  *
27  */
28 
37 #ifndef EVENTS_H_INCLUDED
38 #define EVENTS_H_INCLUDED
39 
40 #include "wiiuse.h"
41 
44 void wiiuse_pressed_buttons(struct wiimote_t *wm, byte *msg);
45 
46 void handle_wm_accel(struct wiimote_t *wm, byte *msg);
47 
48 int state_changed(struct wiimote_t *wm);
49 
50 void handshake_expansion(struct wiimote_t *wm, byte *data, uint16_t len);
51 void disable_expansion(struct wiimote_t *wm);
52 
53 void propagate_event(struct wiimote_t *wm, byte event, byte *msg);
54 void idle_cycle(struct wiimote_t *wm);
55 
56 void clear_dirty_reads(struct wiimote_t *wm);
59 #endif /* EVENTS_H_INCLUDED */
void wiiuse_pressed_buttons(struct wiimote_t *wm, byte *msg)
Find what buttons are pressed.
Definition: events.c:326
Main Wiimote device structure.
Definition: wiiuse.h:793
API header file.
void handshake_expansion(struct wiimote_t *wm, byte *data, uint16_t len)
Handle the handshake data from the expansion device.
Definition: events.c:706
void handle_wm_accel(struct wiimote_t *wm, byte *msg)
Handle accel data in a wiimote message.
Definition: events.c:167
void propagate_event(struct wiimote_t *wm, byte event, byte *msg)
Analyze the event that occurred on a wiimote.
Definition: events.c:198
int state_changed(struct wiimote_t *wm)
Determine if the current state differs significantly from the previous.
Definition: events.c:1000
void disable_expansion(struct wiimote_t *wm)
Disable the expansion device if it was enabled.
Definition: events.c:860
void clear_dirty_reads(struct wiimote_t *wm)
Clear out all old &#39;dirty&#39; read requests.
Definition: events.c:147
void idle_cycle(struct wiimote_t *wm)
Called on a cycle where no significant change occurs.
Definition: events.c:119