Add SDL_WindowID type for SDL_Window id

This commit is contained in:
Sylvain
2023-01-04 10:27:28 +01:00
committed by Sam Lantinga
parent 86c6376140
commit 6863f0b2d8
5 changed files with 22 additions and 17 deletions

View File

@@ -69,7 +69,7 @@ typedef struct SDL_WindowUserData
struct SDL_Window
{
const void *magic;
Uint32 id;
SDL_WindowID id;
char *title;
SDL_Surface *icon;
int x, y;
@@ -349,7 +349,7 @@ struct SDL_VideoDevice
SDL_Window *windows;
SDL_Window *grabbed_window;
Uint8 window_magic;
Uint32 next_object_id;
SDL_WindowID next_object_id;
char *clipboard_text;
char *primary_selection_text;
SDL_bool setting_display_mode;

View File

@@ -1990,7 +1990,7 @@ SDL_HasWindows(void)
return _this && _this->windows != NULL;
}
Uint32
SDL_WindowID
SDL_GetWindowID(SDL_Window *window)
{
CHECK_WINDOW_MAGIC(window, 0);
@@ -1999,7 +1999,7 @@ SDL_GetWindowID(SDL_Window *window)
}
SDL_Window *
SDL_GetWindowFromID(Uint32 id)
SDL_GetWindowFromID(SDL_WindowID id)
{
SDL_Window *window;