.\" 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_CreateWindowWithProperties: .\" https://wiki.libsdl.org/SDL_CreateWindowWithProperties .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-3.1.0 .\" 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_CreateWindowWithProperties .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_CreateWindowWithProperties 3 "SDL 3.1.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_CreateWindowWithProperties \- Create a window with the specified properties\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "SDL_Window* SDL_CreateWindowWithProperties(SDL_PropertiesID props); .fi .SH DESCRIPTION These are the supported properties: \(bu .BR .BR SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN : true if the window should be always on top \(bu .BR .BR SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN : true if the window has no window decoration \(bu .BR .BR SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN : true if the window will be used with an externally managed graphics context\[char46] \(bu .BR .BR SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN : true if the window should accept keyboard input (defaults true) \(bu .BR .BR SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN : true if the window should start in fullscreen mode at desktop resolution \(bu .BR .BR SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER : the height of the window \(bu .BR .BR SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN : true if the window should start hidden \(bu .BR .BR SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN : true if the window uses a high pixel density buffer if possible \(bu .BR .BR SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN : true if the window should start maximized \(bu .BR .BR SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN : true if the window is a popup menu \(bu .BR .BR SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN : true if the window will be used with Metal rendering \(bu .BR .BR SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN : true if the window should start minimized \(bu .BR .BR SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN : true if the window starts with grabbed mouse focus \(bu .BR .BR SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN : true if the window will be used with OpenGL rendering \(bu .BR .BR SDL_PROP_WINDOW_CREATE_PARENT_POINTER : an .BR SDL_Window that will be the parent of this window, required for windows with the "toolip" and "menu" properties \(bu .BR .BR SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN : true if the window should be resizable \(bu .BR .BR SDL_PROP_WINDOW_CREATE_TITLE_STRING : the title of the window, in UTF-8 encoding \(bu .BR .BR SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN : true if the window show transparent in the areas with alpha of 0 \(bu .BR .BR SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN : true if the window is a tooltip \(bu .BR .BR SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN : true if the window is a utility window, not showing in the task bar and window list \(bu .BR .BR SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN : true if the window will be used with Vulkan rendering \(bu .BR .BR SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER : the width of the window \(bu .BR .BR SDL_PROP_WINDOW_CREATE_X_NUMBER : the x position of the window, or .BR .BR SDL_WINDOWPOS_CENTERED , defaults to .BR .BR SDL_WINDOWPOS_UNDEFINED \[char46] This is relative to the parent for windows with the "parent" property set\[char46] \(bu .BR .BR SDL_PROP_WINDOW_CREATE_Y_NUMBER : the y position of the window, or .BR .BR SDL_WINDOWPOS_CENTERED , defaults to .BR .BR SDL_WINDOWPOS_UNDEFINED \[char46] This is relative to the parent for windows with the "parent" property set\[char46] These are additional supported properties on macOS: \(bu .BR .BR SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER : the .BR (__unsafe_unretained) NSWindow associated with the window, if you want to wrap an existing window\[char46] \(bu .BR .BR SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER : the .BR (__unsafe_unretained) NSView associated with the window, defaults to .BR [window contentView] These are additional supported properties on Wayland: \(bu .BR .BR SDL_PROP_WINDOW_CREATE_WAYLAND_SCALE_TO_DISPLAY_BOOLEAN \(bu true if the window should use forced scaling designed to produce 1:1 pixel mapping if not flagged as being DPI-aware\[char46] This is intended to allow legacy applications to be displayed without desktop scaling being applied, and has issues with certain display configurations, as this forces the window to behave in a way that Wayland desktops were not designed to accommodate\[char46] Potential issues include, but are not limited to: rounding errors can result when odd window sizes/scales are used, the window may be unusably small, the window may jump in visible size at times, the window may appear to be larger than the desktop space, and possible loss of cursor precision can occur\[char46] New applications should be designed with proper DPI awareness and handling instead of enabling this\[char46] \(bu .BR .BR SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN \(bu true if the application wants to use the Wayland surface for a custom role and does not want it attached to an XDG toplevel window\[char46] See docs/README-wayland\[char46]md for more information on using custom surfaces\[char46] - .BR SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN - true if the application wants an associated wl_egl_window .BR object to be created, even if the window does not have the OpenGL property or flag set\[char46] \(bu .BR SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER .BR - the wl_surface associated with the window, if you want to wrap an existing window\[char46] See docs/README-wayland\[char46]md for more information\[char46] These are additional supported properties on Windows: \(bu .BR SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER .BR : the HWND associated with the window, if you want to wrap an existing window\[char46] \(bu .BR SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER .BR : optional, another window to share pixel format with, useful for OpenGL windows These are additional supported properties with X11: \(bu .BR SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER .BR : the X11 Window associated with the window, if you want to wrap an existing window\[char46] The window is implicitly shown if the "hidden" property is not set\[char46] Windows with the "tooltip" and "menu" properties are popup windows and have the behaviors and guidelines outlined in .BR SDL_CreatePopupWindow ()`\[char46] .SH FUNCTION PARAMETERS .TP .I props the properties to use .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_CreateProperties (3), .BR SDL_CreateWindow (3), .BR SDL_DestroyWindow (3)