Luna::Window::IWindow
Represents a system window that can be used to display user interface and can be drawn as surface.
interface Luna::Window::IWindow : public virtual Interface
Base type
Member functions
-
Closes this window. On single-window platforms, this causes the application to exit.
-
Checks whether the window is closed. The window handle is invalid when one window is closed.
-
Checks whether the window has input focus.
-
Brings this window to front and acquires input focus for the window.
-
Checks whether the window is minimized.
-
Checks whether the window is maximized.
-
Minimize the window.
-
Maximize the window.
-
Restore the window from minimized or maximized state.
-
Checks whether the cursor is currently directly over the content area of the window.
-
Checks whether the window is visible.
-
virtual RV set_visible(bool visible)=0
Sets the visibility of the window.
-
Checks whether the window is resizable by dragging the border of the window.
-
virtual RV set_resizable(bool resizable)=0
Sets the resizable state of the window.
-
Checks whether the window is frameless. One frameless window does not have border, titlebar and close/minimize/maximize buttons.
-
virtual RV set_frameless(bool frameless)=0
Sets the frameless state of the window.
-
virtual Int2U get_position()=0
Gets the position of the window client area.
-
virtual RV set_position(i32 x, i32 y)=0
Sets the position of the window client area.
-
Gets the size of the content area of the window measured in screen coordinates.
-
virtual RV set_size(u32 width, u32 height)=0
Sets the size of the content area of the window measured in screen coordinates.
-
virtual UInt2U get_framebuffer_size()=0
Gets the framebuffer size of the window context area in pixels.
-
virtual f32 get_dpi_scale_factor()=0
Gets the DPI scaling factor, which is the ratio between the current DPI and the platform's default DPI.
-
virtual bool is_full_screen()=0
Checks whether the window is full screen.
-
virtual monitor_t get_monitor()=0
Gets the monitor that one full screen window is attached to. Returns
nullptr
if the window is not in full-screen mode. -
virtual RV set_title(const c8 *title)=0
Sets the window title.
-
virtual RV set_display_settings(const WindowDisplaySettings &display_settings)=0
Sets the window display settings.
-
virtual Int2U screen_to_client(const Int2U &point)=0
Converts one screen coordinate to one client coordinate.
-
virtual Int2U client_to_screen(const Int2U &point)=0
Converts one client coordinate to one screen coordinate.
-
virtual Event< window_close_event_handler_t > & get_close_event()=0
Gets the close event of this window.
-
virtual Event< window_focus_event_handler_t > & get_focus_event()=0
Gets the focus event of this window.
-
virtual Event< window_lose_focus_event_handler_t > & get_lose_focus_event()=0
Gets the lose focus event of this window. This event will be emitted when the window loses focus.
-
virtual Event< window_show_event_handler_t > & get_show_event()=0
Gets the show event of this window.
-
virtual Event< window_hide_event_handler_t > & get_hide_event()=0
Gets the hide event of this window.
-
virtual Event< window_resize_event_handler_t > & get_resize_event()=0
Gets the resize event of this window.
-
virtual Event< window_framebuffer_resize_event_handler_t > & get_framebuffer_resize_event()=0
Gets the framebuffer resize event of this window.
-
virtual Event< window_move_event_handler_t > & get_move_event()=0
Gets the move event of this window.
-
virtual Event< window_begin_resize_move_t > & get_begin_resize_move_event()=0
Gets the begin resize move event of this window.
-
virtual Event< window_end_resize_move_t > & get_end_resize_move_event()=0
Gets the end resize move event of this window.
-
virtual Event< window_dpi_changed_event_handler_t > & get_dpi_changed_event()=0
Gets the end dpi changed event of this window.
-
virtual Event< window_key_down_event_handler_t > & get_key_down_event()=0
Gets the key down event of this window.
-
virtual Event< window_key_up_event_handler_t > & get_key_up_event()=0
Gets the key up event of this window.
-
virtual Event< window_input_character_event_handler_t > & get_input_character_event()=0
Gets the input character event of this window.
-
virtual Event< window_mouse_move_event_handler_t > & get_mouse_move_event()=0
Gets the mouse move event of this window.
-
virtual Event< window_mouse_down_event_handler_t > & get_mouse_down_event()=0
Gets the mouse down event of this window.
-
virtual Event< window_mouse_up_event_handler_t > & get_mouse_up_event()=0
Gets the mouse up event of this window.
-
virtual Event< window_mouse_wheel_event_handler_t > & get_mouse_wheel_event()=0
Gets the mouse wheel event of this window.
-
virtual Event< window_touch_event_handler_t > & get_touch_event()=0
Gets the touch event of this window.
-
virtual Event< window_drop_file_event_handler_t > & get_drop_file_event()=0
Gets the drop file event of this window.