1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Hoist MOULOpenSourceClientPlugin/Plasma20/* to top level

to match H'uru layout and make patching/cherry-picking easier.
This commit is contained in:
rarified
2021-01-28 12:04:34 -07:00
parent c6ecd6cd06
commit 6ae3df25f5
3651 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,84 @@
#include "hsTypes.h"
// Stolen from: http://www.mvps.org/user32/webhost.cab
// No copyright notices, so I assume it's public domain -Colin
#include "basewnd.h"
#include "hsConfig.h"
#if HS_BUILD_FOR_WIN32
wchar_t basewnd::szClassName[] = L"BASEWND";
void basewnd::Initialize(HINSTANCE hAppInstance,UINT style)
{
WNDCLASSEX wc =
{
sizeof(wc),
style,
WindowProc,
0,0,
hAppInstance,
LoadIcon(NULL,IDI_APPLICATION),
LoadCursor(NULL,IDC_ARROW),
(HBRUSH)(COLOR_WINDOW+1),
NULL,
szClassName,
LoadIcon(NULL,IDI_APPLICATION)
};
RegisterClassEx(&wc);
}
LRESULT CALLBACK basewnd::WindowProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
basewnd* _this;
if(uMsg == WM_CREATE && (_this = (basewnd*)(LPCREATESTRUCT(lParam))->lpCreateParams))
{
SetWindowLong(hwnd,GWL_USERDATA,(long)_this);
_this->hwnd = hwnd;
_this->AddRef();
}
else
_this = (basewnd*)GetWindowLong(hwnd,GWL_USERDATA);
LRESULT result = 0;
BOOL fDoDef = !(_this && _this->HandleMessage(uMsg,wParam,lParam,&result));
if(uMsg == WM_DESTROY)
{
SetWindowLong(hwnd,GWL_USERDATA,(long)NULL);
_this->Release();
}
return fDoDef?DefWindowProc(hwnd,uMsg,wParam,lParam):result;
}
basewnd::basewnd()
: mcRef(1)
{
}
basewnd::~basewnd()
{
}
ULONG basewnd::AddRef()
{
return mcRef++;
}
ULONG basewnd::Release()
{
if(--mcRef)
return mcRef;
delete this;
return 0;
}
#endif