@@ -739,6 +739,27 @@ procedure SDL_GetWindowSize(window: PSDL_Window; w: pcint; h: pcint); cdecl;
739739function SDL_GetWindowBordersSize (window: PSDL_Window; top, left, bottom, right: pcint): cint; cdecl;
740740 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_GetWindowBordersSize' { $ENDIF} { $ENDIF} ;
741741
742+ { **
743+ * Get the size of a window in pixels.
744+ *
745+ * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
746+ * drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
747+ * platform with high-DPI support (Apple calls this "Retina"), and not
748+ * disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
749+ *
750+ * \param window the window from which the drawable size should be queried
751+ * \param w a pointer to variable for storing the width in pixels, may be NIL
752+ * \param h a pointer to variable for storing the height in pixels, may be
753+ * NIL
754+ *
755+ * \since This function is available since SDL 2.26.0.
756+ *
757+ * \sa SDL_CreateWindow
758+ * \sa SDL_GetWindowSize
759+ *}
760+ procedure SDL_GetWindowSizeInPixels (window: PSDL_Window; w, h: pcuint); cdecl;
761+ external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_GetWindowSizeInPixels' { $ENDIF} { $ENDIF} ;
762+
742763 { **
743764 * Set the minimum size of a window's client area.
744765 *
@@ -914,6 +935,19 @@ procedure SDL_RestoreWindow(window: PSDL_Window); cdecl;
914935function SDL_SetWindowFullscreen (window: PSDL_Window; flags: TSDL_WindowFlags): cint; cdecl;
915936 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_SetWindowFullscreen' { $ENDIF} { $ENDIF} ;
916937
938+ { **
939+ * Return whether the window has a surface associated with it.
940+ *
941+ * \returns SDL_TRUE if there is a surface associated with the window, or
942+ * SDL_FALSE otherwise.
943+ *
944+ * \since This function is available since SDL 2.28.0.
945+ *
946+ * \sa SDL_GetWindowSurface
947+ *}
948+ function SDL_HasWindowSurface (window: PSDL_Window): TSDL_Bool; cdecl;
949+ external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_HasWindowSurface' { $ENDIF} { $ENDIF} ;
950+
917951 { **
918952 * Get the SDL surface associated with the window.
919953 *
@@ -955,6 +989,21 @@ function SDL_UpdateWindowSurface(window: PSDL_Window): cint; cdecl;
955989function SDL_UpdateWindowSurfaceRects (window: PSDL_Window; rects: PSDL_Rect; numrects: cint): cint; cdecl;
956990 external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_UpdateWindowSurfaceRects' { $ENDIF} { $ENDIF} ;
957991
992+ { **
993+ * Destroy the surface associated with the window.
994+ *
995+ * \param window the window to update
996+ * \returns 0 on success or a negative error code on failure; call
997+ * SDL_GetError() for more information.
998+ *
999+ * \since This function is available since SDL 2.28.0.
1000+ *
1001+ * \sa SDL_GetWindowSurface
1002+ * \sa SDL_HasWindowSurface
1003+ *}
1004+ function SDL_DestroyWindowSurface (window: PSDL_Window): cint; cdecl;
1005+ external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_DestroyWindowSurface' { $ENDIF} { $ENDIF} ;
1006+
9581007 { **
9591008 * Set a window's input grab mode.
9601009 *
0 commit comments