.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_CreateWindowWithPosition: .\" https://wiki.libsdl.org/SDL_CreateWindowWithPosition .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-prerelease-3.0.0-2612-g321fc1841 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_CreateWindowWithPosition .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_CreateWindowWithPosition 3 "SDL 3.0.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_CreateWindowWithPosition \- Create a window with the specified position, dimensions, and flags\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "SDL_Window* SDL_CreateWindowWithPosition(const char *title, int x, int y, int w, int h, Uint32 flags); .fi .SH DESCRIPTION .BR flags may be any of the following OR'd together: \(bu .BR .BR SDL_WINDOW_FULLSCREEN : fullscreen window at desktop resolution \(bu .BR .BR SDL_WINDOW_OPENGL : window usable with an OpenGL context \(bu .BR .BR SDL_WINDOW_VULKAN : window usable with a Vulkan instance \(bu .BR .BR SDL_WINDOW_METAL : window usable with a Metal instance \(bu .BR .BR SDL_WINDOW_HIDDEN : window is not visible \(bu .BR .BR SDL_WINDOW_BORDERLESS : no window decoration \(bu .BR .BR SDL_WINDOW_RESIZABLE : window can be resized \(bu .BR .BR SDL_WINDOW_MINIMIZED : window is minimized \(bu .BR .BR SDL_WINDOW_MAXIMIZED : window is maximized \(bu .BR .BR SDL_WINDOW_MOUSE_GRABBED : window has grabbed mouse focus The .BR SDL_Window is implicitly shown if .BR SDL_WINDOW_HIDDEN is not set\[char46] On Apple's macOS, you .B must set the NSHighResolutionCapable Info\[char46]plist property to YES, otherwise you will not receive a High-DPI OpenGL canvas\[char46] The window pixel size may differ from its window coordinate size if the window is on a high pixel density display\[char46] Use .BR SDL_GetWindowSize () to query the client area's size in window coordinates, and .BR SDL_GetWindowSizeInPixels () or .BR SDL_GetRenderOutputSize () to query the drawable size in pixels\[char46] Note that the drawable size can vary after the window is created and should be queried again if you get an .BR SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event\[char46] If the window is set fullscreen, the width and height parameters .BR w and .BR h will not be used\[char46] However, invalid size parameters (e\[char46]g\[char46] too large) may still fail\[char46] Window size is actually limited to 16384 x 16384 for all platforms at window creation\[char46] If the window is created with any of the .BR SDL_WINDOW_OPENGL or .BR SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function ( .BR SDL_GL_LoadLibrary or .BR SDL_Vulkan_LoadLibrary ) is called and the corresponding UnloadLibrary function is called by .BR SDL_DestroyWindow ()\[char46] If .BR SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver, .BR SDL_CreateWindow () will fail because .BR SDL_Vulkan_LoadLibrary () will fail\[char46] If .BR SDL_WINDOW_METAL is specified on an OS that does not support Metal, .BR SDL_CreateWindow () will fail\[char46] On non-Apple devices, SDL requires you to either not link to the Vulkan loader or link to a dynamic library version\[char46] This limitation may be removed in a future version of SDL\[char46] .SH FUNCTION PARAMETERS .TP .I title the title of the window, in UTF-8 encoding .TP .I x the x position of the window, or .BR .BR SDL_WINDOWPOS_CENTERED .TP .I y the y position of the window, or .BR .BR SDL_WINDOWPOS_CENTERED .TP .I w the width of the window .TP .I h the height of the window .TP .I flags 0, or one or more .BR SDL_WindowFlags OR'd together .SH RETURN VALUE Returns the window that was created or NULL on failure; call .BR SDL_GetError () for more information\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_CreatePopupWindow (3), .BR SDL_CreateWindow (3), .BR SDL_CreateWindowFrom (3), .BR SDL_DestroyWindow (3)