git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@604 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
Nishi 2025-11-05 04:29:01 +00:00
commit b34054e916
13 changed files with 90 additions and 47 deletions

View file

@ -1,6 +1,8 @@
/* $Id$ */
#include <Mw/Milsko.h>
#include <windows.h>
typedef struct userdata {
MwLL ll;
POINT min;
@ -201,7 +203,7 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
} else if(msg == WM_SETCURSOR) {
if(LOWORD(lp) != HTCLIENT) return DefWindowProc(hWnd, msg, wp, lp);
if(u->ll->cursor != NULL) SetCursor(u->ll->cursor);
}else if(msg == WM_USER){
} else if(msg == WM_USER) {
InvalidateRect(hWnd, NULL, FALSE);
UpdateWindow(hWnd);
} else {
@ -390,10 +392,6 @@ void MwLLNextEvent(MwLL handle) {
}
}
void MwLLSleep(int ms) {
Sleep(ms);
}
MwLLPixmap MwLLCreatePixmap(MwLL handle, unsigned char* data, int width, int height) {
MwLLPixmap r = malloc(sizeof(*r));
HDC dc = GetDC(handle->hWnd);
@ -628,10 +626,6 @@ void MwLLMakeBorderless(MwLL handle, int toggle) {
SetWindowPos(handle->hWnd, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
}
long MwLLGetTick(void) {
return GetTickCount();
}
void MwLLFocus(MwLL handle) {
SetFocus(handle->hWnd);
}