early-access version 1617

This commit is contained in:
pineappleEA
2021-04-20 21:40:33 +02:00
parent 242b6f6b49
commit f46563104f
510 changed files with 141726 additions and 62846 deletions

59
externals/SDL/test/testnativeos2.c vendored Executable file
View File

@@ -0,0 +1,59 @@
/*
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely.
*/
#include "testnative.h"
#ifdef TEST_NATIVE_OS2
#define WIN_CLIENT_CLASS "SDL Test"
static void *CreateWindowNative(int w, int h);
static void DestroyWindowNative(void *window);
NativeWindowFactory OS2WindowFactory = {
"DIVE",
CreateWindowNative,
DestroyWindowNative
};
static void *CreateWindowNative(int w, int h)
{
HWND hwnd;
HWND hwndFrame;
ULONG ulFrameFlags = FCF_TASKLIST | FCF_DLGBORDER | FCF_TITLEBAR |
FCF_SYSMENU | FCF_SHELLPOSITION |
FCF_SIZEBORDER | FCF_MINBUTTON | FCF_MAXBUTTON;
WinRegisterClass( 0, WIN_CLIENT_CLASS, WinDefWindowProc,
CS_SIZEREDRAW | CS_MOVENOTIFY,
sizeof(ULONG) ); // We should have minimum 4 bytes.
hwndFrame = WinCreateStdWindow( HWND_DESKTOP, 0, &ulFrameFlags,
WIN_CLIENT_CLASS, "SDL Test", 0, 0, 1, &hwnd );
if ( hwndFrame == NULLHANDLE )
{
return 0;
}
WinSetWindowPos( hwndFrame, HWND_TOP, 0, 0, w, h,
SWP_ZORDER | SWP_ACTIVATE | SWP_SIZE | SWP_SHOW );
return (void *)hwndFrame; // We may returns client or frame window handle
// for SDL_CreateWindowFrom().
}
static void DestroyWindowNative(void *window)
{
WinDestroyWindow( (HWND)window );
}
#endif /* TEST_NATIVE_OS2 */