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

This commit is contained in:
Nishi 2026-04-17 21:26:41 +09:00
commit 7b9870cebc
Signed by: nishi
GPG key ID: 27EF69B208EB9343
11 changed files with 66 additions and 25 deletions

View file

@ -5,7 +5,7 @@ AlignConsecutiveAssignments:
Enabled: true
AlignConsecutiveDeclarations:
Enabled: true
IndentAccessModifiers: true
AccessModifierOffset: -4
NamespaceIndentation: All
IndentWidth: 8
PointerAlignment: Left

View file

@ -231,6 +231,7 @@ int main() {
add(f);
f = frame("Entry", -PaddingContent, 24, MwEntryClass, NULL);
MwAddUserHandler(child(f), MwNchangedHandler, abort, NULL);
add(f);
f = frame("Label", -PaddingContent, -PaddingContent, MwLabelClass,

View file

@ -84,7 +84,7 @@ typedef struct {
@end
@interface MilskoCocoaPixmap : NSObject {
@public
@public
MwBool valid;
int width;
int height;
@ -106,7 +106,7 @@ typedef struct {
@interface MilskoCocoaView : NSView {
MwBool _child;
@public
@public
draw_command* commands;
}
@ -119,7 +119,7 @@ typedef struct {
@end
@interface MilskoCocoa : NSObject {
@public
@public
MilskoCocoaApplication* application;
MwBool _forceRender;
MwBool _eventsPending;

View file

@ -454,7 +454,7 @@ struct _MwLLWayland {
#endif
MwBool dark_theme_detection;
MwU32 dark_theme;
MwU32 dark_theme;
/* clipboard related stuff.
* Note that unlike most interfaces, we don't keep zwp_primary_selection stuff in a wayland_protocol_t because we use wl_data_device as a fallback and want to have it share memory space.*/

View file

@ -112,7 +112,8 @@
<pixmap name="backgroundPixmap" common="yes" />
<pointer name="monospaceFont" />
<pointer name="boldMonospaceFont" />
</properties>
<handlers>
<handler name="activate" />
<handler name="listBoxActivate">
<integer pointer="yes" />
@ -120,33 +121,33 @@
<handler name="treeViewActivate">
<pointer />
</handler>
<handler name="resize" />
<handler name="tick" />
<handler name="resize" common="yes" />
<handler name="tick" common="yes" />
<handler name="menu">
<pointer />
</handler>
<handler name="mouseDown">
<handler name="mouseDown" common="yes">
<struct defname="MwMouse" pointer="yes" />
</handler>
<handler name="mouseUp">
<handler name="mouseUp" common="yes">
<struct defname="MwMouse" pointer="yes" />
</handler>
<handler name="mouseMove">
<handler name="mouseMove" common="yes">
<struct defname="MwPoint" pointer="yes" />
</handler>
<handler name="changed" />
<handler name="comboBoxChanged">
<integer pointer="yes" />
</handler>
<handler name="key">
<handler name="key" common="yes">
<integer pointer="yes" />
</handler>
<handler name="keyRelease">
<handler name="keyRelease" common="yes">
<integer pointer="yes" />
</handler>
<handler name="close" />
<handler name="focusIn" />
<handler name="focusOut" />
<handler name="focusIn" common="yes" />
<handler name="focusOut" common="yes" />
<handler name="fileChosen">
<string />
</handler>
@ -157,13 +158,13 @@
<struct defname="MwRGB" pointer="yes" />
</handler>
<handler name="draw" />
<handler name="clipboard">
<handler name="clipboard" common="yes">
<string />
</handler>
<handler name="darkTheme">
<handler name="darkTheme" common="yes">
<integer pointer="yes" />
</handler>
</properties>
</handlers>
<enumerations>
<enumeration name="MwDIRECTION">
<integer name="MwNORTH">0</integer>
@ -598,17 +599,28 @@
<property name="padding" />
<property name="fillArea" />
</properties>
<handlers>
<handler name="activate" />
<handler name="changed" />
</handlers>
</widget>
<widget name="CheckBox">
<properties>
<property name="checked" />
</properties>
<handlers>
<handler name="changed" />
</handlers>
</widget>
<widget name="Entry">
<properties>
<property name="text" />
<property name="hideInput" />
</properties>
<handlers>
<handler name="activate" />
<handler name="changed" />
</handlers>
</widget>
<widget name="Frame">
<properties>
@ -648,6 +660,9 @@
<property name="hasHeading" />
<property name="singleClickSelectable" />
</properties>
<handlers>
<handler name="listBoxActivate" />
</handlers>
<functions>
<function name="Insert">
<arguments>
@ -678,6 +693,9 @@
</functions>
</widget>
<widget name="Menu">
<handlers>
<handler name="menu" />
</handlers>
<functions>
<function name="Add">
<return>
@ -694,6 +712,10 @@
<properties>
<property name="text" />
</properties>
<handlers>
<handler name="activate" />
<handler name="changed" />
</handlers>
</widget>
<widget name="ScrollBar">
<properties>
@ -704,6 +726,9 @@
<property name="maxValue" />
<property name="orientation" />
</properties>
<handlers>
<handler name="changed" />
</handlers>
<functions>
<function name="GetVisibleLength">
<return>
@ -764,12 +789,18 @@
<properties>
<property name="checked" />
</properties>
<handlers>
<handler name="changed" />
</handlers>
</widget>
<widget name="ComboBox">
<properties>
<property name="areaShown" />
<property name="value" />
</properties>
<handlers>
<handler name="comboBoxChanged" />
</handlers>
<functions>
<function name="Add">
<integer name="index" />
@ -782,6 +813,9 @@
<property name="leftPadding" />
<property name="singleClickSelectable" />
</properties>
<handlers>
<handler name="treeViewActivate" />
</handlers>
<functions>
<function name="Add">
<arguments>

View file

@ -788,7 +788,9 @@ static void MwLLNextEventImpl(MwLL handle) {
} else {
n = s;
}
} else if(strcmp(str, "BackSpace") == 0) {
}
if(strcmp(str, "BackSpace") == 0) {
n = MwLLKeyBackSpace;
} else if(strcmp(str, "Left") == 0) {
n = MwLLKeyLeft;

View file

@ -128,7 +128,7 @@ MwBool MwLLDBusNewContext(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx) {
MWDECL MwBool MwLLDBusPortalGet(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, const char* portal, const char* namespace, const char* key, void* out) {
DBusMessageIter dbus_args, dbus_variant, dbus_inner_variant;
char arg_type;
char arg_type;
if(!ctx->dbus_conn) {
return MwFALSE;
}
@ -182,7 +182,7 @@ MWDECL MwBool MwLLDBusPortalGet(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, co
return MwFALSE;
}
tbl->dbus_message_iter_get_basic(&dbus_inner_variant, out);
} else if (arg_type == 'u') {
} else if(arg_type == 'u') {
tbl->dbus_message_iter_get_basic(&dbus_variant, out);
} else {
fprintf(stderr, "[WARNING] Couldn't get %s::%s: Expected variant or string, got: %c\n", namespace, key, arg_type);
@ -277,7 +277,7 @@ MWDECL MwBool MwLLDBusPortalPoll(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, M
return MwFALSE;
}
tbl->dbus_message_iter_get_basic(&msg_value_inner, &msg_value_content);
} else if (arg_type == 'u') {
} else if(arg_type == 'u') {
tbl->dbus_message_iter_get_basic(&msg_value, &msg_value_content);
} else {
fprintf(stderr, "[WARNING] Couldn't get %s::%s: Expected variant or string, got: %c\n", namespace, key, arg_type);

View file

@ -133,7 +133,7 @@ static void click(MwWidget handle) {
MwListBoxInsert(cb->listbox, -1, packet);
MwListBoxDestroyPacket(packet);
MwAddUserHandler(cb->listbox, MwNactivateHandler, listbox_activate, NULL);
MwAddUserHandler(cb->listbox, MwNlistBoxActivateHandler, listbox_activate, NULL);
p.x = 0;
p.y = MwGetInteger(handle, MwNheight);

View file

@ -102,6 +102,7 @@ static void key(MwWidget handle, int code) {
MwUTF8Copy(str, t->cursor + 1, out, t->cursor, MwUTF8Length(str) - (t->cursor + 1));
MwSetText(handle, MwNtext, out);
MwDispatchUserHandler(handle, MwNchangedHandler, NULL);
free(out);
} else if(code == MwLLKeyLeft) {
@ -124,6 +125,7 @@ static void key(MwWidget handle, int code) {
t->cursor++;
MwSetText(handle, MwNtext, out);
MwDispatchUserHandler(handle, MwNchangedHandler, NULL);
free(out);
}

View file

@ -108,6 +108,8 @@ static void mouse_up(MwWidget handle, void* ptr) {
MwStringPrintIntoBuffer(s, 512, "%g", atof(str) + 1);
}
MwSetText(handle, MwNtext, s);
MwDispatchUserHandler(handle, MwNchangedHandler, NULL);
}
MwForceRender(handle);

View file

@ -556,8 +556,8 @@ static void* mwVulkanGetFieldImpl(MwWidget handle, int field, int* err) {
static void func_handler(MwWidget handle, const char* name, void* output, va_list va) {
if(strcmp(name, "mwVulkanGetField") == 0) {
int field = va_arg(va, int);
int* err = va_arg(va, int*);
int field = va_arg(va, int);
int* err = va_arg(va, int*);
*(void**)output = mwVulkanGetFieldImpl(handle, field, err);
}
}