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

This commit is contained in:
Nishi 2026-04-17 01:36:34 +09:00
commit 570f05540e
Signed by: nishi
GPG key ID: 27EF69B208EB9343
25 changed files with 258 additions and 208 deletions

View file

@ -89,7 +89,7 @@ static void listbox_activate(MwWidget handle, void* user, void* client) {
MwForceRender(handle->parent);
MwDispatchUserHandler(handle->parent, MwNchangedHandler, client);
MwDispatchUserHandler(handle->parent, MwNcomboBoxChangedHandler, client);
MwDestroyWidget(handle);
}

View file

@ -113,7 +113,7 @@ static void key(MwWidget handle, int code) {
} else if(code == MwLLKeyEnter) {
MwDispatchUserHandler(handle, MwNactivateHandler, NULL);
} else if(code == (MwLLControlMask | 'v')) {
MwLLGetClipboard(handle->lowlevel, MwClipboardMain);
MwLLGetClipboard(handle->lowlevel, MwCLIPBOARD_MAIN);
} else if(!(code & MwLLKeyMask)) {
int incr = 0;
out = malloc(strlen(str) + 5 + 1);
@ -136,9 +136,9 @@ static void key(MwWidget handle, int code) {
#if defined(USE_X11) || defined(USE_WAYLAND)
static void mouse_up(MwWidget handle, void* ptr) {
if(handle->lowlevel->common.type == MwLLBackendWayland || handle->lowlevel->common.type == MwLLBackendX11) {
MwLLMouse* mouse = ptr;
if(mouse->button == MwLLMouseMiddle) {
MwLLGetClipboard(handle->lowlevel, MwClipboardPrimary);
MwMouse* mouse = ptr;
if(mouse->button == MwMOUSE_MIDDLE) {
MwLLGetClipboard(handle->lowlevel, MwCLIPBOARD_PRIMARY);
}
}
MwForceRender2(handle, NULL);

View file

@ -119,12 +119,12 @@ static void vscroll_changed(MwWidget handle, void* user, void* call) {
}
static void frame_mouse_down(MwWidget handle, void* user, void* call) {
MwListBox lb = handle->parent->internal;
MwLLMouse* m = call;
MwListBox lb = handle->parent->internal;
MwMouse* m = call;
(void)user;
if(m->button == MwLLMouseLeft) {
if(m->button == MwMOUSE_LEFT) {
int st = 0;
int i;
int y = MwDefaultBorderWidth(handle);
@ -140,7 +140,7 @@ static void frame_mouse_down(MwWidget handle, void* user, void* call) {
if((((t = MwTimeGetTick()) - lb->click_time) < MwDoubleClickTimeout && old == st + i) || MwGetInteger(handle->parent, MwNsingleClickSelectable)) {
int n = MwGetInteger(handle->parent, MwNvalue);
MwDispatchUserHandler(handle->parent, MwNactivateHandler, &n);
MwDispatchUserHandler(handle->parent, MwNlistBoxActivateHandler, &n);
}
lb->click_time = t;
@ -154,12 +154,12 @@ static void frame_mouse_down(MwWidget handle, void* user, void* call) {
}
static void frame_mouse_up(MwWidget handle, void* user, void* call) {
MwListBox lb = handle->parent->internal;
MwLLMouse* m = call;
MwListBox lb = handle->parent->internal;
MwMouse* m = call;
(void)user;
if(m->button == MwLLMouseLeft) {
if(m->button == MwMOUSE_LEFT) {
lb->pressed = 0;
}
}

View file

@ -118,7 +118,7 @@ static void parent_resize(MwWidget handle) {
static void mouse_down(MwWidget handle, void* ptr) {
MENU_LOOP_DECL;
if(((MwLLMouse*)ptr)->button != MwLLMouseLeft) return;
if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return;
BEGIN_MENU_LOOP;
if(in_area) {
@ -150,7 +150,7 @@ static void mouse_down(MwWidget handle, void* ptr) {
static void mouse_up(MwWidget handle, void* ptr) {
MENU_LOOP_DECL;
if(((MwLLMouse*)ptr)->button != MwLLMouseLeft) return;
if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return;
BEGIN_MENU_LOOP;
if(in_area && m->sub[i]->wsub != NULL) {

View file

@ -98,7 +98,7 @@ static void mouse_up(MwWidget handle, void* ptr) {
int h = MwGetInteger(handle, MwNheight);
const char* str = MwGetText(handle, MwNtext);
if(((MwLLMouse*)ptr)->button != MwLLMouseLeft) return;
if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return;
if(e->mouse.x >= (w - e->right)) {
char s[512];
@ -116,7 +116,7 @@ static void mouse_up(MwWidget handle, void* ptr) {
static void mouse_down(MwWidget handle, void* ptr) {
MwEntry e = handle->internal;
if(((MwLLMouse*)ptr)->button != MwLLMouseLeft) return;
if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return;
e->mouse = handle->mouse_point;

View file

@ -170,9 +170,9 @@ static void mouse_down(MwWidget handle, void* ptr) {
int wh = MwGetInteger(handle, MwNheight);
int or = MwGetInteger(handle, MwNorientation);
MwScrollBar scr = handle->internal;
MwLLMouse* m = ptr;
MwMouse* m = ptr;
if(m->button == MwLLMouseWheelUp) {
if(m->button == MwMOUSE_WHEELUP) {
int min = MwGetInteger(handle, MwNminValue);
int val = MwGetInteger(handle, MwNvalue);
int diff = MwGetInteger(handle, MwNareaShown);
@ -184,7 +184,7 @@ static void mouse_down(MwWidget handle, void* ptr) {
MwSetInteger(handle, MwNvalue, val);
MwSetInteger(handle, MwNchangedBy, -diff);
MwDispatchUserHandler(handle, MwNchangedHandler, NULL);
} else if(m->button == MwLLMouseWheelDown) {
} else if(m->button == MwMOUSE_WHEELDOWN) {
int max = MwGetInteger(handle, MwNmaxValue);
int val = MwGetInteger(handle, MwNvalue);
int diff = MwGetInteger(handle, MwNareaShown);
@ -197,7 +197,7 @@ static void mouse_down(MwWidget handle, void* ptr) {
MwSetInteger(handle, MwNchangedBy, diff);
MwDispatchUserHandler(handle, MwNchangedHandler, NULL);
}
if(m->button != MwLLMouseLeft) return;
if(m->button != MwMOUSE_LEFT) return;
scr->point = handle->mouse_point;
scr->drag = 0;

View file

@ -183,7 +183,7 @@ static void mwSubMenuAppearImpl(MwWidget handle, MwMenu menu, MwPoint* point, in
MwLLMakeToolWindow(handle->lowlevel);
MwLLDetach(handle->lowlevel, &p);
if(handle->lowlevel->common.coordinate_type == MwCoordinatesGlobal) {
if(handle->lowlevel->common.coordinate_type == MwCOORDINATE_GLOBAL) {
if(MwGetInteger(handle, MwNy) + sz.height > rc.height) {
MwVaApply(handle,
MwNy, rc.height - sz.height,

View file

@ -128,7 +128,7 @@ static void recursion(MwWidget handle, MwTreeViewEntry* tree, MwTreeViewEntry**
set_all(root, 0);
tree->selected = 1;
if(((t = MwTimeGetTick()) - tree->click_time) < MwDoubleClickTimeout || MwGetInteger(handle->parent, MwNsingleClickSelectable)) {
MwDispatchUserHandler(handle->parent, MwNactivateHandler, tree);
MwDispatchUserHandler(handle->parent, MwNtreeViewActivateHandler, tree);
}
tree->click_time = t;
@ -213,11 +213,11 @@ static int recursive_length(MwTreeViewEntry** e) {
static void frame_mouse_down(MwWidget handle, void* user, void* call) {
MwTreeView tv = handle->parent->internal;
MwLLMouse* mouse = call;
MwMouse* mouse = call;
(void)user;
if(mouse->button == MwLLMouseLeft) tv->pressed = mouse->point;
if(mouse->button == MwMOUSE_LEFT) tv->pressed = mouse->point;
}
static void resize(MwWidget handle);
@ -227,11 +227,11 @@ static void frame_mouse_up(MwWidget handle, void* user, void* call) {
int shared = 0;
int skip = MwGetInteger(tv->vscroll, MwNvalue) * (MwGetInteger(tv->vscroll, MwNmaxValue) - MwGetInteger(tv->vscroll, MwNareaShown)) / MwGetInteger(tv->vscroll, MwNmaxValue);
MwPoint p;
MwLLMouse* mouse = call;
MwMouse* mouse = call;
(void)user;
if(mouse->button == MwLLMouseLeft) {
if(mouse->button == MwMOUSE_LEFT) {
int i;
p.x = MwDefaultBorderWidth(tv->frame);
p.y = MwDefaultBorderWidth(tv->frame);

View file

@ -523,23 +523,23 @@ static void* mwVulkanGetFieldImpl(MwWidget handle, int field, int* out) {
char buf[1024];
switch(field) {
case MwVulkanField_GetInstanceProcAddr:
case MwVULKANFIELD_GETINSTANCEPROCADDR:
return o->vkGetInstanceProcAddr;
case MwVulkanField_Instance:
case MwVULKANFIELD_INSTANCE:
return o->vkInstance;
case MwVulkanField_Surface:
case MwVULKANFIELD_SURFACE:
return o->vkSurface;
case MwVulkanField_PhysicalDevice:
case MwVULKANFIELD_PHYSICALDEVICE:
return o->vkPhysicalDevice;
case MwVulkanField_LogicalDevice:
case MwVULKANFIELD_LOGICALDEVICE:
return o->vkLogicalDevice;
case MwVulkanField_GraphicsQueueIndex:
case MwVULKANFIELD_GRAPHICSQUEUEINDEX:
return &o->vkGraphicsFamilyIDX;
case MwVulkanField_PresentQueueIndex:
case MwVULKANFIELD_PRESENTQUEUEINDEX:
return &o->vkPresentFamilyIDX;
case MwVulkanField_GraphicsQueue:
case MwVULKANFIELD_GRAPHICSQUEUE:
return o->vkGraphicsQueue;
case MwVulkanField_PresentQueue:
case MwVULKANFIELD_PRESENTQUEUE:
return o->vkPresentQueue;
default:
MwStringPrintIntoBuffer(buf, 1024, "Unknown vulkan field request (%d given)", field);