
forward declarations are simplified with decl_typeclass_impl impl_Typeclass_for now instead only define static inline impl_Typeclass_for can be used to achieve the old behaviour
23 lines
608 B
C
23 lines
608 B
C
#ifndef _fencer_player_input_h
|
|
#define _fencer_player_input_h
|
|
|
|
#include "list.h"
|
|
#include "input.h"
|
|
#include "input_axis.h"
|
|
#include "typeclass_helpers.h"
|
|
|
|
typedef struct PlayerInput {
|
|
InputDevice* device;
|
|
List listeners;
|
|
void* target;
|
|
} PlayerInput;
|
|
|
|
extern PlayerInput* playerinput_new(void* target, int device);
|
|
extern void playerinput_add(PlayerInput* self, InputAxis axis, InputDelegateFn delegate);
|
|
extern void playerinput_set_device(PlayerInput* self, int device);
|
|
extern void playerinput_drop(PlayerInput* self);
|
|
|
|
decl_typeclass_impl(Drop, PlayerInput)
|
|
|
|
#endif // !_fencer_player_input_h
|