Added SDL_GetWindowParent() to get the parent of popup windows

This commit is contained in:
Sam Lantinga
2023-03-13 11:20:42 -07:00
parent ebe3a9dc44
commit 4dd26698fc
6 changed files with 24 additions and 0 deletions

View File

@@ -840,6 +840,7 @@ SDL3_0.0.0 {
SDL_GetRenderWindowSize;
SDL_GetSystemTheme;
SDL_CreatePopupWindow;
SDL_GetWindowParent;
# extra symbols go here (don't modify this line)
local: *;
};

View File

@@ -867,3 +867,4 @@
#define SDL_GetRenderWindowSize SDL_GetRenderWindowSize_REAL
#define SDL_GetSystemTheme SDL_GetSystemTheme_REAL
#define SDL_CreatePopupWindow SDL_CreatePopupWindow_REAL
#define SDL_GetWindowParent SDL_GetWindowParent_REAL

View File

@@ -912,3 +912,4 @@ SDL_DYNAPI_PROC(int,SDL_GetRenderScale,(SDL_Renderer *a, float *b, float *c),(a,
SDL_DYNAPI_PROC(int,SDL_GetRenderWindowSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_SystemTheme,SDL_GetSystemTheme,(void),(),return)
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreatePopupWindow,(SDL_Window *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return)
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetWindowParent,(SDL_Window *a),(a),return)

View File

@@ -2191,6 +2191,13 @@ SDL_Window *SDL_GetWindowFromID(SDL_WindowID id)
return NULL;
}
SDL_Window *SDL_GetWindowParent(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, NULL);
return window->parent;
}
Uint32 SDL_GetWindowFlags(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, 0);