introduce MWAPI
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit

This commit is contained in:
Nishi 2026-04-22 12:05:49 +09:00
commit 2dd2c3870f
41 changed files with 189 additions and 166 deletions

View file

@ -158,7 +158,7 @@ static void color_picker_image_update(color_picker_t* picker) {
/* printf("%d\n", n); */
}
static void color_picker_click(MwWidget handle, void* user, void* call) {
static void MWAPI color_picker_click(MwWidget handle, void* user, void* call) {
color_picker_t* picker = user;
MwMouse* mouse = call;
char hexColor[8];
@ -190,7 +190,7 @@ static void color_picker_click(MwWidget handle, void* user, void* call) {
MwSetText(picker->color_display_text, MwNbackground, hexColor);
MwSetText(picker->color_display_text, MwNtext, hexColor);
}
static void color_picker_on_change_value(MwWidget handle, void* user,
static void MWAPI color_picker_on_change_value(MwWidget handle, void* user,
void* call) {
color_picker_t* picker = user;
@ -206,7 +206,7 @@ static void color_picker_on_change_value(MwWidget handle, void* user,
/* color_picker_image_update(picker); */
}
static void color_picker_tick(MwWidget handle, void* user,
static void MWAPI color_picker_tick(MwWidget handle, void* user,
void* call) {
color_picker_t* picker = user;
@ -224,7 +224,7 @@ static void color_picker_destroy(color_picker_t* picker) {
free(picker);
}
static void color_picker_close(MwWidget handle, void* user,
static void MWAPI color_picker_close(MwWidget handle, void* user,
void* call) {
color_picker_t* picker = user;
@ -234,7 +234,7 @@ static void color_picker_close(MwWidget handle, void* user,
MwDestroyWidget(handle);
}
static void color_display_text_change(MwWidget handle, void* user,
static void MWAPI color_display_text_change(MwWidget handle, void* user,
void* call) {
color_picker_t* picker = user;
char hexColor[9];
@ -265,7 +265,7 @@ static void color_display_text_change(MwWidget handle, void* user,
MwLLFreeColor(color);
}
static void color_picker_finish(MwWidget handle, void* user,
static void MWAPI color_picker_finish(MwWidget handle, void* user,
void* call) {
color_picker_t* picker = user;

View file

@ -53,35 +53,35 @@ static void destroy(MwWidget handle) {
MwDestroyWidget(handle);
}
static void filecancel(MwWidget handle, void* user, void* call) {
static void MWAPI filecancel(MwWidget handle, void* user, void* call) {
(void)user;
(void)call;
destroy(handle->parent);
}
static void cancel_window(MwWidget handle, void* user, void* call) {
static void MWAPI cancel_window(MwWidget handle, void* user, void* call) {
(void)user;
(void)call;
destroy(handle);
}
static void okay(MwWidget handle, void* user, void* call) {
static void MWAPI okay(MwWidget handle, void* user, void* call) {
(void)user;
(void)call;
destroy(handle->parent);
}
static void msgbox_okay(MwWidget handle, void* user, void* call) {
static void MWAPI msgbox_okay(MwWidget handle, void* user, void* call) {
(void)user;
(void)call;
MwDestroyWidget(handle->parent);
}
static void files_activate(MwWidget handle, void* user, void* call) {
static void MWAPI files_activate(MwWidget handle, void* user, void* call) {
int index = *(int*)call;
filechooser_t* fc = handle->parent->opaque;
@ -104,7 +104,7 @@ static void files_activate(MwWidget handle, void* user, void* call) {
}
}
static void okay_activate(MwWidget handle, void* user, void* call) {
static void MWAPI okay_activate(MwWidget handle, void* user, void* call) {
filechooser_t* fc = handle->parent->opaque;
char* t = (char*)MwGetText(fc->filename, MwNtext);
struct stat s;
@ -140,7 +140,7 @@ static void okay_activate(MwWidget handle, void* user, void* call) {
if(p != NULL) free(p);
}
static void nav_activate(MwWidget handle, void* user, void* call) {
static void MWAPI nav_activate(MwWidget handle, void* user, void* call) {
int index = *(int*)call;
const char* e = MwListBoxGet(handle, index);
@ -156,7 +156,7 @@ static void nav_activate(MwWidget handle, void* user, void* call) {
}
}
static void addr_up_activate(MwWidget handle, void* user, void* call) {
static void MWAPI addr_up_activate(MwWidget handle, void* user, void* call) {
filechooser_t* fc = handle->parent->opaque;
char* p = MwDirectoryJoin(fc->path, "..");
@ -168,7 +168,7 @@ static void addr_up_activate(MwWidget handle, void* user, void* call) {
free(p);
}
static void addr_back_activate(MwWidget handle, void* user, void* call) {
static void MWAPI addr_back_activate(MwWidget handle, void* user, void* call) {
filechooser_t* fc = handle->parent->opaque;
(void)user;
@ -181,7 +181,7 @@ static void addr_back_activate(MwWidget handle, void* user, void* call) {
}
}
static void addr_fwd_activate(MwWidget handle, void* user, void* call) {
static void MWAPI addr_fwd_activate(MwWidget handle, void* user, void* call) {
filechooser_t* fc = handle->parent->opaque;
(void)user;
@ -192,7 +192,7 @@ static void addr_fwd_activate(MwWidget handle, void* user, void* call) {
}
}
static void addr_activate(MwWidget handle, void* user, void* call) {
static void MWAPI addr_activate(MwWidget handle, void* user, void* call) {
(void)user;
(void)call;
@ -390,7 +390,7 @@ static void layout(MwWidget handle) {
}
}
static void resize(MwWidget handle, void* user, void* call) {
static void MWAPI resize(MwWidget handle, void* user, void* call) {
(void)user;
(void)call;

View file

@ -24,7 +24,7 @@ static void messagebox_destroy_inject(MwWidget handle) {
if((px = MwGetVoid(handle, MwNpixmap)) != NULL) MwLLDestroyPixmap(px);
}
static void messagebox_close(MwWidget handle, void* user, void* call) {
static void MWAPI messagebox_close(MwWidget handle, void* user, void* call) {
(void)user;
(void)call;
MwDestroyWidget(handle);