des ~master (2015-04-07T23:17:11Z)
Dub
Repo
Joystick
des
app
joystick
class
Joystick : DesObject {
int
index
;
SDL_Joystick
*
dev
;
string
joy_name
;
short
[]
axis_vals
;
ivec2
[]
ball_vals
;
bool
[]
button_vals
;
HatState
[]
hat_vals
;
Signal
!(
uint
,
short
)
axisChange
;
Signal
!(
uint
,
ivec2
)
ballChange
;
Signal
!(
uint
,
bool
)
buttonChange
;
Signal
!(
uint
,
HatState
)
hatChange
;
enum
HatState
;
this
(
int
index
)
;
void
open
()
;
string
name
[@property getter];
bool
isOpen
[@property getter];
short
axis
(
uint
i
)
;
ivec2
ball
(
uint
i
)
;
bool
button
(
uint
i
)
;
HatState
hat
(
uint
i
)
;
void
updateAxis
(
uint
i
,
short
v
)
;
void
updateBall
(
uint
i
,
in
ivec2
v
)
;
void
updateButton
(
uint
i
,
bool
v
)
;
void
updateHat
(
uint
i
,
uint
v
)
;
void
selfConstruct
()
;
void
createVals
()
;
void
setVals
()
;
void
setAxes
()
;
void
setBalls
()
;
void
setButtons
()
;
void
setHats
()
;
void
selfDestroy
()
;
}
Constructors
this
this
(
int
index
)
Members
Enums
HatState
enum
HatState
Functions
axis
short
axis
(
uint
i
)
ball
ivec2
ball
(
uint
i
)
button
bool
button
(
uint
i
)
createVals
void
createVals
()
hat
HatState
hat
(
uint
i
)
open
void
open
()
selfConstruct
void
selfConstruct
()
selfDestroy
void
selfDestroy
()
setAxes
void
setAxes
()
setBalls
void
setBalls
()
setButtons
void
setButtons
()
setHats
void
setHats
()
setVals
void
setVals
()
without calling change signals
updateAxis
void
updateAxis
(
uint
i
,
short
v
)
updateBall
void
updateBall
(
uint
i
,
in
ivec2
v
)
updateButton
void
updateButton
(
uint
i
,
bool
v
)
updateHat
void
updateHat
(
uint
i
,
uint
v
)
Properties
isOpen
bool
isOpen
[@property getter]
name
string
name
[@property getter]
Variables
axisChange
Signal
!(
uint
,
short
)
axisChange
;
axis_vals
short
[]
axis_vals
;
ballChange
Signal
!(
uint
,
ivec2
)
ballChange
;
ball_vals
ivec2
[]
ball_vals
;
buttonChange
Signal
!(
uint
,
bool
)
buttonChange
;
button_vals
bool
[]
button_vals
;
dev
SDL_Joystick
*
dev
;
hatChange
Signal
!(
uint
,
HatState
)
hatChange
;
hat_vals
HatState
[]
hat_vals
;
index
int
index
;
Meta
Source
See Implementation
des
app
joystick
classes
JoyEventProcessor
Joystick