Window coordinates are in the global space and windows are not tied to a particular display.
Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
This commit is contained in:
parent
2c021d9b34
commit
018af55e16
21 changed files with 300 additions and 190 deletions
|
@ -113,12 +113,20 @@ typedef enum
|
|||
/**
|
||||
* \brief Used to indicate that you don't care what the window position is.
|
||||
*/
|
||||
#define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF
|
||||
#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
|
||||
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
|
||||
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
|
||||
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
|
||||
(((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
|
||||
|
||||
/**
|
||||
* \brief Used to indicate that the window position should be centered.
|
||||
*/
|
||||
#define SDL_WINDOWPOS_CENTERED 0x7FFFFFE
|
||||
#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
|
||||
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
|
||||
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
|
||||
#define SDL_WINDOWPOS_ISCENTERED(X) \
|
||||
(((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
|
||||
|
||||
/**
|
||||
* \brief Event subtype for window events
|
||||
|
@ -303,6 +311,14 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_Disp
|
|||
*/
|
||||
extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
|
||||
|
||||
/**
|
||||
* \brief Get the display index associated with a window.
|
||||
*
|
||||
* \return the display index of the display containing the center of the
|
||||
* window, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetWindowDisplay(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Set the display mode used when a fullscreen window is visible.
|
||||
*
|
||||
|
@ -531,7 +547,7 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
|
|||
* \sa SDL_GetWindowDisplayMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
|
||||
int fullscreen);
|
||||
SDL_bool fullscreen);
|
||||
|
||||
/**
|
||||
* \brief Get an SDL surface associated with the window.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue