Platform window interface (SDL implementation on desktop/mobile). Script: win <- eve.Window();
更多...
#include <Window.h>
类 | |
| struct | MessageBoxData |
| struct | WindowSize |
Public 成员函数 | |
| Module_REG (Window) | |
| virtual | ~Window () |
| virtual void | setSize (int width, int height)=0 |
| Requests a new logical window size. | |
| virtual int | getWidth () const =0 |
| virtual int | getHeight () const =0 |
| virtual bool | setWindowSettings (WindowSettings settings)=0 |
| Applies a full WindowSettings struct (recreates the window when needed). | |
| virtual WindowSettings | getWindowSettings ()=0 |
| virtual void | close ()=0 |
| Closes and destroys the underlying window. | |
| virtual bool | setFullscreenDesktop (bool fullscreen)=0 |
| Switches between desktop fullscreen and windowed mode. | |
| virtual bool | setFullscreenExclusive (bool fullscreen)=0 |
| Switches between exclusive fullscreen and windowed mode. | |
| virtual bool | isOpen () const =0 |
| virtual void | setWindowTitle (const std::string &title)=0 |
| Sets the window title shown in the OS title bar. | |
| virtual const std::string & | getWindowTitle () const =0 |
| virtual void | setPosition (int x, int y, int display)=0 |
| Moves the window to a position in logical units on the given display. | |
| virtual void | getPosition (int &x, int &y, int &display)=0 |
| Reads the current window position and display index. | |
| virtual void | minimize ()=0 |
| Minimizes / maximizes / restores the window. | |
| virtual void | maximize ()=0 |
| virtual void | restore ()=0 |
| virtual bool | isMaximized () const =0 |
| virtual bool | isMinimized () const =0 |
| virtual bool | hasFocus () const =0 |
| True when the window has keyboard focus. | |
| virtual bool | hasMouseFocus () const =0 |
| True when the window has mouse focus. | |
| virtual bool | isVisible () const =0 |
| virtual void | setVSync (int vsync)=0 |
| Enables/disables vertical sync (0 = off, 1 = on). | |
| virtual int | getVSync () const =0 |
| virtual int | getPixelWidth () const =0 |
| Framebuffer (pixel) dimensions of the window. | |
| virtual int | getPixelHeight () const =0 |
| virtual double | getDPIScale () const =0 |
| Current UI/logical DPI scale (1.0 on non-retina displays). | |
| virtual double | getNativeDPIScale () const =0 |
| Native DPI scale reported by the OS for this window. | |
| virtual void | windowToPixelCoords (double *x, double *y) const =0 |
| Converts window logical coordinates to framebuffer pixel coordinates. | |
| virtual void | pixelToWindowCoords (double *x, double *y) const =0 |
| Converts framebuffer pixel coordinates to window logical coordinates. | |
| virtual void | windowToDPICoords (double *x, double *y) const =0 |
| Converts window logical coordinates to UI-DPI coordinates. | |
| virtual void | DPIToWindowCoords (double *x, double *y) const =0 |
| Converts UI-DPI coordinates to window logical coordinates. | |
| virtual double | toPixels (double x) const =0 |
| Scales a logical length to UI pixels (and back). | |
| virtual double | fromPixels (double x) const =0 |
| virtual void | toPixelsXY (double wx, double wy, double &px, double &py) const =0 |
| Vector variants of the coordinate conversions above. | |
| virtual void | fromPixelsXY (double px, double py, double &wx, double &wy) const =0 |
| virtual void * | getHandle () const =0 |
| Native window handle (SDL_Window* on SDL backend). | |
| virtual int | getDisplayCount () const =0 |
| Number of displays attached to the system. | |
| virtual std::string | getDisplayName (int display) const =0 |
| Human-readable display name for a display index. | |
| virtual std::string | getDisplayOrientation (int display) const =0 |
| Display orientation string (e.g. "landscape"). | |
| virtual std::vector< WindowSize > | getFullscreenSizes (int display) const =0 |
| Fullscreen sizes supported by a display. | |
| virtual void | getDesktopDimensions (int display, int &width, int &height) const =0 |
| Desktop resolution of a display. | |
| virtual bool | showMessageBox (const std::string &title, const std::string &message, const std::string &type, bool attachToWindow)=0 |
| Shows a modal message box ("info", "warning", or "error"). | |
| virtual int | showMessageBoxData (const MessageBoxData &data)=0 |
| Shows a configurable message box; returns the pressed button index. | |
| virtual void | requestAttention (bool continuous)=0 |
| Requests OS attention (flashing taskbar); continuous repeats until focused. | |
| virtual bool | setIconRGBA (const uint8_t *rgba, int width, int height)=0 |
| Sets the window icon from tightly packed RGBA8 pixels (w*h*4 bytes). | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
详细描述
Platform window interface (SDL implementation on desktop/mobile). Script: win <- eve.Window();
构造及析构函数说明
◆ ~Window()
|
inlinevirtual |
被 eve::window::sdl::Window 重载.
成员函数说明
◆ close()
|
pure virtual |
Closes and destroys the underlying window.
在 eve::window::sdl::Window 内被实现.
◆ DPIToWindowCoords()
|
pure virtual |
Converts UI-DPI coordinates to window logical coordinates.
在 eve::window::sdl::Window 内被实现.
◆ fromPixels()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ fromPixelsXY()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ getDesktopDimensions()
|
pure virtual |
Desktop resolution of a display.
在 eve::window::sdl::Window 内被实现.
◆ getDisplayCount()
|
pure virtual |
Number of displays attached to the system.
在 eve::window::sdl::Window 内被实现.
◆ getDisplayName()
|
pure virtual |
Human-readable display name for a display index.
在 eve::window::sdl::Window 内被实现.
◆ getDisplayOrientation()
|
pure virtual |
Display orientation string (e.g. "landscape").
在 eve::window::sdl::Window 内被实现.
◆ getDPIScale()
|
pure virtual |
Current UI/logical DPI scale (1.0 on non-retina displays).
在 eve::window::sdl::Window 内被实现.
◆ getFullscreenSizes()
|
pure virtual |
Fullscreen sizes supported by a display.
在 eve::window::sdl::Window 内被实现.
◆ getHandle()
|
pure virtual |
Native window handle (SDL_Window* on SDL backend).
在 eve::window::sdl::Window 内被实现.
◆ getHeight()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ getNativeDPIScale()
|
pure virtual |
Native DPI scale reported by the OS for this window.
在 eve::window::sdl::Window 内被实现.
◆ getPixelHeight()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ getPixelWidth()
|
pure virtual |
Framebuffer (pixel) dimensions of the window.
在 eve::window::sdl::Window 内被实现.
◆ getPosition()
|
pure virtual |
Reads the current window position and display index.
在 eve::window::sdl::Window 内被实现.
◆ getVSync()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ getWidth()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ getWindowSettings()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ getWindowTitle()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ hasFocus()
|
pure virtual |
True when the window has keyboard focus.
在 eve::window::sdl::Window 内被实现.
◆ hasMouseFocus()
|
pure virtual |
True when the window has mouse focus.
在 eve::window::sdl::Window 内被实现.
◆ isMaximized()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ isMinimized()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ isOpen()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ isVisible()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ maximize()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ minimize()
|
pure virtual |
Minimizes / maximizes / restores the window.
在 eve::window::sdl::Window 内被实现.
◆ Module_REG()
| eve::window::Window::Module_REG | ( | Window | ) |
◆ pixelToWindowCoords()
|
pure virtual |
Converts framebuffer pixel coordinates to window logical coordinates.
在 eve::window::sdl::Window 内被实现.
◆ requestAttention()
|
pure virtual |
Requests OS attention (flashing taskbar); continuous repeats until focused.
在 eve::window::sdl::Window 内被实现.
◆ restore()
|
pure virtual |
在 eve::window::sdl::Window 内被实现.
◆ setFullscreenDesktop()
|
pure virtual |
Switches between desktop fullscreen and windowed mode.
在 eve::window::sdl::Window 内被实现.
◆ setFullscreenExclusive()
|
pure virtual |
Switches between exclusive fullscreen and windowed mode.
在 eve::window::sdl::Window 内被实现.
◆ setIconRGBA()
|
pure virtual |
Sets the window icon from tightly packed RGBA8 pixels (w*h*4 bytes).
在 eve::window::sdl::Window 内被实现.
◆ setPosition()
|
pure virtual |
Moves the window to a position in logical units on the given display.
在 eve::window::sdl::Window 内被实现.
◆ setSize()
|
pure virtual |
Requests a new logical window size.
在 eve::window::sdl::Window 内被实现.
◆ setVSync()
|
pure virtual |
Enables/disables vertical sync (0 = off, 1 = on).
在 eve::window::sdl::Window 内被实现.
◆ setWindowSettings()
|
pure virtual |
Applies a full WindowSettings struct (recreates the window when needed).
在 eve::window::sdl::Window 内被实现.
◆ setWindowTitle()
|
pure virtual |
Sets the window title shown in the OS title bar.
在 eve::window::sdl::Window 内被实现.
◆ showMessageBox()
|
pure virtual |
Shows a modal message box ("info", "warning", or "error").
在 eve::window::sdl::Window 内被实现.
◆ showMessageBoxData()
|
pure virtual |
Shows a configurable message box; returns the pressed button index.
在 eve::window::sdl::Window 内被实现.
◆ toPixels()
|
pure virtual |
Scales a logical length to UI pixels (and back).
在 eve::window::sdl::Window 内被实现.
◆ toPixelsXY()
|
pure virtual |
Vector variants of the coordinate conversions above.
在 eve::window::sdl::Window 内被实现.
◆ windowToDPICoords()
|
pure virtual |
Converts window logical coordinates to UI-DPI coordinates.
在 eve::window::sdl::Window 内被实现.
◆ windowToPixelCoords()
|
pure virtual |
Converts window logical coordinates to framebuffer pixel coordinates.
在 eve::window::sdl::Window 内被实现.
该类的文档由以下文件生成:
- src/modules/window/Window.h
Public 成员函数 继承自