From 6d14f374a8734561b2509736a97ce36c20d4071e Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 10 May 2020 01:44:40 +0000 Subject: [PATCH] SysMon: show all tmp disks, reparate general tab into two, precise calculation of rd disk empty space git-svn-id: svn://kolibrios.org@7906 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/icons16.png | Bin 7893 -> 8278 bytes programs/cmm/lib/gui/sensor.h | 18 +- programs/cmm/lib/gui/tabs.h | 11 +- programs/cmm/lib/patterns/libimg_load_skin.h | 11 ++ programs/cmm/sysmon/cpu_ram.h | 96 +++++++++ programs/cmm/sysmon/general.h | 186 ------------------ programs/cmm/sysmon/process.h | 22 +-- programs/cmm/sysmon/sysmon.c | 116 ++++++----- .../libraries/box_lib/trunk/editbox.asm | 3 + 9 files changed, 203 insertions(+), 260 deletions(-) create mode 100644 programs/cmm/sysmon/cpu_ram.h delete mode 100644 programs/cmm/sysmon/general.h diff --git a/data/common/icons16.png b/data/common/icons16.png index 171fdf9aaa1c8904d82b1ff3d6a22a6cb913416a..5079521e4582f20a91e20a2f91d21fea760bfa20 100644 GIT binary patch literal 8278 zcmV-cAgSMpP)1^@s6B9-k6001BzNklUBmMiY(WE*gvqZisu_ zw;*n4T+k>QL}ZgqP!teE6jUT2h=_wD|3>Z&?@ zn(jUlxcN`Q{~cWLkVcjPn7QiwD!6s?jI6>#Z(4>>05w*G-jOp=hKQsD5JS!7EtZ85 zGl&c@D^V0hEr5ibwCcCuycAQDFK*>09wB+KT{b3Zk+Tnl?HJA z+#(rJmhNRL4d6fJ>{A0iv;Br4Psew?|{c1b7S$rE&>?#@wPZ z*czQ{3Xw$S=+q(zB>*#sBr+#v)dI{QlE};hj35*+U{RvnXbi*vTSK!H`!KJiHc$g> zH)6vAsN0Bd2TOp|T!$=7=OfYuu)~OlR4sLtGyn|GYf&i8D3T#SuV1KT*aj{S=Y9je zG}Mu!ndShe)2S=Jd7Fh04Zz`WQ1O7JD|SI{Zmupw1E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m/lib/gui/sensor.h @@ -24,22 +24,18 @@ :void sensor::draw_wrapper() { DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph); - DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work_dark, sc.work_light); + DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work, sc.work_light); } -:void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure) +:void sensor::draw_progress(dword progress_w) { - if (progress_w < MIN_PB_BLOCK_W) progress_w = MIN_PB_BLOCK_W; - if (progress_w > w-MIN_PB_BLOCK_W) progress_w = w-MIN_PB_BLOCK_W; - + char textp[16]; DrawBar(x, y, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200)); DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE); DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, sc.work_graph, 200)); - - sprintf(#param, "%i%s", active_value, mesure); - WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param); - DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG); - sprintf(#param, "%i%s", bg_value, mesure); - WriteText(-progress_w - calc(strlen(#param)*8)/2 + w+x, h/2-7+y, 0x90, PROGRESS_BG_TEXT, #param); + + strcpy(#textp, itoa(w-progress_w*100/w)); + chrcat(#textp, '%'); + WriteText(-strlen(#textp)*8 + w / 2 + x, h/2-7+y, 0x90, 0x000000, #textp); } \ No newline at end of file diff --git a/programs/cmm/lib/gui/tabs.h b/programs/cmm/lib/gui/tabs.h index cafc751cb1..281f1f98a8 100644 --- a/programs/cmm/lib/gui/tabs.h +++ b/programs/cmm/lib/gui/tabs.h @@ -1,12 +1,14 @@ - +#ifndef TAB_PADDING #define TAB_PADDING 15 +#endif + #define TAB_HEIGHT 28 :struct _tabs { int active_tab; int x,y,w,h; - void draw_button(); + dword draw_button(); int click(); void draw_wrapper(); }; @@ -14,10 +16,10 @@ :void _tabs::draw_wrapper() { DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, sc.work_graph); - DrawRectangle(x+1,y+1+TAB_HEIGHT,w-3,h-2-TAB_HEIGHT, sc.work_light); + DrawBar(x+1,y+1+TAB_HEIGHT,w-3,1, sc.work_light); } -:void _tabs::draw_button(dword xx, but_id, text) +:dword _tabs::draw_button(dword xx, but_id, text) { dword col_bg, col_text; dword ww=strlen(text)*8, hh=TAB_HEIGHT; @@ -36,6 +38,7 @@ WriteText(xx, y+6, 0x90, col_text, text); DrawBar(xx, y+hh-3, ww, 3, col_bg); //DrawStandartCaptButton(xx, y, but_id, text); //GetFreeButtonId() + return xx; } :int _tabs::click(int N) diff --git a/programs/cmm/lib/patterns/libimg_load_skin.h b/programs/cmm/lib/patterns/libimg_load_skin.h index a9f1d0e972..ce85dd9c2b 100644 --- a/programs/cmm/lib/patterns/libimg_load_skin.h +++ b/programs/cmm/lib/patterns/libimg_load_skin.h @@ -43,4 +43,15 @@ if (icon_n>=0) img_draw stdcall(icons32draw.image, x, y, 32, 32, 0, icon_n*32); } +:libimg_image icons16draw; +:void DrawIcon16(dword x,y, bg, icon_n) { + //load_dll(libimg, #libimg_init,1); + if (!icons16draw.image) { + Libimg_LoadImage(#icons16draw, "/sys/icons16.png"); + Libimg_ReplaceColor(icons16draw.image, icons16draw.w, icons16draw.h, 0xffFFFfff, bg); + Libimg_ReplaceColor(icons16draw.image, icons16draw.w, icons16draw.h, 0xffCACBD6, MixColors(bg, 0, 220)); + } + if (icon_n>=0) img_draw stdcall(icons16draw.image, x, y, 16, 16, 0, icon_n*16); +} + #endif \ No newline at end of file diff --git a/programs/cmm/sysmon/cpu_ram.h b/programs/cmm/sysmon/cpu_ram.h new file mode 100644 index 0000000000..614041eda0 --- /dev/null +++ b/programs/cmm/sysmon/cpu_ram.h @@ -0,0 +1,96 @@ +//===================================================// +// // +// DATA // +// // +//===================================================// + +sensor cpu; +sensor ram; + +//===================================================// +// // +// CODE // +// // +//===================================================// + +void DrawIconWithText(dword _x, _y, _icon, _title) +{ + DrawIcon16(_x, _y, sc.work, _icon); + DrawBar(_x+ICONGAP, _y, WIN_CONTENT_W - ICONGAP - _x, 20, sc.work); + WriteText(_x+ICONGAP, _y, 0x90, sc.work_text, _title); +} + +void CPUnRAM__Main() +{ + dword cpu_frequency = GetCpuFrequency()/1000; + SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON); + goto _GENERAL_REDRAW_2; + loop() + { + WaitEventTimeout(25); + switch(EAX & 0xFF) + { + case evButton: Sysmon__ButtonEvent(); break; + case evKey: Sysmon__KeyEvent(); break; + case evReDraw: + _GENERAL_REDRAW_2: + Sysmon__DefineAndDrawWindow(); + cpu.set_size(WIN_PAD, WIN_CONTENT_Y+25, WIN_CONTENT_W, 100); + ram.set_size(WIN_PAD, WIN_CONTENT_Y+170, WIN_CONTENT_W, 23); + default: + MonitorCpu(); + MonitorRam(); + } + } +} + +dword GetCpuLoad(dword max_h) +{ + dword idle; + dword CPU_SEC = GetCpuFrequency() >> 20 + 1; + dword IDLE_SEC = GetCpuIdleCount() >> 20 * max_h; + + EAX = IDLE_SEC; + EBX = CPU_SEC; + $cdq + $div ebx + idle = EAX; + + return max_h - idle; +} + +int pos=0; +void MonitorCpu() +{ + static dword cpu_stack[1980*3]; + int i; + if (!cpu.w) return; + + cpu_stack[pos] = GetCpuLoad(cpu.h); + if (cpu_stack[pos]<=2) || (cpu_stack[pos]>cpu.h) cpu_stack[pos]=2; + + sprintf(#param, "CPU load %i%%", cpu_stack[pos]); + DrawIconWithText(WIN_PAD, cpu.y - 25, 48, #param); + + for (i=0; i=WIN_CONTENT_W) { + pos = WIN_CONTENT_W-1; + for (i=0; i> 20 + 1; - dword IDLE_SEC = GetCpuIdleCount() >> 20 * max_h; - - EAX = IDLE_SEC; - EBX = CPU_SEC; - $cdq - $div ebx - idle = EAX; - - return max_h - idle; -} - -dword GetDiskSize(dword disk_n) -{ - BDVK bdvk; - char tmp_path[8]; - strcpy(#tmp_path, "/tmp0/1"); - tmp_path[4] = disk_n + '0'; - GetFileInfo(#tmp_path, #bdvk); - return bdvk.sizelo; -} -void GetTmpDiskSizes() -{ - char i; - for (i=0; i<=9; i++) - { - tmp_size[i] = GetDiskSize(i) / 1024 / 1024; - } -} - -//===================================================// -// // -// MONITORS // -// // -//===================================================// - -int pos=0; -void MonitorCpu() -{ - int i; - if (!cpu.w) return; - - cpu_stack[pos] = GetCpuLoad(cpu.h); - if (cpu_stack[pos]<=2) || (cpu_stack[pos]>cpu.h) cpu_stack[pos]=2; - - DrawBar(cpu.x+cpu.w-30, cpu.y-25, 30, 20, sc.work); - sprintf(#param, "%i%%", cpu_stack[pos]); - WriteText(cpu.x+cpu.w-calc(strlen(#param)*8), cpu.y-25, 0x90, sc.work_text, #param); - - for (i=0; i=WIN_CONTENT_W) { - pos = WIN_CONTENT_W-1; - for (i=0; i2) return false; + //if (Form.width < 300) { MoveSize(OLD,OLD,300,OLD); break; } + //if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); break; } + tabs.draw_wrapper(); + butx = tabs.draw_button(tabs.x+TAB_PADDING, TAB_GENERAL, T_CPU_AND_RAM); + butx = tabs.draw_button(strlen(T_CPU_AND_RAM)*8+TAB_PADDING+butx, TAB_DRIVES, T_DRIVES); + tabs.draw_button(strlen(T_DRIVES)*8+TAB_PADDING+butx, TAB_PROCESSES, T_PROCESSES); + return true; +} + +int Sysmon__ButtonEvent() +{ + int bid = GetButtonID(); + if (1==bid) ExitProcess(); + if (TAB_GENERAL==bid) { + tabs.active_tab = TAB_GENERAL; + CPUnRAM__Main(); + } + if (TAB_PROCESSES==bid) { + tabs.active_tab = TAB_PROCESSES; + Processes__Main(); + } + if (TAB_DRIVES==bid) { + tabs.active_tab = TAB_DRIVES; + Drives__Main(); + } + return bid; +} + +void Sysmon__KeyEvent() +{ + GetKeys(); + if (key_scancode == SCAN_CODE_ESC) ExitProcess(); +} + +#include "cpu_ram.h" +#include "drives.h" +#include "process.h" void main() { @@ -56,42 +117,5 @@ void main() load_dll(libimg, #libimg_init,1); load_dll(libini, #lib_init,1); load_dll(boxlib, #box_lib_init,0); - General__Main(); -} - -int Sysmon__DefineAndDrawWindow() -{ - sc.get(); - DefineAndDrawWindow(screen.width - WIN_CONTENT_H - 200, 100, WIN_CONTENT_W + WIN_PAD + WIN_PAD +9, - WIN_CONTENT_H + TAB_HEIGHT + skin_height + 4, 0x34, sc.work, "System Monitor",0); - GetProcessInfo(#Form, SelfInfo); - if (Form.status_window>2) return false; - //if (Form.width < 300) { MoveSize(OLD,OLD,300,OLD); break; } - //if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); break; } - tabs.draw_wrapper(); - tabs.draw_button(tabs.x+TAB_PADDING, TAB_GENERAL, T_GENERAL); - tabs.draw_button(strlen(T_GENERAL)*8+tabs.x+TAB_PADDING+TAB_PADDING, TAB_PROCESSES, T_PROCESSES); - return true; -} - -//===================================================// -// // -// EVENTS // -// // -//===================================================// - -void Sysmon__ButtonEvent(dword id) -{ - if (1==id) ExitProcess(); - if (TAB_GENERAL==id) { - tabs.active_tab = TAB_GENERAL; - General__Main(); - } - if (TAB_PROCESSES==id) { - tabs.active_tab = TAB_PROCESSES; - Processes__Main(); - } -} - - -stop: \ No newline at end of file + CPUnRAM__Main(); +} \ No newline at end of file diff --git a/programs/develop/libraries/box_lib/trunk/editbox.asm b/programs/develop/libraries/box_lib/trunk/editbox.asm index a130c8ac25..40ebf2b850 100644 --- a/programs/develop/libraries/box_lib/trunk/editbox.asm +++ b/programs/develop/libraries/box_lib/trunk/editbox.asm @@ -82,7 +82,10 @@ edit_box: mov ed_height,eax call .draw_border .draw_bg_cursor_text: + ;test word ed_flags,ed_focus ; for unfocused controls => + ;jz .sjip_offset ; do not recalculate offset (big OS behaviour) call .check_offset +;.sjip_offset: call .draw_bg test word ed_flags,ed_focus ; for unfocused controls => jz .draw_cursor_text ; do not draw selection(named shift)