at least no more segfault
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-04-28 16:30:01 +00:00
commit 39b3c035fc
8 changed files with 104 additions and 11 deletions

View file

@ -1,8 +1,21 @@
#include <Mw/Milsko.h>
MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {}
MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
MwLL r = (MwLL)malloc(sizeof(*r));
void MwLLDestroyImpl(MwLL handle) {}
MwLLCreateCommon(r);
r->common.copy_buffer = 1;
r->common.type = MwLLBackendHaiku;
return r;
}
void MwLLDestroyImpl(MwLL handle) {
MwLLDestroyCommon(handle);
free(handle);
}
void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) {}
@ -12,9 +25,17 @@ void MwLLBeginDrawImpl(MwLL handle) {}
void MwLLEndDrawImpl(MwLL handle) {}
MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) {}
MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) {
MwLLColor c = (MwLLColor)malloc(sizeof(*c));
MwLLColorUpdate(handle, c, r, g, b);
return c;
}
void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) {}
void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) {
c->common.red = r;
c->common.green = g;
c->common.blue = b;
}
void MwLLFreeColorImpl(MwLLColor color) {}
@ -26,15 +47,33 @@ void MwLLSetWHImpl(MwLL handle, int w, int h) {}
void MwLLSetTitleImpl(MwLL handle, const char* title) {}
int MwLLPendingImpl(MwLL handle) {}
int MwLLPendingImpl(MwLL handle) {
return 0;
}
void MwLLNextEventImpl(MwLL handle) {}
MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) {}
MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) {
MwLLPixmap r = (MwLLPixmap)malloc(sizeof(*r));
r->common.raw = (unsigned char*)malloc(4 * width * height);
memcpy(r->common.raw, data, 4 * width * height);
r->common.width = width;
r->common.height = height;
MwLLPixmapUpdate(r);
return r;
return r;
}
void MwLLPixmapUpdateImpl(MwLLPixmap pixmap) {}
void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) {}
void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) {
free(pixmap->common.raw);
free(pixmap);
}
void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) {}
@ -72,11 +111,19 @@ void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) {}
void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) {}
void MwLLSetDarkThemeImpl(MwLL handle, int toggle) {}
void MwLLSetDarkThemeImpl(MwLL handle, int toggle) {
(void)handle;
(void)toggle;
}
MwBool MwLLDoModernImpl(MwLL handle) {}
MwBool MwLLDoModernImpl(MwLL handle) {
(void)handle;
return MwTRUE;
}
int MwLLHaikuCallInitImpl() {}
int MwLLHaikuCallInitImpl() {
return 0;
}
#include "call.c"
CALL(Haiku);