mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-07 18:09:44 +00:00
make cursor related functions public
This commit is contained in:
@@ -38,6 +38,7 @@ struct _MwLLGDIPixmap {
|
||||
HBITMAP hMask2;
|
||||
};
|
||||
|
||||
MWDECL int MwLLGDICallInit(void);
|
||||
MWDECL int MwLLGDICallInit(void);
|
||||
MWDECL HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -69,6 +69,6 @@ struct _MwLLX11Pixmap {
|
||||
};
|
||||
|
||||
MWDECL int MwLLX11CallInit(void);
|
||||
MWDECL Cursor MwLLX11CreateCursor();
|
||||
MWDECL Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -520,7 +520,7 @@ static void MwLLForceRenderImpl(MwLL handle) {
|
||||
}
|
||||
}
|
||||
|
||||
static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
|
||||
HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
|
||||
HCURSOR cursor;
|
||||
BYTE* dmask = malloc((MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||
BYTE* dimage = malloc((MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||
@@ -561,12 +561,18 @@ static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
|
||||
|
||||
cursor = CreateCursor(GetModuleHandle(NULL), xs, ys, MwCursorDataHeight, MwCursorDataHeight, dmask, dimage);
|
||||
|
||||
free(dimage);
|
||||
free(dmask);
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
||||
static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {
|
||||
HCURSOR cursor = MwLLGDICreateCursor(image, mask);
|
||||
|
||||
if(handle->gdi.cursor != NULL) DestroyCursor(handle->gdi.cursor);
|
||||
if(handle->gdi.icon != NULL) DestroyIcon(handle->gdi.icon);
|
||||
handle->gdi.cursor = cursor;
|
||||
|
||||
free(dimage);
|
||||
free(dmask);
|
||||
}
|
||||
|
||||
static void MwLLDetachImpl(MwLL handle, MwPoint* point) {
|
||||
|
||||
Reference in New Issue
Block a user