Public Types | Public Member Functions | Public Attributes

wiimote_state::buttons Struct Reference

#include <wiimote_state.h>

List of all members.

Public Types

enum  mask {
  LEFT = 0x0001, RIGHT = 0x0002, DOWN = 0x0004, UP = 0x0008,
  PLUS = 0x0010, TWO = 0x0100, ONE = 0x0200, _B = 0x0400,
  _A = 0x0800, MINUS = 0x1000, HOME = 0x8000, ALL = LEFT|RIGHT|DOWN|UP|PLUS|TWO|ONE|_A|_B|MINUS|HOME
}

Public Member Functions

bool A () const
bool B () const
bool Plus () const
bool Home () const
bool Minus () const
bool One () const
bool Two () const
bool Up () const
bool Down () const
bool Left () const
bool Right () const

Public Attributes

WORD Bits

Detailed Description

Definition at line 37 of file wiimote_state.h.


Member Enumeration Documentation

Enumerator:
LEFT 
RIGHT 
DOWN 
UP 
PLUS 
TWO 
ONE 
_B 
_A 
MINUS 
HOME 
ALL 

Definition at line 56 of file wiimote_state.h.

                        {
                        LEFT    = 0x0001,
                        RIGHT   = 0x0002,
                        DOWN    = 0x0004,
                        UP              = 0x0008,
                        PLUS    = 0x0010,
                        TWO             = 0x0100,
                        ONE             = 0x0200,
                        _B              = 0x0400,       // ie. trigger
                        _A              = 0x0800,
                        MINUS   = 0x1000,
                        HOME    = 0x8000,
                        //
                        ALL             = LEFT|RIGHT|DOWN|UP|PLUS|TWO|ONE|_A|_B|MINUS|HOME,
                        };

Member Function Documentation

bool wiimote_state::buttons::A (  ) const [inline]

Definition at line 40 of file wiimote_state.h.

References _A, and Bits.

{ return (Bits & _A)    != 0; }
bool wiimote_state::buttons::B (  ) const [inline]

Definition at line 41 of file wiimote_state.h.

References _B, and Bits.

{ return (Bits & _B)    != 0; }
bool wiimote_state::buttons::Down (  ) const [inline]

Definition at line 48 of file wiimote_state.h.

References Bits, and DOWN.

{ return (Bits & DOWN)  != 0; }
bool wiimote_state::buttons::Home (  ) const [inline]

Definition at line 43 of file wiimote_state.h.

References Bits, and HOME.

{ return (Bits & HOME)  != 0; }
bool wiimote_state::buttons::Left (  ) const [inline]

Definition at line 49 of file wiimote_state.h.

References Bits, and LEFT.

{ return (Bits & LEFT)  != 0; }
bool wiimote_state::buttons::Minus (  ) const [inline]

Definition at line 44 of file wiimote_state.h.

References Bits, and MINUS.

{ return (Bits & MINUS) != 0; }
bool wiimote_state::buttons::One (  ) const [inline]

Definition at line 45 of file wiimote_state.h.

References Bits, and ONE.

{ return (Bits & ONE)   != 0; }
bool wiimote_state::buttons::Plus (  ) const [inline]

Definition at line 42 of file wiimote_state.h.

References Bits, and PLUS.

{ return (Bits & PLUS)  != 0; }
bool wiimote_state::buttons::Right (  ) const [inline]

Definition at line 50 of file wiimote_state.h.

References Bits, and RIGHT.

{ return (Bits & RIGHT) != 0; }
bool wiimote_state::buttons::Two (  ) const [inline]

Definition at line 46 of file wiimote_state.h.

References Bits, and TWO.

{ return (Bits & TWO)   != 0; }
bool wiimote_state::buttons::Up (  ) const [inline]

Definition at line 47 of file wiimote_state.h.

References Bits, and UP.

{ return (Bits & UP)    != 0; }

Member Data Documentation

Definition at line 53 of file wiimote_state.h.

Referenced by A(), B(), Down(), Home(), Left(), Minus(), One(), Plus(), Right(), Two(), and Up().


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines