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

@ -347,12 +347,12 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
}
- (void)mouseMoved:(NSEvent*)ev {
MwLLMouse mouse;
NSPoint mousePoint = pointFlip([ev locationInWindow]);
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mouse.button = MwLLMouseLeft;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwMouse mouse;
NSPoint mousePoint = pointFlip([ev locationInWindow]);
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mouse.button = MwMOUSE_LEFT;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwLLDispatch(this, move, &mouse);
[this->cocoa.real nudge];
[super mouseMoved:ev];
@ -362,51 +362,51 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
}
- (void)mouseDown:(NSEvent*)ev {
MwLLMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwLLMouseLeft;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwMOUSE_LEFT;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwLLDispatch(this, down, &mouse);
[this->cocoa.real nudge];
[super mouseDown:ev];
}
- (void)mouseUp:(NSEvent*)ev {
MwLLMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwLLMouseLeft;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwMOUSE_LEFT;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwLLDispatch(this, up, &mouse);
[this->cocoa.real nudge];
[super mouseUp:ev];
}
- (void)rightMouseDown:(NSEvent*)ev {
MwLLMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwLLMouseRight;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwMOUSE_RIGHT;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwLLDispatch(this, down, &mouse);
[this->cocoa.real nudge];
[super rightMouseDown:ev];
}
- (void)rightMouseUp:(NSEvent*)ev {
MwLLMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwLLMouseRight;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwMouse mouse;
NSPoint mousePoint = [ev locationInWindow];
MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer];
mousePoint.y = [[ev window] frame].size.height - mousePoint.y;
mouse.button = MwMOUSE_RIGHT;
mouse.point.x = mousePoint.x;
mouse.point.y = mousePoint.y;
MwLLDispatch(this, up, &mouse);
[this->cocoa.real nudge];
[super rightMouseUp:ev];

View file

@ -79,44 +79,44 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
EndPaint(hWnd, &ps);
}
} else if(msg == WM_LBUTTONDOWN || msg == WM_MBUTTONDOWN || msg == WM_RBUTTONDOWN) {
MwLLMouse p;
MwMouse p;
p.point.x = LOWORD(lp);
p.point.y = HIWORD(lp);
if(msg == WM_LBUTTONDOWN) {
p.button = MwLLMouseLeft;
p.button = MwMOUSE_LEFT;
} else if(msg == WM_MBUTTONDOWN) {
p.button = MwLLMouseMiddle;
p.button = MwMOUSE_MIDDLE;
} else if(msg == WM_RBUTTONDOWN) {
p.button = MwLLMouseRight;
p.button = MwMOUSE_RIGHT;
}
SetCapture(hWnd);
SetFocus(hWnd);
MwLLDispatch(u->ll, down, &p);
} else if(msg == WM_LBUTTONUP || msg == WM_MBUTTONUP || msg == WM_RBUTTONUP) {
MwLLMouse p;
MwMouse p;
p.point.x = LOWORD(lp);
p.point.y = HIWORD(lp);
if(msg == WM_LBUTTONUP) {
p.button = MwLLMouseLeft;
p.button = MwMOUSE_LEFT;
} else if(msg == WM_MBUTTONUP) {
p.button = MwLLMouseMiddle;
p.button = MwMOUSE_MIDDLE;
} else if(msg == WM_RBUTTONUP) {
p.button = MwLLMouseRight;
p.button = MwMOUSE_RIGHT;
}
SetCapture(NULL);
MwLLDispatch(u->ll, up, &p);
} else if(msg == WM_MOUSEWHEEL) {
int d = GET_WHEEL_DELTA_WPARAM(wp);
MwLLMouse p;
int d = GET_WHEEL_DELTA_WPARAM(wp);
MwMouse p;
p.point.x = LOWORD(lp);
p.point.y = HIWORD(lp);
if(d > 0) {
p.button = MwLLMouseWheelUp;
p.button = MwMOUSE_WHEELUP;
} else if(d < 0) {
p.button = MwLLMouseWheelDown;
p.button = MwMOUSE_WHEELDOWN;
}
MwLLDispatch(u->ll, down, &p);

View file

@ -119,7 +119,7 @@ static void recursive_dispatch_resize(MwLL handle) {
};
/* Recursively dispatch a move event to a widget and its children */
static void recursive_dispatch_move(MwLL handle, MwLLMouse* p) {
static void recursive_dispatch_move(MwLL handle, MwMouse* p) {
MwWidget h = (MwWidget)handle->common.user;
if(h) {
int i;
@ -282,7 +282,7 @@ static void wl_clipboard_read(wl_clipboard_device_context_t* ctx, int clipboard_
timeout.tv_sec = 0;
timeout.tv_usec = 100;
if(clipboard_type == MwClipboardPrimary) {
if(clipboard_type == MwCLIPBOARD_PRIMARY) {
zwp_primary_selection_offer_v1_receive(ctx->offer.zwp, "text/plain", fds[1]);
} else if(ctx->offer.wl) {
wl_data_offer_receive(ctx->offer.wl, "text/plain", fds[1]);
@ -501,7 +501,7 @@ static void pointer_leave(void* data, struct wl_pointer* wl_pointer, MwU32 seria
WAYLAND_EVENT_OP_END(self);
};
static void xdg_borderless_step(MwLL self, MwLLMouse p, MwU32 serial) {
static void xdg_borderless_step(MwLL self, MwMouse p, MwU32 serial) {
if(self->wayland.type == MWLL_WAYLAND_TOPLEVEL && self->wayland.backbuffer.surface == curSurface) {
if(p.point.y >= (self->wayland.wh + CSD_BORDER_FRAME_TOP + CSD_BORDER_FRAME_BOTTOM) - 5) {
if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 5) {
@ -535,8 +535,8 @@ static void relative_pointer_motion(void* data,
wl_fixed_t dy,
wl_fixed_t dxUnaccel,
wl_fixed_t dyUnaccel) {
MwLL self = data;
MwLLMouse p;
MwLL self = data;
MwMouse p;
WAYLAND_EVENT_OP_START(self);
@ -567,9 +567,9 @@ static void zwp_relative_pointer_manager_v1_interface_destroy(struct _MwLLWaylan
/* `wl_pointer.motion` callback */
static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time,
wl_fixed_t surface_x, wl_fixed_t surface_y) {
MwLL self = data;
MwLL topmost_parent = self;
MwLLMouse p;
MwLL self = data;
MwLL topmost_parent = self;
MwMouse p;
(void)time;
(void)wl_pointer;
@ -590,9 +590,9 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
/* `wl_pointer.button` callback */
static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 serial, MwU32 time, MwU32 button, MwU32 state) {
MwLL self = data;
MwLLMouse p;
MwBool inArea = MwFALSE;
MwLL self = data;
MwMouse p;
MwBool inArea = MwFALSE;
(void)wl_pointer;
(void)serial;
@ -613,13 +613,13 @@ static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 seri
switch(button) {
case BTN_LEFT:
p.button = MwLLMouseLeft;
p.button = MwMOUSE_LEFT;
break;
case BTN_MIDDLE:
p.button = MwLLMouseMiddle;
p.button = MwMOUSE_MIDDLE;
break;
case BTN_RIGHT:
p.button = MwLLMouseRight;
p.button = MwMOUSE_RIGHT;
break;
}
self->wayland.held_down = state == WL_POINTER_BUTTON_STATE_PRESSED;
@ -1757,7 +1757,7 @@ static void wl_logger(const char* fmt, va_list args) {
static void widget_setup(MwLL r, MwLL parent, int x, int y, int width, int height, enum _MwLLWaylandType ty) {
/* Wayland does not report global coordinates ever. Compositors are not even expected to have knowledge of this.
*/
r->common.coordinate_type = MwCoordinatesLocal;
r->common.coordinate_type = MwCOORDINATE_LOCAL;
r->common.type = MwLLBackendWayland;
@ -2510,7 +2510,7 @@ static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_ty
handle->wayland.clipboard_buffer = malloc(strlen(text));
strcpy(handle->wayland.clipboard_buffer, text);
if(clipboard_type == MwClipboardPrimary) {
if(clipboard_type == MwCLIPBOARD_PRIMARY) {
if(handle->wayland.supports_zwp) {
for(i = 0; i < arrlen(handle->wayland.clipboard_devices_zwp); i++) {
wl_clipboard_device_context_t* device = handle->wayland.clipboard_devices_zwp[i];
@ -2529,7 +2529,7 @@ static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_ty
static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) {
int i;
if(clipboard_type == MwClipboardPrimary) {
if(clipboard_type == MwCLIPBOARD_PRIMARY) {
if(handle->wayland.supports_zwp) {
for(i = 0; i < arrlen(handle->wayland.clipboard_devices_zwp); i++) {
wl_clipboard_read(

View file

@ -694,38 +694,38 @@ static void MwLLNextEventImpl(MwLL handle) {
handle->x11.force_render = 0;
render = 1;
} else if(ev.type == ButtonPress) {
MwLLMouse p;
MwMouse p;
p.point.x = ev.xbutton.x;
p.point.y = ev.xbutton.y;
if(ev.xbutton.button == Button1) {
p.button = MwLLMouseLeft;
p.button = MwMOUSE_LEFT;
} else if(ev.xbutton.button == Button2) {
p.button = MwLLMouseMiddle;
p.button = MwMOUSE_MIDDLE;
} else if(ev.xbutton.button == Button3) {
p.button = MwLLMouseRight;
p.button = MwMOUSE_RIGHT;
} else if(ev.xbutton.button == Button4) {
p.button = MwLLMouseWheelUp;
p.button = MwMOUSE_WHEELUP;
} else if(ev.xbutton.button == Button5) {
p.button = MwLLMouseWheelDown;
p.button = MwMOUSE_WHEELDOWN;
}
XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime);
MwLLDispatch(handle, down, &p);
} else if(ev.type == ButtonRelease) {
MwLLMouse p;
MwMouse p;
p.point.x = ev.xbutton.x;
p.point.y = ev.xbutton.y;
if(ev.xbutton.button == Button1) {
p.button = MwLLMouseLeft;
p.button = MwMOUSE_LEFT;
} else if(ev.xbutton.button == Button2) {
p.button = MwLLMouseMiddle;
p.button = MwMOUSE_MIDDLE;
} else if(ev.xbutton.button == Button3) {
p.button = MwLLMouseRight;
p.button = MwMOUSE_RIGHT;
} else if(ev.xbutton.button == Button4) {
p.button = MwLLMouseWheelUp;
p.button = MwMOUSE_WHEELUP;
} else if(ev.xbutton.button == Button5) {
p.button = MwLLMouseWheelDown;
p.button = MwMOUSE_WHEELDOWN;
}
MwLLDispatch(handle, up, &p);

View file

@ -52,22 +52,23 @@ static void lldrawhandler(MwLL handle, void* data) {
}
static void lluphandler(MwLL handle, void* data) {
MwWidget h = (MwWidget)handle->common.user;
MwLLMouse* p = data;
MwWidget h = (MwWidget)handle->common.user;
MwMouse* p = data;
if(p->button == MwLLMouseLeft) h->pressed = 0;
if(p->button == MwMOUSE_LEFT) h->pressed = 0;
h->mouse_point.x = p->point.x;
h->mouse_point.y = p->point.y;
if(p->button == MwLLMouseLeft) MwDispatch(h, click);
if(p->button == MwMOUSE_LEFT) MwDispatch(h, click);
MwDispatch3(h, mouse_up, data);
MwDispatchUserHandler(h, MwNmouseUpHandler, data);
}
static void lldownhandler(MwLL handle, void* data) {
MwWidget h = (MwWidget)handle->common.user;
MwLLMouse* p = data;
if(p->button == MwLLMouseLeft) h->pressed = 1;
MwWidget h = (MwWidget)handle->common.user;
MwMouse* p = data;
if(p->button == MwMOUSE_LEFT) h->pressed = 1;
h->mouse_point.x = p->point.x;
h->mouse_point.y = p->point.y;
@ -962,7 +963,7 @@ int MwGetCoordinateType(MwWidget handle) {
if(handle->parent == NULL || handle->parent->lowlevel == NULL) {
return handle->lowlevel->common.coordinate_type;
} else {
return MwCoordinatesLocal;
return MwCOORDINATE_LOCAL;
}
}

View file

@ -160,7 +160,7 @@ static void color_picker_image_update(color_picker_t* picker) {
static void color_picker_click(MwWidget handle, void* user, void* call) {
color_picker_t* picker = user;
MwLLMouse* mouse = call;
MwMouse* mouse = call;
char hexColor[8];
int i;
char fgColor[8];

View file

@ -221,7 +221,7 @@ static void layout(MwWidget handle) {
MwNleftPadding, 16,
NULL);
MwListBoxInsert(fc->nav, -1, p);
MwAddUserHandler(fc->nav, MwNactivateHandler, nav_activate, NULL);
MwAddUserHandler(fc->nav, MwNlistBoxActivateHandler, nav_activate, NULL);
MwListBoxDestroyPacket(p);
} else {
@ -242,7 +242,7 @@ static void layout(MwWidget handle) {
MwNhasHeading, 1,
MwNleftPadding, 16,
NULL);
MwAddUserHandler(fc->files, MwNactivateHandler, files_activate, NULL);
MwAddUserHandler(fc->files, MwNlistBoxActivateHandler, files_activate, NULL);
} else {
MwVaApply(fc->files,
MwNx, wx,

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);