fix things
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-03-29 09:42:34 +09:00
commit e312b325c8
Signed by: nishi
GPG key ID: 27EF69B208EB9343
7 changed files with 34 additions and 26 deletions

View file

@ -32,7 +32,7 @@ endif()
file( file(
GLOB GLOB
SOURCES SOURCES
src/*.c src/cursor/*.c src/icon/*.c src/widget/*.c src/text/*.c src/text/font/*.c src/dialog/*.c src/abstract/*.c external/*.c external/libz/src/*.c src/*.c src/cursor/*.c src/icon/*.c src/widget/*.c src/text/*.c src/text/font/*.c src/dialog/*.c src/abstract/*.c external/*.c
) )
list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/widget/opengl.c") list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/widget/opengl.c")
@ -103,7 +103,7 @@ else()
file( file(
GLOB GLOB
IMAGE_SOURCES IMAGE_SOURCES
external/libz/src/*.c external/libjpeg/src/*.c external/libpng/src/*.c external/libjpeg/src/*.c external/libpng/src/*.c
) )
target_sources( target_sources(
Mw Mw
@ -113,7 +113,7 @@ else()
target_include_directories( target_include_directories(
Mw Mw
PRIVATE PRIVATE
external/libz/include external/libjpeg/include external/libpng/include external/libjpeg/include external/libpng/include
) )
endif() endif()
@ -239,6 +239,12 @@ if(APPLE AND MW_BUILD_OPENGL)
) )
endif() endif()
target_include_directories(
Mw
PRIVATE
external/libz/include
)
target_include_directories( target_include_directories(
Mw Mw
PUBLIC PUBLIC

View file

@ -140,7 +140,7 @@ static MwWidget child(MwWidget w) {
return MwGetVoid(w, "VhandledWidget"); return MwGetVoid(w, "VhandledWidget");
} }
static void menu_handler(MwWidget handle, void* user, void* call){ static void menu_handler(MwWidget handle, void* user, void* call) {
if(call == e) MwDestroyWidget(window); if(call == e) MwDestroyWidget(window);
} }

View file

@ -64,7 +64,8 @@ if (grep(/^cocoa$/, @backends)) {
if (param_get("stb-image")) { if (param_get("stb-image")) {
add_cflags("-DUSE_STB_IMAGE"); add_cflags("-DUSE_STB_IMAGE");
}else{ }
else {
new_object("external/libjpeg/src/*.c"); new_object("external/libjpeg/src/*.c");
new_object("external/libpng/src/*.c"); new_object("external/libpng/src/*.c");
add_incdir("-Iexternal/libjpeg/include -Iexternal/libpng/include"); add_incdir("-Iexternal/libjpeg/include -Iexternal/libpng/include");

View file

@ -117,7 +117,7 @@ void MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color, int rounde
MwRect r = *rect; MwRect r = *rect;
int roundness = MwGetInteger(handle, MwNroundness); int roundness = MwGetInteger(handle, MwNroundness);
double div; double div;
if(rect->width <= 0 || rect->height <= 0){ if(rect->width <= 0 || rect->height <= 0) {
free(data); free(data);
return; return;
} }

View file

@ -21,7 +21,7 @@ static int create(MwWidget handle) {
return 0; return 0;
} }
static void destroy(MwWidget handle){ static void destroy(MwWidget handle) {
MwBox b = handle->internal; MwBox b = handle->internal;
free(b); free(b);
} }
@ -93,7 +93,7 @@ static void draw(MwWidget handle) {
MwLLFreeColor(base); MwLLFreeColor(base);
if(b->layout){ if(b->layout) {
layout(handle); layout(handle);
b->layout = 0; b->layout = 0;
@ -101,7 +101,7 @@ static void draw(MwWidget handle) {
} }
static void prop_change(MwWidget handle, const char* key) { static void prop_change(MwWidget handle, const char* key) {
if(strcmp(key, MwNorientation) == 0){ if(strcmp(key, MwNorientation) == 0) {
MwBox b = handle->internal; MwBox b = handle->internal;
b->layout = 1; b->layout = 1;
@ -112,7 +112,7 @@ static void prop_change(MwWidget handle, const char* key) {
static void children_prop_change(MwWidget handle, MwWidget child, const char* key) { static void children_prop_change(MwWidget handle, MwWidget child, const char* key) {
(void)child; (void)child;
if(strcmp(key, MwNratio) == 0 || strcmp(key, MwNfixedSize) == 0){ if(strcmp(key, MwNratio) == 0 || strcmp(key, MwNfixedSize) == 0) {
MwBox b = handle->internal; MwBox b = handle->internal;
b->layout = 1; b->layout = 1;

View file

@ -93,7 +93,7 @@ sub generate {
print(OUT "LD = $link\n"); print(OUT "LD = $link\n");
print(OUT "\n"); print(OUT "\n");
print(OUT print(OUT
"CFLAGS = ${inc}include ${def}_MILSKO ${def}USE_GDI ${def}USE_STB_TRUETYPE ${def}USE_STB_IMAGE ${def}STBI_NO_SIMD\n" "CFLAGS = ${inc}include ${inc}external${dir}libz${dir}include ${def}_MILSKO ${def}USE_GDI ${def}USE_STB_TRUETYPE ${def}USE_STB_IMAGE ${def}STBI_NO_SIMD\n"
); );
print(OUT "LDFLAGS = $dll"); print(OUT "LDFLAGS = $dll");
print(OUT "\n"); print(OUT "\n");
@ -143,6 +143,7 @@ sub generate {
scan("src"); scan("src");
scan("external"); scan("external");
scan("external/libz/src");
scan("src/icon"); scan("src/icon");
scan("src/cursor"); scan("src/cursor");
scan("src/widget"); scan("src/widget");