mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-27 05:34:00 +00:00
增加窗口uid并且修复多窗口bug
This commit is contained in:
@@ -66,6 +66,7 @@ typedef struct tm_app {
|
|||||||
u64 selected_pid;
|
u64 selected_pid;
|
||||||
u64 total_mem;
|
u64 total_mem;
|
||||||
u64 proc_count_raw;
|
u64 proc_count_raw;
|
||||||
|
u64 window_count_raw;
|
||||||
u64 last_refresh_tick;
|
u64 last_refresh_tick;
|
||||||
cleonos_proc_snapshot rows[TM_MAX_ROWS];
|
cleonos_proc_snapshot rows[TM_MAX_ROWS];
|
||||||
u64 row_count;
|
u64 row_count;
|
||||||
@@ -440,7 +441,9 @@ static void tm_build_summary_status(tm_app *app) {
|
|||||||
tm_append_u64_dec(app->status, (u64)sizeof(app->status), app->proc_count_raw);
|
tm_append_u64_dec(app->status, (u64)sizeof(app->status), app->proc_count_raw);
|
||||||
tm_append(app->status, (u64)sizeof(app->status), " | ACTIVE MEM ");
|
tm_append(app->status, (u64)sizeof(app->status), " | ACTIVE MEM ");
|
||||||
tm_append_u64_dec(app->status, (u64)sizeof(app->status), app->total_mem / 1024ULL);
|
tm_append_u64_dec(app->status, (u64)sizeof(app->status), app->total_mem / 1024ULL);
|
||||||
tm_append(app->status, (u64)sizeof(app->status), " KB | R REFRESH A ALL DEL END TASK");
|
tm_append(app->status, (u64)sizeof(app->status), " KB | WINDOWS ");
|
||||||
|
tm_append_u64_dec(app->status, (u64)sizeof(app->status), app->window_count_raw);
|
||||||
|
tm_append(app->status, (u64)sizeof(app->status), " | R REFRESH A ALL DEL END TASK");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tm_clamp_selection(tm_app *app) {
|
static void tm_clamp_selection(tm_app *app) {
|
||||||
@@ -494,6 +497,7 @@ static void tm_reload(tm_app *app) {
|
|||||||
app->total_mem = 0ULL;
|
app->total_mem = 0ULL;
|
||||||
proc_count = cleonos_sys_proc_count();
|
proc_count = cleonos_sys_proc_count();
|
||||||
app->proc_count_raw = proc_count;
|
app->proc_count_raw = proc_count;
|
||||||
|
app->window_count_raw = cleonos_sys_wm_count();
|
||||||
|
|
||||||
for (i = 0ULL; i < proc_count && app->row_count < (u64)TM_MAX_ROWS; i++) {
|
for (i = 0ULL; i < proc_count && app->row_count < (u64)TM_MAX_ROWS; i++) {
|
||||||
u64 pid = 0ULL;
|
u64 pid = 0ULL;
|
||||||
@@ -593,8 +597,37 @@ static void tm_draw_header(const tm_app *app) {
|
|||||||
tm_draw_text(app->w, app->h, 18, y + 9, "PID", 1, TM_COLOR_MUTED);
|
tm_draw_text(app->w, app->h, 18, y + 9, "PID", 1, TM_COLOR_MUTED);
|
||||||
tm_draw_text(app->w, app->h, 82, y + 9, "STATE", 1, TM_COLOR_MUTED);
|
tm_draw_text(app->w, app->h, 82, y + 9, "STATE", 1, TM_COLOR_MUTED);
|
||||||
tm_draw_text(app->w, app->h, 172, y + 9, "MEM KB", 1, TM_COLOR_MUTED);
|
tm_draw_text(app->w, app->h, 172, y + 9, "MEM KB", 1, TM_COLOR_MUTED);
|
||||||
tm_draw_text(app->w, app->h, 260, y + 9, "TICKS", 1, TM_COLOR_MUTED);
|
tm_draw_text(app->w, app->h, 248, y + 9, "TICKS", 1, TM_COLOR_MUTED);
|
||||||
tm_draw_text(app->w, app->h, 350, y + 9, "IMAGE", 1, TM_COLOR_MUTED);
|
tm_draw_text(app->w, app->h, 330, y + 9, "WIN", 1, TM_COLOR_MUTED);
|
||||||
|
tm_draw_text(app->w, app->h, 382, y + 9, "IMAGE", 1, TM_COLOR_MUTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
static u64 tm_window_count_for_pid(u64 pid) {
|
||||||
|
u64 count = cleonos_sys_wm_count();
|
||||||
|
u64 i;
|
||||||
|
u64 owned = 0ULL;
|
||||||
|
|
||||||
|
if (pid == 0ULL) {
|
||||||
|
return 0ULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0ULL; i < count; i++) {
|
||||||
|
u64 window_id = 0ULL;
|
||||||
|
cleonos_wm_snapshot snap;
|
||||||
|
|
||||||
|
tm_zero(&snap, (u64)sizeof(snap));
|
||||||
|
if (cleonos_sys_wm_id_at(i, &window_id) == 0ULL || window_id == 0ULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (cleonos_sys_wm_snapshot(window_id, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (snap.owner_pid == pid) {
|
||||||
|
owned++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return owned;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tm_draw_row(const tm_app *app, int row_y, int row_index) {
|
static void tm_draw_row(const tm_app *app, int row_y, int row_index) {
|
||||||
@@ -635,9 +668,12 @@ static void tm_draw_row(const tm_app *app, int row_y, int row_index) {
|
|||||||
tm_draw_text_limit(app->w, app->h, 172, row_y + 8, value, 1, TM_COLOR_TEXT, 250);
|
tm_draw_text_limit(app->w, app->h, 172, row_y + 8, value, 1, TM_COLOR_TEXT, 250);
|
||||||
|
|
||||||
tm_u64_to_dec(value, (u64)sizeof(value), snap->runtime_ticks);
|
tm_u64_to_dec(value, (u64)sizeof(value), snap->runtime_ticks);
|
||||||
tm_draw_text_limit(app->w, app->h, 260, row_y + 8, value, 1, TM_COLOR_TEXT, 342);
|
tm_draw_text_limit(app->w, app->h, 248, row_y + 8, value, 1, TM_COLOR_TEXT, 324);
|
||||||
|
|
||||||
tm_draw_text_limit(app->w, app->h, 350, row_y + 8, snap->path, 1, TM_COLOR_TEXT, app->w - 16);
|
tm_u64_to_dec(value, (u64)sizeof(value), tm_window_count_for_pid(snap->pid));
|
||||||
|
tm_draw_text_limit(app->w, app->h, 330, row_y + 8, value, 1, TM_COLOR_TEXT, 374);
|
||||||
|
|
||||||
|
tm_draw_text_limit(app->w, app->h, 382, row_y + 8, snap->path, 1, TM_COLOR_TEXT, app->w - 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tm_draw_rows(const tm_app *app) {
|
static void tm_draw_rows(const tm_app *app) {
|
||||||
|
|||||||
@@ -89,9 +89,12 @@ typedef struct ush_uwm_session {
|
|||||||
int resize_pending_h;
|
int resize_pending_h;
|
||||||
int start_open;
|
int start_open;
|
||||||
u64 mouse_packet_seen;
|
u64 mouse_packet_seen;
|
||||||
|
u64 app_registry_last_tick;
|
||||||
u64 tty_before;
|
u64 tty_before;
|
||||||
int tty_switched;
|
int tty_switched;
|
||||||
char last_error[96];
|
char last_error[96];
|
||||||
|
u64 app_pids[USH_UWM_APP_COUNT];
|
||||||
|
u64 app_states[USH_UWM_APP_COUNT];
|
||||||
ush_uwm_window windows[USH_UWM_WINDOW_COUNT];
|
ush_uwm_window windows[USH_UWM_WINDOW_COUNT];
|
||||||
} ush_uwm_session;
|
} ush_uwm_session;
|
||||||
|
|
||||||
@@ -100,6 +103,8 @@ int ush_uwm_app_index_valid(int index);
|
|||||||
int ush_uwm_clampi(int value, int min_value, int max_value);
|
int ush_uwm_clampi(int value, int min_value, int max_value);
|
||||||
int ush_uwm_u64_as_i32(u64 raw);
|
int ush_uwm_u64_as_i32(u64 raw);
|
||||||
void ush_uwm_drain_startup_keys(void);
|
void ush_uwm_drain_startup_keys(void);
|
||||||
|
int ush_uwm_app_registry_running(ush_uwm_session *sess, int index);
|
||||||
|
int ush_uwm_refresh_app_registry(ush_uwm_session *sess);
|
||||||
|
|
||||||
int ush_uwm_alloc_pixels(ush_uwm_window *win);
|
int ush_uwm_alloc_pixels(ush_uwm_window *win);
|
||||||
int ush_uwm_replace_pixels(ush_uwm_window *win, int width, int height);
|
int ush_uwm_replace_pixels(ush_uwm_window *win, int width, int height);
|
||||||
|
|||||||
@@ -4,45 +4,76 @@
|
|||||||
#define USH_UWM_TASKMGR_PATH "/shell/uwm/taskmgr.elf"
|
#define USH_UWM_TASKMGR_PATH "/shell/uwm/taskmgr.elf"
|
||||||
#define USH_UWM_TERMINAL_PATH "/shell/uwm/terminal.elf"
|
#define USH_UWM_TERMINAL_PATH "/shell/uwm/terminal.elf"
|
||||||
|
|
||||||
static int ush_uwm_launch_file_explorer(void) {
|
static const char *ush_uwm_app_path(int index) {
|
||||||
u64 pid = cleonos_sys_spawn_pathv(USH_UWM_FILE_EXPLORER_PATH, "", "LAUNCHED_BY=uwm");
|
if (index == 0) {
|
||||||
|
return USH_UWM_FILE_EXPLORER_PATH;
|
||||||
|
}
|
||||||
|
if (index == USH_UWM_TERMINAL_INDEX) {
|
||||||
|
return USH_UWM_TERMINAL_PATH;
|
||||||
|
}
|
||||||
|
if (index == USH_UWM_TASKMGR_INDEX) {
|
||||||
|
return USH_UWM_TASKMGR_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
return (pid != 0ULL && pid != (u64)-1) ? 1 : 0;
|
return (const char *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ush_uwm_launch_terminal(void) {
|
static int ush_uwm_focus_first_window_for_pid(u64 pid) {
|
||||||
u64 pid = cleonos_sys_spawn_pathv(USH_UWM_TERMINAL_PATH, "", "LAUNCHED_BY=uwm");
|
u64 count;
|
||||||
|
u64 i;
|
||||||
|
|
||||||
return (pid != 0ULL && pid != (u64)-1) ? 1 : 0;
|
if (pid == 0ULL || pid == (u64)-1) {
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int ush_uwm_launch_taskmgr(void) {
|
count = cleonos_sys_wm_count();
|
||||||
u64 pid = cleonos_sys_spawn_pathv(USH_UWM_TASKMGR_PATH, "", "LAUNCHED_BY=uwm");
|
while (count > 0ULL) {
|
||||||
|
u64 window_id = 0ULL;
|
||||||
|
cleonos_wm_snapshot snap;
|
||||||
|
|
||||||
return (pid != 0ULL && pid != (u64)-1) ? 1 : 0;
|
count--;
|
||||||
|
i = count;
|
||||||
|
ush_zero(&snap, (u64)sizeof(snap));
|
||||||
|
if (cleonos_sys_wm_id_at(i, &window_id) == 0ULL || window_id == 0ULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (cleonos_sys_wm_snapshot(window_id, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (snap.owner_pid == pid) {
|
||||||
|
return (cleonos_sys_wm_set_focus(window_id) != 0ULL) ? 1 : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ush_uwm_launch_or_restore_app(ush_uwm_session *sess, int index) {
|
static void ush_uwm_launch_or_restore_app(ush_uwm_session *sess, int index) {
|
||||||
|
const char *path;
|
||||||
|
u64 pid;
|
||||||
|
|
||||||
if (sess == (ush_uwm_session *)0 || ush_uwm_app_index_valid(index) == 0) {
|
if (sess == (ush_uwm_session *)0 || ush_uwm_app_index_valid(index) == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index == 0) {
|
if (ush_uwm_app_registry_running(sess, index) != 0) {
|
||||||
(void)ush_uwm_launch_file_explorer();
|
(void)ush_uwm_focus_first_window_for_pid(sess->app_pids[index]);
|
||||||
|
ush_uwm_refresh_taskbar(sess);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index == USH_UWM_TERMINAL_INDEX) {
|
path = ush_uwm_app_path(index);
|
||||||
(void)ush_uwm_launch_terminal();
|
if (path == (const char *)0) {
|
||||||
|
ush_uwm_restore_window(sess, index);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index == USH_UWM_TASKMGR_INDEX) {
|
pid = cleonos_sys_spawn_pathv(path, "", "LAUNCHED_BY=uwm");
|
||||||
(void)ush_uwm_launch_taskmgr();
|
if (pid != 0ULL && pid != (u64)-1) {
|
||||||
return;
|
sess->app_pids[index] = pid;
|
||||||
|
sess->app_states[index] = CLEONOS_PROC_STATE_PENDING;
|
||||||
}
|
}
|
||||||
|
ush_uwm_refresh_taskbar(sess);
|
||||||
ush_uwm_restore_window(sess, index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ush_uwm_hit_close(const ush_uwm_window *win, int x, int y) {
|
static int ush_uwm_hit_close(const ush_uwm_window *win, int x, int y) {
|
||||||
@@ -567,6 +598,17 @@ int ush_uwm_loop(ush_uwm_session *sess) {
|
|||||||
int i;
|
int i;
|
||||||
int handled_events = 0;
|
int handled_events = 0;
|
||||||
int preferred_window = -1;
|
int preferred_window = -1;
|
||||||
|
u64 now_tick = cleonos_sys_timer_ticks();
|
||||||
|
|
||||||
|
if (now_tick - sess->app_registry_last_tick >= 20ULL) {
|
||||||
|
sess->app_registry_last_tick = now_tick;
|
||||||
|
if (ush_uwm_refresh_app_registry(sess) != 0) {
|
||||||
|
ush_uwm_refresh_taskbar(sess);
|
||||||
|
if (sess->start_open != 0) {
|
||||||
|
ush_uwm_refresh_window(sess, USH_UWM_START_INDEX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sess->dragging != 0 && ush_uwm_window_index_valid(sess->drag_window) != 0) {
|
if (sess->dragging != 0 && ush_uwm_window_index_valid(sess->drag_window) != 0) {
|
||||||
preferred_window = sess->drag_window;
|
preferred_window = sess->drag_window;
|
||||||
|
|||||||
@@ -48,3 +48,54 @@ void ush_uwm_drain_startup_keys(void) {
|
|||||||
drained++;
|
drained++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ush_uwm_app_registry_running(ush_uwm_session *sess, int index) {
|
||||||
|
cleonos_proc_snapshot snap;
|
||||||
|
u64 pid;
|
||||||
|
|
||||||
|
if (sess == (ush_uwm_session *)0 || ush_uwm_app_index_valid(index) == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pid = sess->app_pids[index];
|
||||||
|
if (pid == 0ULL || pid == (u64)-1) {
|
||||||
|
sess->app_pids[index] = 0ULL;
|
||||||
|
sess->app_states[index] = CLEONOS_PROC_STATE_UNUSED;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ush_zero(&snap, (u64)sizeof(snap));
|
||||||
|
if (cleonos_sys_proc_snapshot(pid, &snap, (u64)sizeof(snap)) == 0ULL) {
|
||||||
|
sess->app_pids[index] = 0ULL;
|
||||||
|
sess->app_states[index] = CLEONOS_PROC_STATE_UNUSED;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
sess->app_states[index] = snap.state;
|
||||||
|
if (snap.state == CLEONOS_PROC_STATE_EXITED || snap.state == CLEONOS_PROC_STATE_UNUSED) {
|
||||||
|
sess->app_pids[index] = 0ULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ush_uwm_refresh_app_registry(ush_uwm_session *sess) {
|
||||||
|
int i;
|
||||||
|
int changed = 0;
|
||||||
|
|
||||||
|
if (sess == (ush_uwm_session *)0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < (int)USH_UWM_APP_COUNT; i++) {
|
||||||
|
u64 old_pid = sess->app_pids[i];
|
||||||
|
u64 old_state = sess->app_states[i];
|
||||||
|
(void)ush_uwm_app_registry_running(sess, i);
|
||||||
|
if (old_pid != sess->app_pids[i] || old_state != sess->app_states[i]) {
|
||||||
|
changed = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|||||||
@@ -527,14 +527,21 @@ static void ush_uwm_render_taskbar(ush_uwm_session *sess) {
|
|||||||
ush_uwm_u32 bg = 0x00282828U;
|
ush_uwm_u32 bg = 0x00282828U;
|
||||||
ush_uwm_u32 fg = 0x00EAEAEAU;
|
ush_uwm_u32 fg = 0x00EAEAEAU;
|
||||||
int active = 0;
|
int active = 0;
|
||||||
|
int running = (sess->app_pids[i] != 0ULL && sess->app_states[i] != CLEONOS_PROC_STATE_EXITED &&
|
||||||
|
sess->app_states[i] != CLEONOS_PROC_STATE_UNUSED)
|
||||||
|
? 1
|
||||||
|
: 0;
|
||||||
|
|
||||||
if (app_x + USH_UWM_TASKBAR_BUTTON_W > taskbar->w - 98) {
|
if (app_x + USH_UWM_TASKBAR_BUTTON_W > taskbar->w - 98) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app->closed != 0) {
|
if (running == 0 && app->closed != 0) {
|
||||||
bg = 0x001F1F1FU;
|
bg = 0x001F1F1FU;
|
||||||
fg = 0x008F8F8FU;
|
fg = 0x008F8F8FU;
|
||||||
|
} else if (running != 0) {
|
||||||
|
bg = 0x00383838U;
|
||||||
|
active = 1;
|
||||||
} else if (app->minimized != 0) {
|
} else if (app->minimized != 0) {
|
||||||
bg = 0x002F2F2FU;
|
bg = 0x002F2F2FU;
|
||||||
} else if (sess->active_window == i) {
|
} else if (sess->active_window == i) {
|
||||||
@@ -570,15 +577,20 @@ static void ush_uwm_render_start(ush_uwm_session *sess) {
|
|||||||
|
|
||||||
for (i = 0; i < (int)USH_UWM_APP_COUNT; i++) {
|
for (i = 0; i < (int)USH_UWM_APP_COUNT; i++) {
|
||||||
int y = 78 + (i * 44);
|
int y = 78 + (i * 44);
|
||||||
ush_uwm_u32 bg = (sess->active_window == i && sess->windows[i].closed == 0 && sess->windows[i].minimized == 0)
|
int running = (sess->app_pids[i] != 0ULL && sess->app_states[i] != CLEONOS_PROC_STATE_EXITED &&
|
||||||
? 0x003B3B3BU
|
sess->app_states[i] != CLEONOS_PROC_STATE_UNUSED)
|
||||||
: 0x00272727U;
|
? 1
|
||||||
|
: 0;
|
||||||
|
ush_uwm_u32 bg = (running != 0) ? 0x003B3B3BU : 0x00272727U;
|
||||||
if (y + 34 > start->h - 76) {
|
if (y + 34 > start->h - 76) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ush_uwm_fill_rect(start, 66, y, start->w - 82, 34, bg);
|
ush_uwm_fill_rect(start, 66, y, start->w - 82, 34, bg);
|
||||||
ush_uwm_fill_rect(start, 66, y, 4, 34, sess->windows[i].accent);
|
ush_uwm_fill_rect(start, 66, y, 4, 34, sess->windows[i].accent);
|
||||||
ush_uwm_draw_text_limit(start, 82, y + 10, labels[i], 1, UWM_COLOR_WHITE, start->w - 12);
|
ush_uwm_draw_text_limit(start, 82, y + 10, labels[i], 1, UWM_COLOR_WHITE, start->w - 12);
|
||||||
|
if (running != 0) {
|
||||||
|
ush_uwm_draw_text_limit(start, start->w - 64, y + 10, "RUN", 1, 0x00A6F0A6U, start->w - 12);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start->w > 248 && start->h > 260) {
|
if (start->w > 248 && start->h > 260) {
|
||||||
|
|||||||
@@ -74,6 +74,19 @@ typedef struct cleonos_wm_event {
|
|||||||
u64 arg3;
|
u64 arg3;
|
||||||
} cleonos_wm_event;
|
} cleonos_wm_event;
|
||||||
|
|
||||||
|
typedef struct cleonos_wm_snapshot {
|
||||||
|
u64 window_id;
|
||||||
|
u64 owner_pid;
|
||||||
|
u64 flags;
|
||||||
|
u64 x;
|
||||||
|
u64 y;
|
||||||
|
u64 width;
|
||||||
|
u64 height;
|
||||||
|
u64 focused;
|
||||||
|
u64 presented;
|
||||||
|
u64 event_count;
|
||||||
|
} cleonos_wm_snapshot;
|
||||||
|
|
||||||
typedef struct cleonos_wm_create_req {
|
typedef struct cleonos_wm_create_req {
|
||||||
u64 x;
|
u64 x;
|
||||||
u64 y;
|
u64 y;
|
||||||
@@ -264,6 +277,9 @@ typedef struct cleonos_net_tcp_recv_req {
|
|||||||
#define CLEONOS_SYSCALL_WM_SET_FLAGS 114ULL
|
#define CLEONOS_SYSCALL_WM_SET_FLAGS 114ULL
|
||||||
#define CLEONOS_SYSCALL_WM_RESIZE 115ULL
|
#define CLEONOS_SYSCALL_WM_RESIZE 115ULL
|
||||||
#define CLEONOS_SYSCALL_PTY_OPEN 116ULL
|
#define CLEONOS_SYSCALL_PTY_OPEN 116ULL
|
||||||
|
#define CLEONOS_SYSCALL_WM_COUNT 117ULL
|
||||||
|
#define CLEONOS_SYSCALL_WM_ID_AT 118ULL
|
||||||
|
#define CLEONOS_SYSCALL_WM_SNAPSHOT 119ULL
|
||||||
|
|
||||||
u64 cleonos_syscall(u64 id, u64 arg0, u64 arg1, u64 arg2);
|
u64 cleonos_syscall(u64 id, u64 arg0, u64 arg1, u64 arg2);
|
||||||
u64 cleonos_sys_log_write(const char *message, u64 length);
|
u64 cleonos_sys_log_write(const char *message, u64 length);
|
||||||
@@ -382,6 +398,9 @@ u64 cleonos_sys_wm_move(const cleonos_wm_move_req *req);
|
|||||||
u64 cleonos_sys_wm_set_focus(u64 window_id);
|
u64 cleonos_sys_wm_set_focus(u64 window_id);
|
||||||
u64 cleonos_sys_wm_set_flags(u64 window_id, u64 flags);
|
u64 cleonos_sys_wm_set_flags(u64 window_id, u64 flags);
|
||||||
u64 cleonos_sys_wm_resize(const cleonos_wm_resize_req *req);
|
u64 cleonos_sys_wm_resize(const cleonos_wm_resize_req *req);
|
||||||
|
u64 cleonos_sys_wm_count(void);
|
||||||
|
u64 cleonos_sys_wm_id_at(u64 index, u64 *out_window_id);
|
||||||
|
u64 cleonos_sys_wm_snapshot(u64 window_id, cleonos_wm_snapshot *out_snapshot, u64 out_size);
|
||||||
u64 cleonos_sys_pty_open(void);
|
u64 cleonos_sys_pty_open(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -496,6 +496,18 @@ u64 cleonos_sys_wm_resize(const cleonos_wm_resize_req *req) {
|
|||||||
return cleonos_syscall(CLEONOS_SYSCALL_WM_RESIZE, (u64)req, 0ULL, 0ULL);
|
return cleonos_syscall(CLEONOS_SYSCALL_WM_RESIZE, (u64)req, 0ULL, 0ULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u64 cleonos_sys_wm_count(void) {
|
||||||
|
return cleonos_syscall(CLEONOS_SYSCALL_WM_COUNT, 0ULL, 0ULL, 0ULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
u64 cleonos_sys_wm_id_at(u64 index, u64 *out_window_id) {
|
||||||
|
return cleonos_syscall(CLEONOS_SYSCALL_WM_ID_AT, index, (u64)out_window_id, 0ULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
u64 cleonos_sys_wm_snapshot(u64 window_id, cleonos_wm_snapshot *out_snapshot, u64 out_size) {
|
||||||
|
return cleonos_syscall(CLEONOS_SYSCALL_WM_SNAPSHOT, window_id, (u64)out_snapshot, out_size);
|
||||||
|
}
|
||||||
|
|
||||||
u64 cleonos_sys_pty_open(void) {
|
u64 cleonos_sys_pty_open(void) {
|
||||||
return cleonos_syscall(CLEONOS_SYSCALL_PTY_OPEN, 0ULL, 0ULL, 0ULL);
|
return cleonos_syscall(CLEONOS_SYSCALL_PTY_OPEN, 0ULL, 0ULL, 0ULL);
|
||||||
}
|
}
|
||||||
|
|||||||
2
clks
2
clks
Submodule clks updated: 1632db2372...e382e0fb8a
@@ -5,6 +5,7 @@
|
|||||||
"CLEONOS_USER_APP_ARGS": true,
|
"CLEONOS_USER_APP_ARGS": true,
|
||||||
"CLEONOS_USER_APP_BG": true,
|
"CLEONOS_USER_APP_BG": true,
|
||||||
"CLEONOS_USER_APP_BMPVIEW": true,
|
"CLEONOS_USER_APP_BMPVIEW": true,
|
||||||
|
"CLEONOS_USER_APP_BROWSER": true,
|
||||||
"CLEONOS_USER_APP_CAT": true,
|
"CLEONOS_USER_APP_CAT": true,
|
||||||
"CLEONOS_USER_APP_CD": true,
|
"CLEONOS_USER_APP_CD": true,
|
||||||
"CLEONOS_USER_APP_CLEAR": true,
|
"CLEONOS_USER_APP_CLEAR": true,
|
||||||
@@ -20,11 +21,14 @@
|
|||||||
"CLEONOS_USER_APP_FASTFETCH": true,
|
"CLEONOS_USER_APP_FASTFETCH": true,
|
||||||
"CLEONOS_USER_APP_FDTEST": true,
|
"CLEONOS_USER_APP_FDTEST": true,
|
||||||
"CLEONOS_USER_APP_FG": true,
|
"CLEONOS_USER_APP_FG": true,
|
||||||
|
"CLEONOS_USER_APP_FILE_EXPLORER": true,
|
||||||
"CLEONOS_USER_APP_FSSTAT": true,
|
"CLEONOS_USER_APP_FSSTAT": true,
|
||||||
"CLEONOS_USER_APP_GREP": true,
|
"CLEONOS_USER_APP_GREP": true,
|
||||||
"CLEONOS_USER_APP_HEAD": true,
|
"CLEONOS_USER_APP_HEAD": true,
|
||||||
"CLEONOS_USER_APP_HELLO": true,
|
"CLEONOS_USER_APP_HELLO": true,
|
||||||
"CLEONOS_USER_APP_HELP": true,
|
"CLEONOS_USER_APP_HELP": true,
|
||||||
|
"CLEONOS_USER_APP_HTTPGET": true,
|
||||||
|
"CLEONOS_USER_APP_IFCONFIG": true,
|
||||||
"CLEONOS_USER_APP_JOBS": true,
|
"CLEONOS_USER_APP_JOBS": true,
|
||||||
"CLEONOS_USER_APP_KBDSTAT": true,
|
"CLEONOS_USER_APP_KBDSTAT": true,
|
||||||
"CLEONOS_USER_APP_KDBG": true,
|
"CLEONOS_USER_APP_KDBG": true,
|
||||||
@@ -38,8 +42,10 @@
|
|||||||
"CLEONOS_USER_APP_MKFSFAT32": true,
|
"CLEONOS_USER_APP_MKFSFAT32": true,
|
||||||
"CLEONOS_USER_APP_MOUNT": true,
|
"CLEONOS_USER_APP_MOUNT": true,
|
||||||
"CLEONOS_USER_APP_MV": true,
|
"CLEONOS_USER_APP_MV": true,
|
||||||
|
"CLEONOS_USER_APP_NSLOOKUP": true,
|
||||||
"CLEONOS_USER_APP_PARTCTL": true,
|
"CLEONOS_USER_APP_PARTCTL": true,
|
||||||
"CLEONOS_USER_APP_PID": true,
|
"CLEONOS_USER_APP_PID": true,
|
||||||
|
"CLEONOS_USER_APP_PING": true,
|
||||||
"CLEONOS_USER_APP_PROCSTAT": true,
|
"CLEONOS_USER_APP_PROCSTAT": true,
|
||||||
"CLEONOS_USER_APP_PS": true,
|
"CLEONOS_USER_APP_PS": true,
|
||||||
"CLEONOS_USER_APP_PWD": true,
|
"CLEONOS_USER_APP_PWD": true,
|
||||||
@@ -56,13 +62,17 @@
|
|||||||
"CLEONOS_USER_APP_STATS": true,
|
"CLEONOS_USER_APP_STATS": true,
|
||||||
"CLEONOS_USER_APP_SYSSTAT": true,
|
"CLEONOS_USER_APP_SYSSTAT": true,
|
||||||
"CLEONOS_USER_APP_TAIL": true,
|
"CLEONOS_USER_APP_TAIL": true,
|
||||||
|
"CLEONOS_USER_APP_TASKMGR": true,
|
||||||
"CLEONOS_USER_APP_TASKSTAT": true,
|
"CLEONOS_USER_APP_TASKSTAT": true,
|
||||||
|
"CLEONOS_USER_APP_TERMINAL": true,
|
||||||
"CLEONOS_USER_APP_TOP": true,
|
"CLEONOS_USER_APP_TOP": true,
|
||||||
"CLEONOS_USER_APP_TOUCH": true,
|
"CLEONOS_USER_APP_TOUCH": true,
|
||||||
"CLEONOS_USER_APP_TTY": true,
|
"CLEONOS_USER_APP_TTY": true,
|
||||||
"CLEONOS_USER_APP_TTYDRV": true,
|
"CLEONOS_USER_APP_TTYDRV": true,
|
||||||
"CLEONOS_USER_APP_UNIQ": true,
|
"CLEONOS_USER_APP_UNIQ": true,
|
||||||
"CLEONOS_USER_APP_USERSTAT": true,
|
"CLEONOS_USER_APP_USERSTAT": true,
|
||||||
|
"CLEONOS_USER_APP_UWM": true,
|
||||||
|
"CLEONOS_USER_APP_VIM": true,
|
||||||
"CLEONOS_USER_APP_WAIT": true,
|
"CLEONOS_USER_APP_WAIT": true,
|
||||||
"CLEONOS_USER_APP_WAVPLAY": true,
|
"CLEONOS_USER_APP_WAVPLAY": true,
|
||||||
"CLEONOS_USER_APP_WC": true,
|
"CLEONOS_USER_APP_WC": true,
|
||||||
|
|||||||
@@ -28,6 +28,78 @@
|
|||||||
"default": true,
|
"default": true,
|
||||||
"depends_on": "CLEONOS_CLKS_ENABLE_MOUSE"
|
"depends_on": "CLEONOS_CLKS_ENABLE_MOUSE"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_WM_MULTI_RECT_DAMAGE",
|
||||||
|
"title": "WM Multi-Rect Damage",
|
||||||
|
"title_zh": "WM 多脏矩形",
|
||||||
|
"description": "Track several dirty rectangles instead of collapsing every frame into one large region.",
|
||||||
|
"description_zh": "跟踪多个脏矩形,避免每帧都合并成一个大区域。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": true,
|
||||||
|
"depends_on": "CLEONOS_CLKS_ENABLE_DESKTOP",
|
||||||
|
"group": "Window Manager",
|
||||||
|
"group_zh": "窗口管理器"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_WM_LAYER_CACHE",
|
||||||
|
"title": "WM Scene Layer Cache",
|
||||||
|
"title_zh": "WM 场景层缓存",
|
||||||
|
"description": "Keep a cached scene layer so unchanged background/window pixels do not need full redraw.",
|
||||||
|
"description_zh": "保留场景层缓存,避免未变化的背景/窗口像素重复重绘。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": true,
|
||||||
|
"depends_on": "CLEONOS_CLKS_ENABLE_DESKTOP",
|
||||||
|
"group": "Window Manager",
|
||||||
|
"group_zh": "窗口管理器"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_WM_FRAME_PACING",
|
||||||
|
"title": "WM Frame Pacing",
|
||||||
|
"title_zh": "WM 帧率限制",
|
||||||
|
"description": "Limit compositor flush rate using timer/TSC pacing to reduce tearing and jitter.",
|
||||||
|
"description_zh": "使用 timer/TSC 控制合成器刷新率,减少撕裂和抖动。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": true,
|
||||||
|
"depends_on": "CLEONOS_CLKS_ENABLE_DESKTOP",
|
||||||
|
"group": "Window Manager",
|
||||||
|
"group_zh": "窗口管理器"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_WM_STATS_OVERLAY",
|
||||||
|
"title": "WM FPS/MS Overlay",
|
||||||
|
"title_zh": "WM FPS/MS 叠加层",
|
||||||
|
"description": "Draw the compositor FPS/MS box in the bottom-right corner.",
|
||||||
|
"description_zh": "在右下角绘制合成器 FPS/MS 统计框。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": true,
|
||||||
|
"depends_on": "CLEONOS_CLKS_ENABLE_DESKTOP",
|
||||||
|
"group": "Window Manager",
|
||||||
|
"group_zh": "窗口管理器"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_WM_INPUT_DISPATCH",
|
||||||
|
"title": "WM Input Dispatch",
|
||||||
|
"title_zh": "WM 输入事件分发",
|
||||||
|
"description": "Dispatch mouse and keyboard events to focused kernel windows.",
|
||||||
|
"description_zh": "将鼠标和键盘事件分发给获得焦点的内核窗口。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": true,
|
||||||
|
"depends_on": "CLEONOS_CLKS_ENABLE_DESKTOP && CLEONOS_CLKS_ENABLE_MOUSE && CLEONOS_CLKS_ENABLE_KEYBOARD",
|
||||||
|
"group": "Window Manager",
|
||||||
|
"group_zh": "窗口管理器"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_WM_REAP_DEAD_OWNERS",
|
||||||
|
"title": "WM Dead Owner Cleanup",
|
||||||
|
"title_zh": "WM 死进程窗口回收",
|
||||||
|
"description": "Automatically destroy windows owned by exited processes.",
|
||||||
|
"description_zh": "自动销毁已退出进程拥有的窗口。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": true,
|
||||||
|
"depends_on": "CLEONOS_CLKS_ENABLE_DESKTOP",
|
||||||
|
"group": "Window Manager",
|
||||||
|
"group_zh": "窗口管理器"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key": "CLEONOS_CLKS_ENABLE_DRIVER_MANAGER",
|
"key": "CLEONOS_CLKS_ENABLE_DRIVER_MANAGER",
|
||||||
"title": "Driver Manager",
|
"title": "Driver Manager",
|
||||||
@@ -238,6 +310,28 @@
|
|||||||
"type": "tristate",
|
"type": "tristate",
|
||||||
"default": "y"
|
"default": "y"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_EXEC_CONTEXT_SWITCH_LOG",
|
||||||
|
"title": "EXEC Context Switch Logs",
|
||||||
|
"title_zh": "EXEC 上下文切换日志",
|
||||||
|
"description": "Print cooperative EXEC suspend/resume logs such as EXEC RUN RESUME and RUN SUSPENDED.",
|
||||||
|
"description_zh": "输出协作式 EXEC 挂起/恢复日志,例如 EXEC RUN RESUME 和 RUN SUSPENDED。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": false,
|
||||||
|
"group": "Logging Controls",
|
||||||
|
"group_zh": "日志控制"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "CLEONOS_CLKS_ENABLE_NET_DHCP_CLIENT",
|
||||||
|
"title": "Network DHCP Client",
|
||||||
|
"title_zh": "网络 DHCP 客户端",
|
||||||
|
"description": "Use DHCP to auto-configure IPv4/netmask/gateway/DNS; disable to use fallback QEMU-style static config.",
|
||||||
|
"description_zh": "使用 DHCP 自动配置 IPv4/掩码/网关/DNS;关闭后使用 QEMU 风格 fallback 静态配置。",
|
||||||
|
"type": "bool",
|
||||||
|
"default": true,
|
||||||
|
"group": "Networking",
|
||||||
|
"group_zh": "网络"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key": "CLEONOS_CLKS_ENABLE_SYSCALL_SERIAL_LOG",
|
"key": "CLEONOS_CLKS_ENABLE_SYSCALL_SERIAL_LOG",
|
||||||
"title": "SYSCALL Serial Logs",
|
"title": "SYSCALL Serial Logs",
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ set(CLEONOS_USER_APP_APPEND ON CACHE BOOL "append.elf [shell]" FORCE)
|
|||||||
set(CLEONOS_USER_APP_ARGS ON CACHE BOOL "args.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_ARGS ON CACHE BOOL "args.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_BG ON CACHE BOOL "bg.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_BG ON CACHE BOOL "bg.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_BMPVIEW ON CACHE BOOL "bmpview.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_BMPVIEW ON CACHE BOOL "bmpview.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_BROWSER ON CACHE BOOL "browser.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_CAT ON CACHE BOOL "cat.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_CAT ON CACHE BOOL "cat.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_CD ON CACHE BOOL "cd.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_CD ON CACHE BOOL "cd.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_CLEAR ON CACHE BOOL "clear.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_CLEAR ON CACHE BOOL "clear.elf [shell]" FORCE)
|
||||||
@@ -23,10 +24,13 @@ set(CLEONOS_USER_APP_EXIT ON CACHE BOOL "exit.elf [shell]" FORCE)
|
|||||||
set(CLEONOS_USER_APP_FASTFETCH ON CACHE BOOL "fastfetch.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_FASTFETCH ON CACHE BOOL "fastfetch.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_FDTEST ON CACHE BOOL "fdtest.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_FDTEST ON CACHE BOOL "fdtest.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_FG ON CACHE BOOL "fg.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_FG ON CACHE BOOL "fg.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_FILE_EXPLORER ON CACHE BOOL "file_explorer.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_FSSTAT ON CACHE BOOL "fsstat.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_FSSTAT ON CACHE BOOL "fsstat.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_GREP ON CACHE BOOL "grep.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_GREP ON CACHE BOOL "grep.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_HEAD ON CACHE BOOL "head.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_HEAD ON CACHE BOOL "head.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_HELP ON CACHE BOOL "help.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_HELP ON CACHE BOOL "help.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_HTTPGET ON CACHE BOOL "httpget.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_IFCONFIG ON CACHE BOOL "ifconfig.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_JOBS ON CACHE BOOL "jobs.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_JOBS ON CACHE BOOL "jobs.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_KBDSTAT ON CACHE BOOL "kbdstat.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_KBDSTAT ON CACHE BOOL "kbdstat.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_KDBG ON CACHE BOOL "kdbg.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_KDBG ON CACHE BOOL "kdbg.elf [shell]" FORCE)
|
||||||
@@ -39,8 +43,10 @@ set(CLEONOS_USER_APP_MKDIR ON CACHE BOOL "mkdir.elf [shell]" FORCE)
|
|||||||
set(CLEONOS_USER_APP_MKFSFAT32 ON CACHE BOOL "mkfsfat32.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_MKFSFAT32 ON CACHE BOOL "mkfsfat32.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_MOUNT ON CACHE BOOL "mount.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_MOUNT ON CACHE BOOL "mount.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_MV ON CACHE BOOL "mv.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_MV ON CACHE BOOL "mv.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_NSLOOKUP ON CACHE BOOL "nslookup.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_PARTCTL ON CACHE BOOL "partctl.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_PARTCTL ON CACHE BOOL "partctl.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_PID ON CACHE BOOL "pid.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_PID ON CACHE BOOL "pid.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_PING ON CACHE BOOL "ping.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_PROCSTAT ON CACHE BOOL "procstat.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_PROCSTAT ON CACHE BOOL "procstat.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_PS ON CACHE BOOL "ps.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_PS ON CACHE BOOL "ps.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_PWD ON CACHE BOOL "pwd.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_PWD ON CACHE BOOL "pwd.elf [shell]" FORCE)
|
||||||
@@ -57,12 +63,16 @@ set(CLEONOS_USER_APP_SPIN ON CACHE BOOL "spin.elf [shell]" FORCE)
|
|||||||
set(CLEONOS_USER_APP_STATS ON CACHE BOOL "stats.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_STATS ON CACHE BOOL "stats.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_SYSSTAT ON CACHE BOOL "sysstat.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_SYSSTAT ON CACHE BOOL "sysstat.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_TAIL ON CACHE BOOL "tail.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_TAIL ON CACHE BOOL "tail.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_TASKMGR ON CACHE BOOL "taskmgr.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_TASKSTAT ON CACHE BOOL "taskstat.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_TASKSTAT ON CACHE BOOL "taskstat.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_TERMINAL ON CACHE BOOL "terminal.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_TOP ON CACHE BOOL "top.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_TOP ON CACHE BOOL "top.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_TOUCH ON CACHE BOOL "touch.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_TOUCH ON CACHE BOOL "touch.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_TTY ON CACHE BOOL "tty.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_TTY ON CACHE BOOL "tty.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_UNIQ ON CACHE BOOL "uniq.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_UNIQ ON CACHE BOOL "uniq.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_USERSTAT ON CACHE BOOL "userstat.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_USERSTAT ON CACHE BOOL "userstat.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_UWM ON CACHE BOOL "uwm.elf [shell]" FORCE)
|
||||||
|
set(CLEONOS_USER_APP_VIM ON CACHE BOOL "vim.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_WAIT ON CACHE BOOL "wait.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_WAIT ON CACHE BOOL "wait.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_WAVPLAY ON CACHE BOOL "wavplay.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_WAVPLAY ON CACHE BOOL "wavplay.elf [shell]" FORCE)
|
||||||
set(CLEONOS_USER_APP_WC ON CACHE BOOL "wc.elf [shell]" FORCE)
|
set(CLEONOS_USER_APP_WC ON CACHE BOOL "wc.elf [shell]" FORCE)
|
||||||
|
|||||||
@@ -875,7 +875,7 @@ UserSafeController(USC)危险 syscall 确认:
|
|||||||
- 参数:
|
- 参数:
|
||||||
- `arg0`: `u64 window_id`
|
- `arg0`: `u64 window_id`
|
||||||
- 返回:成功 `1`,失败 `0`
|
- 返回:成功 `1`,失败 `0`
|
||||||
- 说明:将目标窗口置为焦点并提升到顶层 z-order。
|
- 说明:将目标窗口置为焦点并提升到顶层 z-order。该操作允许 UWM/任务栏聚焦其他进程创建的窗口;窗口内容提交、移动、销毁仍由窗口拥有者限制。
|
||||||
|
|
||||||
### 114 `CLEONOS_SYSCALL_WM_SET_FLAGS`
|
### 114 `CLEONOS_SYSCALL_WM_SET_FLAGS`
|
||||||
|
|
||||||
@@ -902,6 +902,46 @@ UserSafeController(USC)危险 syscall 确认:
|
|||||||
- 创建桌面伪 tty 输出端。用户态可把该 FD 传给 `EXEC_PATHV_IO` 的 stdout/stderr,然后通过 `FD_READ` 从同一 FD 读取子进程输出。
|
- 创建桌面伪 tty 输出端。用户态可把该 FD 传给 `EXEC_PATHV_IO` 的 stdout/stderr,然后通过 `FD_READ` 从同一 FD 读取子进程输出。
|
||||||
- 当前 PTY 是“命令输出捕获型”最小实现,不提供完整主从终端会话语义;阻塞式交互 shell 仍应继续使用普通 TTY。
|
- 当前 PTY 是“命令输出捕获型”最小实现,不提供完整主从终端会话语义;阻塞式交互 shell 仍应继续使用普通 TTY。
|
||||||
|
|
||||||
|
### 117 `CLEONOS_SYSCALL_WM_COUNT`
|
||||||
|
|
||||||
|
- 参数:无
|
||||||
|
- 返回:当前内核 WM 窗口数量。
|
||||||
|
- 说明:窗口列表按当前 z-order 枚举,主要给 UWM、Task Manager 这类桌面组件做窗口/进程关联。
|
||||||
|
|
||||||
|
### 118 `CLEONOS_SYSCALL_WM_ID_AT`
|
||||||
|
|
||||||
|
- 参数:
|
||||||
|
- `arg0`: `u64 index`
|
||||||
|
- `arg1`: `u64 *out_window_id`
|
||||||
|
- 返回:成功返回 `1`,失败返回 `0`。
|
||||||
|
- 说明:按 z-order 索引读取窗口 ID;`index` 范围为 `[0, WM_COUNT)`。
|
||||||
|
|
||||||
|
### 119 `CLEONOS_SYSCALL_WM_SNAPSHOT`
|
||||||
|
|
||||||
|
- 参数:
|
||||||
|
- `arg0`: `u64 window_id`
|
||||||
|
- `arg1`: `struct cleonos_wm_snapshot *out_snapshot`
|
||||||
|
- `arg2`: `u64 out_size`
|
||||||
|
- 返回:成功返回 `1`,失败返回 `0`。
|
||||||
|
- 快照结构:
|
||||||
|
|
||||||
|
```c
|
||||||
|
typedef struct cleonos_wm_snapshot {
|
||||||
|
u64 window_id;
|
||||||
|
u64 owner_pid;
|
||||||
|
u64 flags;
|
||||||
|
u64 x;
|
||||||
|
u64 y;
|
||||||
|
u64 width;
|
||||||
|
u64 height;
|
||||||
|
u64 focused;
|
||||||
|
u64 presented;
|
||||||
|
u64 event_count;
|
||||||
|
} cleonos_wm_snapshot;
|
||||||
|
```
|
||||||
|
|
||||||
|
- 说明:`owner_pid` 是创建窗口的用户进程 PID;内核仍会限制窗口修改/销毁等操作只能由窗口拥有者执行。
|
||||||
|
|
||||||
## 5. 用户态封装函数
|
## 5. 用户态封装函数
|
||||||
|
|
||||||
用户态封装位于:
|
用户态封装位于:
|
||||||
@@ -918,6 +958,7 @@ UserSafeController(USC)危险 syscall 确认:
|
|||||||
- `cleonos_sys_tty_write()`
|
- `cleonos_sys_tty_write()`
|
||||||
- `cleonos_sys_kbd_get_char()` / `cleonos_sys_kbd_buffered()`
|
- `cleonos_sys_kbd_get_char()` / `cleonos_sys_kbd_buffered()`
|
||||||
- `cleonos_sys_getpid()` / `cleonos_sys_spawn_path()` / `cleonos_sys_wait_pid()`
|
- `cleonos_sys_getpid()` / `cleonos_sys_spawn_path()` / `cleonos_sys_wait_pid()`
|
||||||
|
- `cleonos_sys_wm_count()` / `cleonos_sys_wm_id_at()` / `cleonos_sys_wm_snapshot()`
|
||||||
- `cleonos_sys_spawn_pathv()`
|
- `cleonos_sys_spawn_pathv()`
|
||||||
- `cleonos_sys_exit()` / `cleonos_sys_sleep_ticks()` / `cleonos_sys_yield()` / `cleonos_sys_shutdown()` / `cleonos_sys_restart()`
|
- `cleonos_sys_exit()` / `cleonos_sys_sleep_ticks()` / `cleonos_sys_yield()` / `cleonos_sys_shutdown()` / `cleonos_sys_restart()`
|
||||||
- `cleonos_sys_audio_available()` / `cleonos_sys_audio_play_tone()` / `cleonos_sys_audio_stop()`
|
- `cleonos_sys_audio_available()` / `cleonos_sys_audio_play_tone()` / `cleonos_sys_audio_stop()`
|
||||||
|
|||||||
2
kit
2
kit
Submodule kit updated: 3f29819598...ebd6793b42
@@ -528,6 +528,7 @@ def apply_preset(preset: str, clks_options: List[OptionItem], user_options: List
|
|||||||
_set_all_options(values, user_options, TRI_Y)
|
_set_all_options(values, user_options, TRI_Y)
|
||||||
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_USERLAND_AUTO_EXEC", TRI_N)
|
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_USERLAND_AUTO_EXEC", TRI_N)
|
||||||
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_EXEC_SERIAL_LOG", TRI_Y)
|
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_EXEC_SERIAL_LOG", TRI_Y)
|
||||||
|
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_EXEC_CONTEXT_SWITCH_LOG", TRI_N)
|
||||||
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_PROCFS", TRI_Y)
|
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_PROCFS", TRI_Y)
|
||||||
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_IDLE_DEBUG_LOG", TRI_Y)
|
_set_option_if_exists(values, option_index, "CLEONOS_CLKS_ENABLE_IDLE_DEBUG_LOG", TRI_Y)
|
||||||
return
|
return
|
||||||
@@ -540,6 +541,12 @@ def apply_preset(preset: str, clks_options: List[OptionItem], user_options: List
|
|||||||
"CLEONOS_CLKS_ENABLE_AUDIO",
|
"CLEONOS_CLKS_ENABLE_AUDIO",
|
||||||
"CLEONOS_CLKS_ENABLE_MOUSE",
|
"CLEONOS_CLKS_ENABLE_MOUSE",
|
||||||
"CLEONOS_CLKS_ENABLE_DESKTOP",
|
"CLEONOS_CLKS_ENABLE_DESKTOP",
|
||||||
|
"CLEONOS_CLKS_ENABLE_WM_MULTI_RECT_DAMAGE",
|
||||||
|
"CLEONOS_CLKS_ENABLE_WM_LAYER_CACHE",
|
||||||
|
"CLEONOS_CLKS_ENABLE_WM_FRAME_PACING",
|
||||||
|
"CLEONOS_CLKS_ENABLE_WM_STATS_OVERLAY",
|
||||||
|
"CLEONOS_CLKS_ENABLE_WM_INPUT_DISPATCH",
|
||||||
|
"CLEONOS_CLKS_ENABLE_WM_REAP_DEAD_OWNERS",
|
||||||
"CLEONOS_CLKS_ENABLE_DRIVER_MANAGER",
|
"CLEONOS_CLKS_ENABLE_DRIVER_MANAGER",
|
||||||
"CLEONOS_CLKS_ENABLE_KELF",
|
"CLEONOS_CLKS_ENABLE_KELF",
|
||||||
"CLEONOS_CLKS_ENABLE_EXTERNAL_PSF",
|
"CLEONOS_CLKS_ENABLE_EXTERNAL_PSF",
|
||||||
@@ -554,6 +561,7 @@ def apply_preset(preset: str, clks_options: List[OptionItem], user_options: List
|
|||||||
"CLEONOS_CLKS_ENABLE_SYSCALL_TICK_QUERY",
|
"CLEONOS_CLKS_ENABLE_SYSCALL_TICK_QUERY",
|
||||||
"CLEONOS_CLKS_ENABLE_TTY_READY_LOG",
|
"CLEONOS_CLKS_ENABLE_TTY_READY_LOG",
|
||||||
"CLEONOS_CLKS_ENABLE_IDLE_DEBUG_LOG",
|
"CLEONOS_CLKS_ENABLE_IDLE_DEBUG_LOG",
|
||||||
|
"CLEONOS_CLKS_ENABLE_EXEC_CONTEXT_SWITCH_LOG",
|
||||||
"CLEONOS_CLKS_ENABLE_USER_SYSTEM_APP_PROBE",
|
"CLEONOS_CLKS_ENABLE_USER_SYSTEM_APP_PROBE",
|
||||||
"CLEONOS_CLKS_ENABLE_SCHED_TASK_COUNT_LOG",
|
"CLEONOS_CLKS_ENABLE_SCHED_TASK_COUNT_LOG",
|
||||||
]
|
]
|
||||||
|
|||||||
2
wine
2
wine
Submodule wine updated: fe46a157c2...86d4c8d793
Reference in New Issue
Block a user