Classes | |
struct | exception |
class | UserEvent |
class | window |
The wrapper class for the SDL_Window class. More... | |
Functions | |
static std::string | create_error (const std::string &operation, const bool use_sdl_error) |
uint32_t | get_mouse_state (int *x, int *y) |
A wrapper for SDL_GetMouseState that gives coordinates in draw space. More... | |
uint32_t | get_mouse_button_mask () |
Returns the current mouse button mask. More... | |
point | get_mouse_location () |
Returns the current mouse location in draw space. More... | |
unsigned | get_mods () |
Returns a bitmask of active modifier keys (ctrl, shift, alt, gui). More... | |
version_info | get_version () |
Returns the runtime SDL version. More... | |
bool | runtime_at_least (uint8_t major, uint8_t minor=0, uint8_t patch=0) |
Returns true if the runtime SDL version is at or greater than the specified version, false otherwise. More... | |
Variables | |
constexpr const SDL_Rect | empty_rect { 0, 0, 0, 0 } |
|
static |
Definition at line 23 of file exception.cpp.
unsigned sdl::get_mods | ( | ) |
Returns a bitmask of active modifier keys (ctrl, shift, alt, gui).
Unused modifier keys (caps lock, scroll lock, num lock, AltGr) are filtered out and will always be unset.
Left and right keys are not distinguished. If either is detected, both will be set. For example if only left shift is down, both KMOD_LSHIFT and KMOD_RSHIFT will be set in the returned bitmask.
Definition at line 61 of file input.cpp.
Referenced by hotkey::create_hotkey(), hotkey::is_hotkeyable_event(), hotkey::hotkey_keyboard::matches_helper(), and hotkey::hotkey_mouse::matches_helper().
uint32_t sdl::get_mouse_button_mask | ( | ) |
Returns the current mouse button mask.
Definition at line 49 of file input.cpp.
Referenced by gui2::event::distributor::initialize_state(), editor::editor_controller::mouse_motion(), events::mouse_handler_base::mouse_motion_default(), gui2::window::show(), and gui2::event::mouse_button< I >::signal_handler_sdl_button_up().
point sdl::get_mouse_location | ( | ) |
Returns the current mouse location in draw space.
Definition at line 54 of file input.cpp.
References get_mouse_state(), and p.
Referenced by gui2::get_mouse_position(), gui::scrollarea::handle_event(), gui::scrollbar::handle_event(), events::mouse_handler::hovered_hex(), events::mouse_handler_base::init_dragging(), events::mouse_handler_base::mouse_update(), events::mouse_handler_base::mouse_wheel(), hotkey::command_executor::show_menu(), lua_gui2::show_menu(), events::mouse_handler::touch_motion(), and editor::editor_toolkit::update_mouse_action_highlights().
uint32_t sdl::get_mouse_state | ( | int * | x, |
int * | y | ||
) |
A wrapper for SDL_GetMouseState that gives coordinates in draw space.
Definition at line 27 of file input.cpp.
References video::game_canvas_size(), video::headless(), and video::input_area().
Referenced by get_mouse_location(), gui::textbox::handle_event(), controller_base::long_touch_callback(), events::mouse_handler::mouse_motion(), events::mouse_handler_base::mouse_motion_default(), controller_base::play_slice(), and events::mouse_handler::touch_motion().
version_info sdl::get_version | ( | ) |
Returns the runtime SDL version.
Definition at line 36 of file utils.cpp.
Referenced by video::get_dpi().
bool sdl::runtime_at_least | ( | uint8_t | major, |
uint8_t | minor = 0 , |
||
uint8_t | patch = 0 |
||
) |
Returns true if the runtime SDL version is at or greater than the specified version, false otherwise.
Definition at line 43 of file utils.cpp.
Referenced by sdl_bad_at_rects().
|
constexpr |
Definition at line 30 of file rect.hpp.
Referenced by draw::blit(), gui2::widget::calculate_clipping_rectangle(), gui::button::calculate_size(), draw::flipped(), draw::get_clip(), font::get_floating_label_rect(), terrain_label::get_rect(), draw::get_viewport(), gui2::window::render(), and draw::render_target_setter::~render_target_setter().