30 std::unique_ptr<Impl> pimpl;
34 Input(
void* view,
float update_interval);
35 void feed_touch_event(std::function<
void (
Touch)>& callback,
void* touches);
37 explicit Input(
void* window);
38 bool feed_sdl_event(
void* event);
45 static std::string id_to_char(
Button btn);
48 static Button char_to_id(std::string ch);
52 static std::string button_name(
Button btn);
56 static std::string gamepad_name(
int index);
60 static bool down(
Button btn);
65 static double axis(
Button btn);
69 double mouse_x()
const;
71 double mouse_y()
const;
76 void set_mouse_position(
double x,
double y);
79 void set_mouse_factors(
double factor_x,
double factor_y,
83 const Touches& current_touches()
const;
Struct that saves information about a touch on the surface of a multi-touch device.
double x
Position of a touch on the touch screen.
std::vector< Touch > Touches
double offset_x(double angle, double radius)
Returns the horizontal distance between the origin and the point to which you would get if you moved ...
void * id
Allows for identification of a touch across calls.
Button
List of button IDs that can be used with Gosu::Input.
TextInput instances are invisible objects that build a text string from input, using the current oper...
double offset_y(double angle, double radius)
Returns the vertical distance between the origin and the point to which you would get if you moved ra...