Simulant  21.12-349
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Static Public Member Functions | Friends | List of all members
smlt::SDL2Window Class Reference
Inheritance diagram for smlt::SDL2Window:
smlt::Window smlt::Loadable smlt::RenderTarget smlt::EventListenerManager

Public Member Functions

void set_title (const std::string &title) override
 
void show_cursor (bool value=true) override
 
void lock_cursor (bool cursor_locked=true) override
 
void cursor_position (int32_t &mouse_x, int32_t &mouse_y) override
 
- Public Member Functions inherited from smlt::Window
virtual bool create_window (uint16_t width, uint16_t height, uint8_t bpp, bool fullscreen, bool enable_vsync)
 
uint16_t width () const override
 
uint16_t height () const override
 
bool is_fullscreen () const
 
bool vsync_enabled () const
 
float aspect_ratio () const
 
void set_logging_level (LogLevel level)
 
void reset ()
 Window::reset. More...
 
Vec2 coordinate_from_normalized (Ratio rx, Ratio ry)
 
void on_finger_down (TouchPointID touch_id, float normalized_x, float normalized_y, float pressure=1.0)
 
void on_finger_up (TouchPointID touch_id, float normalized_x, float normalized_y)
 
void on_finger_motion (TouchPointID touch_id, float normalized_x, float normalized_y, float dx, float dy)
 
void on_key_down (KeyboardCode code, ModifierKeyState modifiers)
 
void on_key_up (KeyboardCode code, ModifierKeyState modifiers)
 
void on_game_controller_button_down (GameControllerIndex index, JoystickButton button)
 
void on_game_controller_button_up (GameControllerIndex index, JoystickButton button)
 
std::size_t screen_count () const
 
Screenscreen (const std::string &name) const
 
void each_screen (std::function< void(std::string, Screen *)> callback)
 
Screen_create_screen (const std::string &name, uint16_t width, uint16_t height, ScreenFormat format, uint16_t refresh_rate)
 
void _destroy_screen (const std::string &name)
 
bool initialize_assets_and_devices ()
 
void _clean_up ()
 
StageNodeaudio_listener ()
 
void set_audio_listener (StageNode *node)
 
bool has_explicit_audio_listener () const
 
bool has_context () const
 
bool has_focus () const
 
void set_has_focus (bool v=true)
 
void create_panels ()
 
void destroy_panels ()
 
void set_escape_to_quit (bool value=true)
 
bool escape_to_quit_enabled () const
 
void register_panel (uint8_t function_key, std::shared_ptr< Panel > panel)
 
void unregister_panel (uint8_t function_key)
 
void toggle_panel (uint8_t id)
 
void activate_panel (uint8_t id)
 
void deactivate_panel (uint8_t id)
 
bool panel_is_active (uint8_t id)
 
 S_DEFINE_PROPERTY (application, &Window::application_)
 
 S_DEFINE_PROPERTY (renderer, &Window::renderer_)
 
 S_DEFINE_PROPERTY (data, &Window::data_carrier_)
 
 S_DEFINE_PROPERTY (input, &Window::input_manager_)
 
 S_DEFINE_PROPERTY (input_state, &Window::input_state_)
 
 S_DEFINE_PROPERTY (compositor, &Window::compositor_)
 
- Public Member Functions inherited from smlt::RenderTarget
virtual void set_clear_every_frame (uint32_t clear_flags=BUFFER_CLEAR_ALL, const smlt::Colour &colour=smlt::Colour::BLACK)
 
virtual uint32_t clear_every_frame_flags () const
 
virtual smlt::Colour clear_every_frame_colour () const
 
- Public Member Functions inherited from smlt::EventListenerManager
void register_event_listener (EventListener *listener)
 
void unregister_event_listener (EventListener *listener)
 
void each_event_listener (std::function< void(EventListener *)> callback)
 

Static Public Member Functions

static Window::ptr create (Application *app)
 
- Static Public Member Functions inherited from smlt::Window
template<typename T >
static std::shared_ptr< Windowcreate (Application *app)
 

Friends

class Application
 
int event_filter (void *user_data, SDL_Event *event)
 

Additional Inherited Members

- Public Types inherited from smlt::Window
typedef std::shared_ptr< Windowptr
 
- Protected Member Functions inherited from smlt::Window
void set_vsync_enabled (bool vsync)
 
void set_width (uint16_t width)
 
void set_height (uint16_t height)
 
void set_bpp (uint16_t bpp)
 
void set_fullscreen (bool val)
 
void set_has_context (bool value=true)
 
thread::Mutexcontext_lock ()
 
void set_application (Application *app)
 
void update_screens (float dt)
 
InputState_input_state () const
 
- Protected Attributes inherited from smlt::Window
std::shared_ptr< Rendererrenderer_
 
sig::Connection update_conn_
 

The documentation for this class was generated from the following files: