godot/core/input/input_event.cpp

/**************************************************************************/
/*  input_event.cpp                                                       */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "input_event.h"

#include "core/input/input_map.h"
#include "core/input/shortcut.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"

const int InputEvent::DEVICE_ID_EMULATION =;
const int InputEvent::DEVICE_ID_INTERNAL =;

void InputEvent::set_device(int p_device) {}

int InputEvent::get_device() const {}

bool InputEvent::is_action(const StringName &p_action, bool p_exact_match) const {}

bool InputEvent::is_action_pressed(const StringName &p_action, bool p_allow_echo, bool p_exact_match) const {}

bool InputEvent::is_action_released(const StringName &p_action, bool p_exact_match) const {}

float InputEvent::get_action_strength(const StringName &p_action, bool p_exact_match) const {}

float InputEvent::get_action_raw_strength(const StringName &p_action, bool p_exact_match) const {}

bool InputEvent::is_canceled() const {}

bool InputEvent::is_pressed() const {}

bool InputEvent::is_released() const {}

bool InputEvent::is_echo() const {}

Ref<InputEvent> InputEvent::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {}

bool InputEvent::action_match(const Ref<InputEvent> &p_event, bool p_exact_match, float p_deadzone, bool *r_pressed, float *r_strength, float *r_raw_strength) const {}

bool InputEvent::is_match(const Ref<InputEvent> &p_event, bool p_exact_match) const {}

bool InputEvent::is_action_type() const {}

void InputEvent::_bind_methods() {}

///////////////////////////////////

void InputEventFromWindow::_bind_methods() {}

void InputEventFromWindow::set_window_id(int64_t p_id) {}

int64_t InputEventFromWindow::get_window_id() const {}

///////////////////////////////////

void InputEventWithModifiers::set_command_or_control_autoremap(bool p_enabled) {}

bool InputEventWithModifiers::is_command_or_control_autoremap() const {}

bool InputEventWithModifiers::is_command_or_control_pressed() const {}

void InputEventWithModifiers::set_shift_pressed(bool p_enabled) {}

bool InputEventWithModifiers::is_shift_pressed() const {}

void InputEventWithModifiers::set_alt_pressed(bool p_enabled) {}

bool InputEventWithModifiers::is_alt_pressed() const {}

void InputEventWithModifiers::set_ctrl_pressed(bool p_enabled) {}

bool InputEventWithModifiers::is_ctrl_pressed() const {}

void InputEventWithModifiers::set_meta_pressed(bool p_enabled) {}

bool InputEventWithModifiers::is_meta_pressed() const {}

void InputEventWithModifiers::set_modifiers_from_event(const InputEventWithModifiers *event) {}

BitField<KeyModifierMask> InputEventWithModifiers::get_modifiers_mask() const {}

String InputEventWithModifiers::as_text() const {}

String InputEventWithModifiers::to_string() {}

void InputEventWithModifiers::_bind_methods() {}

void InputEventWithModifiers::_validate_property(PropertyInfo &p_property) const {}

///////////////////////////////////

void InputEventKey::set_pressed(bool p_pressed) {}

void InputEventKey::set_keycode(Key p_keycode) {}

Key InputEventKey::get_keycode() const {}

void InputEventKey::set_key_label(Key p_key_label) {}

Key InputEventKey::get_key_label() const {}

void InputEventKey::set_physical_keycode(Key p_keycode) {}

Key InputEventKey::get_physical_keycode() const {}

void InputEventKey::set_unicode(char32_t p_unicode) {}

char32_t InputEventKey::get_unicode() const {}

void InputEventKey::set_location(KeyLocation p_key_location) {}

KeyLocation InputEventKey::get_location() const {}

void InputEventKey::set_echo(bool p_enable) {}

bool InputEventKey::is_echo() const {}

Key InputEventKey::get_keycode_with_modifiers() const {}

Key InputEventKey::get_physical_keycode_with_modifiers() const {}

Key InputEventKey::get_key_label_with_modifiers() const {}

String InputEventKey::as_text_physical_keycode() const {}

String InputEventKey::as_text_keycode() const {}

String InputEventKey::as_text_key_label() const {}

String InputEventKey::as_text_location() const {}

String InputEventKey::as_text() const {}

String InputEventKey::to_string() {}

Ref<InputEventKey> InputEventKey::create_reference(Key p_keycode, bool p_physical) {}

bool InputEventKey::action_match(const Ref<InputEvent> &p_event, bool p_exact_match, float p_deadzone, bool *r_pressed, float *r_strength, float *r_raw_strength) const {}

bool InputEventKey::is_match(const Ref<InputEvent> &p_event, bool p_exact_match) const {}

void InputEventKey::_bind_methods() {}

///////////////////////////////////

void InputEventMouse::set_button_mask(BitField<MouseButtonMask> p_mask) {}

BitField<MouseButtonMask> InputEventMouse::get_button_mask() const {}

void InputEventMouse::set_position(const Vector2 &p_pos) {}

Vector2 InputEventMouse::get_position() const {}

void InputEventMouse::set_global_position(const Vector2 &p_global_pos) {}

Vector2 InputEventMouse::get_global_position() const {}

void InputEventMouse::_bind_methods() {}

///////////////////////////////////

void InputEventMouseButton::set_factor(float p_factor) {}

float InputEventMouseButton::get_factor() const {}

void InputEventMouseButton::set_button_index(MouseButton p_index) {}

MouseButton InputEventMouseButton::get_button_index() const {}

void InputEventMouseButton::set_pressed(bool p_pressed) {}

void InputEventMouseButton::set_canceled(bool p_canceled) {}

void InputEventMouseButton::set_double_click(bool p_double_click) {}

bool InputEventMouseButton::is_double_click() const {}

Ref<InputEvent> InputEventMouseButton::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {}

bool InputEventMouseButton::action_match(const Ref<InputEvent> &p_event, bool p_exact_match, float p_deadzone, bool *r_pressed, float *r_strength, float *r_raw_strength) const {}

bool InputEventMouseButton::is_match(const Ref<InputEvent> &p_event, bool p_exact_match) const {}

static const char *_mouse_button_descriptions[9] =;

String InputEventMouseButton::as_text() const {}

String InputEventMouseButton::to_string() {}

void InputEventMouseButton::_bind_methods() {}

///////////////////////////////////

void InputEventMouseMotion::set_tilt(const Vector2 &p_tilt) {}

Vector2 InputEventMouseMotion::get_tilt() const {}

void InputEventMouseMotion::set_pressure(float p_pressure) {}

float InputEventMouseMotion::get_pressure() const {}

void InputEventMouseMotion::set_pen_inverted(bool p_inverted) {}

bool InputEventMouseMotion::get_pen_inverted() const {}

void InputEventMouseMotion::set_relative(const Vector2 &p_relative) {}

Vector2 InputEventMouseMotion::get_relative() const {}

void InputEventMouseMotion::set_relative_screen_position(const Vector2 &p_relative) {}

Vector2 InputEventMouseMotion::get_relative_screen_position() const {}

void InputEventMouseMotion::set_velocity(const Vector2 &p_velocity) {}

Vector2 InputEventMouseMotion::get_velocity() const {}

void InputEventMouseMotion::set_screen_velocity(const Vector2 &p_velocity) {}

Vector2 InputEventMouseMotion::get_screen_velocity() const {}

Ref<InputEvent> InputEventMouseMotion::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {}

String InputEventMouseMotion::as_text() const {}

String InputEventMouseMotion::to_string() {}

bool InputEventMouseMotion::accumulate(const Ref<InputEvent> &p_event) {}

void InputEventMouseMotion::_bind_methods() {}

///////////////////////////////////

void InputEventJoypadMotion::set_axis(JoyAxis p_axis) {}

JoyAxis InputEventJoypadMotion::get_axis() const {}

void InputEventJoypadMotion::set_axis_value(float p_value) {}

float InputEventJoypadMotion::get_axis_value() const {}

bool InputEventJoypadMotion::action_match(const Ref<InputEvent> &p_event, bool p_exact_match, float p_deadzone, bool *r_pressed, float *r_strength, float *r_raw_strength) const {}

bool InputEventJoypadMotion::is_match(const Ref<InputEvent> &p_event, bool p_exact_match) const {}

static const char *_joy_axis_descriptions[(size_t)JoyAxis::MAX] =;

String InputEventJoypadMotion::as_text() const {}

String InputEventJoypadMotion::to_string() {}

Ref<InputEventJoypadMotion> InputEventJoypadMotion::create_reference(JoyAxis p_axis, float p_value) {}

void InputEventJoypadMotion::_bind_methods() {}

///////////////////////////////////

void InputEventJoypadButton::set_button_index(JoyButton p_index) {}

JoyButton InputEventJoypadButton::get_button_index() const {}

void InputEventJoypadButton::set_pressed(bool p_pressed) {}

void InputEventJoypadButton::set_pressure(float p_pressure) {}

float InputEventJoypadButton::get_pressure() const {}

bool InputEventJoypadButton::action_match(const Ref<InputEvent> &p_event, bool p_exact_match, float p_deadzone, bool *r_pressed, float *r_strength, float *r_raw_strength) const {}

bool InputEventJoypadButton::is_match(const Ref<InputEvent> &p_event, bool p_exact_match) const {}

static const char *_joy_button_descriptions[(size_t)JoyButton::SDL_MAX] =;

String InputEventJoypadButton::as_text() const {}

String InputEventJoypadButton::to_string() {}

Ref<InputEventJoypadButton> InputEventJoypadButton::create_reference(JoyButton p_btn_index) {}

void InputEventJoypadButton::_bind_methods() {}

///////////////////////////////////

void InputEventScreenTouch::set_index(int p_index) {}

int InputEventScreenTouch::get_index() const {}

void InputEventScreenTouch::set_position(const Vector2 &p_pos) {}

Vector2 InputEventScreenTouch::get_position() const {}

void InputEventScreenTouch::set_pressed(bool p_pressed) {}

void InputEventScreenTouch::set_canceled(bool p_canceled) {}

void InputEventScreenTouch::set_double_tap(bool p_double_tap) {}
bool InputEventScreenTouch::is_double_tap() const {}

Ref<InputEvent> InputEventScreenTouch::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {}

String InputEventScreenTouch::as_text() const {}

String InputEventScreenTouch::to_string() {}

void InputEventScreenTouch::_bind_methods() {}

///////////////////////////////////

void InputEventScreenDrag::set_index(int p_index) {}

int InputEventScreenDrag::get_index() const {}

void InputEventScreenDrag::set_tilt(const Vector2 &p_tilt) {}

Vector2 InputEventScreenDrag::get_tilt() const {}

void InputEventScreenDrag::set_pressure(float p_pressure) {}

float InputEventScreenDrag::get_pressure() const {}

void InputEventScreenDrag::set_pen_inverted(bool p_inverted) {}

bool InputEventScreenDrag::get_pen_inverted() const {}

void InputEventScreenDrag::set_position(const Vector2 &p_pos) {}

Vector2 InputEventScreenDrag::get_position() const {}

void InputEventScreenDrag::set_relative(const Vector2 &p_relative) {}

Vector2 InputEventScreenDrag::get_relative() const {}

void InputEventScreenDrag::set_relative_screen_position(const Vector2 &p_relative) {}

Vector2 InputEventScreenDrag::get_relative_screen_position() const {}

void InputEventScreenDrag::set_velocity(const Vector2 &p_velocity) {}

Vector2 InputEventScreenDrag::get_velocity() const {}

void InputEventScreenDrag::set_screen_velocity(const Vector2 &p_velocity) {}

Vector2 InputEventScreenDrag::get_screen_velocity() const {}

Ref<InputEvent> InputEventScreenDrag::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {}

String InputEventScreenDrag::as_text() const {}

String InputEventScreenDrag::to_string() {}

bool InputEventScreenDrag::accumulate(const Ref<InputEvent> &p_event) {}

void InputEventScreenDrag::_bind_methods() {}

///////////////////////////////////

void InputEventAction::set_action(const StringName &p_action) {}

StringName InputEventAction::get_action() const {}

void InputEventAction::set_pressed(bool p_pressed) {}

void InputEventAction::set_strength(float p_strength) {}

float InputEventAction::get_strength() const {}

void InputEventAction::set_event_index(int p_index) {}

int InputEventAction::get_event_index() const {}

bool InputEventAction::is_match(const Ref<InputEvent> &p_event, bool p_exact_match) const {}

bool InputEventAction::is_action(const StringName &p_action) const {}

bool InputEventAction::action_match(const Ref<InputEvent> &p_event, bool p_exact_match, float p_deadzone, bool *r_pressed, float *r_strength, float *r_raw_strength) const {}

String InputEventAction::as_text() const {}

String InputEventAction::to_string() {}

void InputEventAction::_bind_methods() {}

///////////////////////////////////

void InputEventGesture::set_position(const Vector2 &p_pos) {}

void InputEventGesture::_bind_methods() {}

Vector2 InputEventGesture::get_position() const {}

///////////////////////////////////

void InputEventMagnifyGesture::set_factor(real_t p_factor) {}

real_t InputEventMagnifyGesture::get_factor() const {}

Ref<InputEvent> InputEventMagnifyGesture::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {}

String InputEventMagnifyGesture::as_text() const {}

String InputEventMagnifyGesture::to_string() {}

void InputEventMagnifyGesture::_bind_methods() {}

///////////////////////////////////

void InputEventPanGesture::set_delta(const Vector2 &p_delta) {}

Vector2 InputEventPanGesture::get_delta() const {}

Ref<InputEvent> InputEventPanGesture::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {}

String InputEventPanGesture::as_text() const {}

String InputEventPanGesture::to_string() {}

void InputEventPanGesture::_bind_methods() {}

///////////////////////////////////

void InputEventMIDI::set_channel(const int p_channel) {}

int InputEventMIDI::get_channel() const {}

void InputEventMIDI::set_message(const MIDIMessage p_message) {}

MIDIMessage InputEventMIDI::get_message() const {}

void InputEventMIDI::set_pitch(const int p_pitch) {}

int InputEventMIDI::get_pitch() const {}

void InputEventMIDI::set_velocity(const int p_velocity) {}

int InputEventMIDI::get_velocity() const {}

void InputEventMIDI::set_instrument(const int p_instrument) {}

int InputEventMIDI::get_instrument() const {}

void InputEventMIDI::set_pressure(const int p_pressure) {}

int InputEventMIDI::get_pressure() const {}

void InputEventMIDI::set_controller_number(const int p_controller_number) {}

int InputEventMIDI::get_controller_number() const {}

void InputEventMIDI::set_controller_value(const int p_controller_value) {}

int InputEventMIDI::get_controller_value() const {}

String InputEventMIDI::as_text() const {}

String InputEventMIDI::to_string() {}

void InputEventMIDI::_bind_methods() {}

///////////////////////////////////

void InputEventShortcut::set_shortcut(Ref<Shortcut> p_shortcut) {}

Ref<Shortcut> InputEventShortcut::get_shortcut() {}

void InputEventShortcut::_bind_methods() {}

String InputEventShortcut::as_text() const {}

String InputEventShortcut::to_string() {}

InputEventShortcut::InputEventShortcut() {}