mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 22:35:41 +00:00
Updated SDL_syswm.h for SDL 3.0
* The header is no longer dependent on SDL build configuration * The structures are versioned separately from the rest of SDL * SDL_GetWindowWMInfo() now returns a standard result code and is passed the version expected by the application * Updated WhatsNew.txt and docs/README-migration.md with the first API changes in SDL 3.0
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
int
|
||||
syswm_getWindowWMInfo(void *arg)
|
||||
{
|
||||
SDL_bool result;
|
||||
int result;
|
||||
SDL_Window *window;
|
||||
SDL_SysWMinfo info;
|
||||
|
||||
@@ -27,13 +27,10 @@ syswm_getWindowWMInfo(void *arg)
|
||||
return TEST_ABORTED;
|
||||
}
|
||||
|
||||
/* Initialize info structure with SDL version info */
|
||||
SDL_VERSION(&info.version);
|
||||
|
||||
/* Make call */
|
||||
result = SDL_GetWindowWMInfo(window, &info);
|
||||
result = SDL_GetWindowWMInfo(window, &info, SDL_SYSWM_CURRENT_VERSION);
|
||||
SDLTest_AssertPass("Call to SDL_GetWindowWMInfo()");
|
||||
SDLTest_Log((result == SDL_TRUE) ? "Got window information" : "Couldn't get window information");
|
||||
SDLTest_Log((result == 0) ? "Got window information" : "Couldn't get window information");
|
||||
|
||||
SDL_DestroyWindow(window);
|
||||
SDLTest_AssertPass("Call to SDL_DestroyWindow()");
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
*/
|
||||
#include "SDL.h"
|
||||
|
||||
/* This header includes all the necessary system headers for native windows */
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *tag;
|
||||
@@ -36,10 +33,6 @@ extern NativeWindowFactory X11WindowFactory;
|
||||
#endif
|
||||
|
||||
#ifdef SDL_VIDEO_DRIVER_COCOA
|
||||
/* Actually, we don't really do this, since it involves adding Objective C
|
||||
support to the build system, which is a little tricky. You can uncomment
|
||||
it manually though and link testnativecocoa.m into the test application.
|
||||
*/
|
||||
#define TEST_NATIVE_COCOA
|
||||
extern NativeWindowFactory CocoaWindowFactory;
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#ifdef TEST_NATIVE_WINDOWS
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
static void *CreateWindowNative(int w, int h);
|
||||
static void DestroyWindowNative(void *window);
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#ifdef TEST_NATIVE_X11
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
static void *CreateWindowX11(int w, int h);
|
||||
static void DestroyWindowX11(void *window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user