Load the real desktop shell (lib/shell, panel, launcher, clock) into the native compositor
CI / test (push) Successful in 34s
CI / test (push) Successful in 34s
Replaces the hardcoded build_shell_ops with compositor/shell, which drives the same pure lib/* logic the wasm components wrap and adapts it to scene ops. Adds a wall-clock FFI and native stubs for the wasm-only theme bindings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3cb8417699
commit
769ab829c8
8 files changed
+285
-1
No files matched your search
@@ -10,6 +10,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/un.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "moonbit.h"
|
||||
@@ -291,3 +292,21 @@ MOONBIT_FFI_EXPORT
|
||||
int32_t mp_getpid(void) {
|
||||
return (int32_t)getpid();
|
||||
}
|
||||
|
||||
/* Local wall-clock field: 0 year, 1 month(1-12), 2 day, 3 hour, 4 minute, 5 second, 6 weekday(0=Sun). */
|
||||
MOONBIT_FFI_EXPORT
|
||||
int32_t mp_wall_time_field(int32_t which) {
|
||||
time_t t = time(NULL);
|
||||
struct tm tmv;
|
||||
localtime_r(&t, &tmv);
|
||||
switch (which) {
|
||||
case 0: return tmv.tm_year + 1900;
|
||||
case 1: return tmv.tm_mon + 1;
|
||||
case 2: return tmv.tm_mday;
|
||||
case 3: return tmv.tm_hour;
|
||||
case 4: return tmv.tm_min;
|
||||
case 5: return tmv.tm_sec;
|
||||
case 6: return tmv.tm_wday;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user