载入中...
搜索中...
未找到
Window.h
浏览该文件的文档.
Platform window interface (SDL implementation on desktop/mobile). Script: win <- eve....
Definition Window.h:46
Definition Window.h:15
void * getHandle() const override
Native window handle (SDL_Window* on SDL backend).
Definition Window.h:62
bool setFullscreenExclusive(bool fullscreen) override
Switches between exclusive fullscreen and windowed mode.
Definition Window.cpp:210
void setVSync(int vsync) override
Enables/disables vertical sync (0 = off, 1 = on).
Definition Window.cpp:331
int showMessageBoxData(const MessageBoxData &data) override
Shows a configurable message box; returns the pressed button index.
Definition Window.cpp:453
void setSize(int width, int height) override
Requests a new logical window size.
Definition Window.cpp:58
double getDPIScale() const override
Current UI/logical DPI scale (1.0 on non-retina displays).
Definition Window.cpp:346
int getPixelHeight() const override
Definition Window.cpp:339
std::string getDisplayOrientation(int display) const override
Display orientation string (e.g. "landscape").
Definition Window.cpp:410
double fromPixels(double x) const override
Definition Window.cpp:384
bool setWindowSettings(WindowSettings settings) override
Applies a full WindowSettings struct (recreates the window when needed).
Definition Window.cpp:70
void setWindowTitle(const std::string &title) override
Sets the window title shown in the OS title bar.
Definition Window.cpp:273
void fromPixelsXY(double px, double py, double &wx, double &wy) const override
Definition Window.cpp:394
void requestAttention(bool continuous) override
Requests OS attention (flashing taskbar); continuous repeats until focused.
Definition Window.cpp:476
bool showMessageBox(const std::string &title, const std::string &message, const std::string &type, bool attachToWindow) override
Shows a modal message box ("info", "warning", or "error").
Definition Window.cpp:447
std::vector< WindowSize > getFullscreenSizes(int display) const override
Fullscreen sizes supported by a display.
Definition Window.cpp:421
void updateSettings(const WindowSettings &newsettings, bool updateGraphicsViewport)
Used by event backend on resize to refresh drawable size / viewport.
Definition Window.cpp:573
void windowToDPICoords(double *x, double *y) const override
Converts window logical coordinates to UI-DPI coordinates.
Definition Window.cpp:367
double getNativeDPIScale() const override
Native DPI scale reported by the OS for this window.
Definition Window.cpp:341
void pixelToWindowCoords(double *x, double *y) const override
Converts framebuffer pixel coordinates to window logical coordinates.
Definition Window.cpp:359
int getPixelWidth() const override
Framebuffer (pixel) dimensions of the window.
Definition Window.cpp:337
double toPixels(double x) const override
Scales a logical length to UI pixels (and back).
Definition Window.cpp:382
int getDisplayCount() const override
Number of displays attached to the system.
Definition Window.cpp:399
void setPosition(int x, int y, int display) override
Moves the window to a position in logical units on the given display.
Definition Window.cpp:280
bool setFullscreenDesktop(bool fullscreen) override
Switches between desktop fullscreen and windowed mode.
Definition Window.cpp:206
void toPixelsXY(double wx, double wy, double &px, double &py) const override
Vector variants of the coordinate conversions above.
Definition Window.cpp:389
bool setIconRGBA(const uint8_t *rgba, int width, int height) override
Sets the window icon from tightly packed RGBA8 pixels (w*h*4 bytes).
Definition Window.cpp:487
std::string getDisplayName(int display) const override
Human-readable display name for a display index.
Definition Window.cpp:404
void getPosition(int &x, int &y, int &display) override
Reads the current window position and display index.
Definition Window.cpp:293
void DPIToWindowCoords(double *x, double *y) const override
Converts UI-DPI coordinates to window logical coordinates.
Definition Window.cpp:375
void windowToPixelCoords(double *x, double *y) const override
Converts window logical coordinates to framebuffer pixel coordinates.
Definition Window.cpp:352
WindowSettings getWindowSettings() override
Definition Window.cpp:204
void getDesktopDimensions(int display, int &width, int &height) const override
Desktop resolution of a display.
Definition Window.cpp:437
const std::string & getWindowTitle() const override
Definition Window.cpp:278
WidgetDesc window(std::string title, std::vector< WidgetDesc > children, std::string id)
Top-level window widget with a title bar.
Definition Widget.cpp:225
Definition Build.cpp:11
Display settings for window creation/resize. width/height == 0 selects the desktop display mode size.
Definition Window.h:17