mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-29 00:36:32 +00:00
1b75d91002
Add arg to SATARep to specify drive types to show. Add checks in AHCIPortInit to verify port signatures, add helper method to get signatures from port.
219 lines
27 KiB
HTML
Executable file
219 lines
27 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V0.13">
|
|
<style type="text/css">
|
|
body {background-color:#fef1f0;}
|
|
.cF0{color:#000000;background-color:#fef1f0;}
|
|
.cF1{color:#0148a4;background-color:#fef1f0;}
|
|
.cF2{color:#3b7901;background-color:#fef1f0;}
|
|
.cF3{color:#057c7e;background-color:#fef1f0;}
|
|
.cF4{color:#bb2020;background-color:#fef1f0;}
|
|
.cF5{color:#9e42ae;background-color:#fef1f0;}
|
|
.cF6{color:#b57901;background-color:#fef1f0;}
|
|
.cF7{color:#b2b6af;background-color:#fef1f0;}
|
|
.cF8{color:#555753;background-color:#fef1f0;}
|
|
.cF9{color:#678fbb;background-color:#fef1f0;}
|
|
.cFA{color:#82bc49;background-color:#fef1f0;}
|
|
.cFB{color:#0097a2;background-color:#fef1f0;}
|
|
.cFC{color:#e26a6a;background-color:#fef1f0;}
|
|
.cFD{color:#c671bc;background-color:#fef1f0;}
|
|
.cFE{color:#c7ab00;background-color:#fef1f0;}
|
|
.cFF{color:#fef1f0;background-color:#fef1f0;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Windows"</span><span class=cF0>
|
|
<a name="l2"></a>
|
|
<a name="l3"></a></span><span class=cF1>class</span><span class=cF0> </span><span class=cF9>CWallPaperGlobals</span><span class=cF0>
|
|
<a name="l4"></a>{
|
|
<a name="l5"></a> </span><span class=cF9>I64</span><span class=cF0> last_calc_idle_count, last_swap_counter[</span><span class=cF3>MP_PROCESSORS_NUM</span><span class=cF0>];
|
|
<a name="l6"></a> </span><span class=cF1>F64</span><span class=cF0> last_calc_idle_delta_time;
|
|
<a name="l7"></a> </span><span class=cF1>U8</span><span class=cF0> top_line[</span><span class=cF3>STR_LEN</span><span class=cF0>];
|
|
<a name="l8"></a>} *</span><span class=cFB>wall</span><span class=cF0> = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CWallPaperGlobals</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l9"></a></span><span class=cFB>wall</span><span class=cF0>->last_calc_idle_delta_time = </span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l10"></a>
|
|
<a name="l11"></a></span><span class=cF1>class</span><span class=cF0> </span><span class=cF9>CTaskWallPaperData</span><span class=cF0>
|
|
<a name="l12"></a>{
|
|
<a name="l13"></a> </span><span class=cF9>I64</span><span class=cF0> alloced_u8s, used_u8s;
|
|
<a name="l14"></a> </span><span class=cF1>U8</span><span class=cF0> caller_stack[</span><span class=cF3>STR_LEN</span><span class=cF0> - $];
|
|
<a name="l15"></a>};
|
|
<a name="l16"></a>
|
|
<a name="l17"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WallPaper</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *_task)
|
|
<a name="l18"></a>{
|
|
<a name="l19"></a> </span><span class=cF9>I64</span><span class=cF0> i, j, l = </span><span class=cF3>TEXT_ROWS</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l20"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
|
|
<a name="l21"></a> </span><span class=cF9>CTaskWallPaperData</span><span class=cF0> *wpd;
|
|
<a name="l22"></a> </span><span class=cF9>CHashTable</span><span class=cF0> *old_hash = </span><span class=cF5>Fs</span><span class=cF0>->hash_table;
|
|
<a name="l23"></a> </span><span class=cF9>CCPU</span><span class=cF0> *c;
|
|
<a name="l24"></a> </span><span class=cF9>CDateStruct</span><span class=cF0> ds;
|
|
<a name="l25"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l26"></a>
|
|
<a name="l27"></a> _task->text_attr = </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>;
|
|
<a name="l28"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_data_bp</span><span class=cF0>)
|
|
<a name="l29"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l30"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>YELLOW</span><span class=cF0>,
|
|
<a name="l31"></a> </span><span class=cF6>"%010X/%010X %010X/%010X%12td%12td%12td"</span><span class=cF0>,
|
|
<a name="l32"></a> </span><span class=cFB>sys_data_bp</span><span class=cF0>->used_u8s, </span><span class=cFB>sys_data_bp</span><span class=cF0>->alloced_u8s,
|
|
<a name="l33"></a> </span><span class=cFB>sys_code_bp</span><span class=cF0>->used_u8s, </span><span class=cFB>sys_code_bp</span><span class=cF0>->alloced_u8s,
|
|
<a name="l34"></a> </span><span class=cFB>cmp</span><span class=cF0>.compiled_lines, </span><span class=cFB>blkdev</span><span class=cF0>.read_count, </span><span class=cFB>blkdev</span><span class=cF0>.write_count);
|
|
<a name="l35"></a>
|
|
<a name="l36"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>,
|
|
<a name="l37"></a> </span><span class=cF6>"______Data_Heap______ ______Code_Heap______ "</span><span class=cF0>
|
|
<a name="l38"></a> </span><span class=cF6>"___Lines___ ___Reads___ __Writes___"</span><span class=cF0>);
|
|
<a name="l39"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l40"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l41"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l42"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>,
|
|
<a name="l43"></a> </span><span class=cF6>"%010X/%010X%12td%12td%12td"</span><span class=cF0>,
|
|
<a name="l44"></a> </span><span class=cFB>sys_code_bp</span><span class=cF0>->used_u8s, </span><span class=cFB>sys_code_bp</span><span class=cF0>->alloced_u8s,
|
|
<a name="l45"></a> </span><span class=cFB>cmp</span><span class=cF0>.compiled_lines, </span><span class=cFB>blkdev</span><span class=cF0>.read_count, </span><span class=cFB>blkdev</span><span class=cF0>.write_count);
|
|
<a name="l46"></a>
|
|
<a name="l47"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>,
|
|
<a name="l48"></a> </span><span class=cF6>"____CodeData_Heap____ "</span><span class=cF0>
|
|
<a name="l49"></a> </span><span class=cF6>"___Lines___ ___Reads___ ___Writes__"</span><span class=cF0>);
|
|
<a name="l50"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l51"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>, </span><span class=cF6>"ProgressBars:%016X %016X %016X %016X"</span><span class=cF0>,
|
|
<a name="l52"></a> </span><span class=cFB>progress1</span><span class=cF0>, </span><span class=cFB>progress2</span><span class=cF0>, </span><span class=cFB>progress3</span><span class=cF0>, </span><span class=cFB>progress4</span><span class=cF0>);
|
|
<a name="l53"></a>
|
|
<a name="l54"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cFB>mp_count</span><span class=cF0>; i++)
|
|
<a name="l55"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l56"></a> c = &</span><span class=cFB>cpu_structs</span><span class=cF0>[i];
|
|
<a name="l57"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>winmgr</span><span class=cF0>.t->calc_idle_count != </span><span class=cFB>wall</span><span class=cF0>->last_calc_idle_count)
|
|
<a name="l58"></a> {
|
|
<a name="l59"></a> </span><span class=cFB>wall</span><span class=cF0>->last_calc_idle_delta_time = </span><span class=cFB>winmgr</span><span class=cF0>.t->calc_idle_delta_time;
|
|
<a name="l60"></a> </span><span class=cFB>wall</span><span class=cF0>->last_swap_counter[i] = </span><span class=cFB>winmgr</span><span class=cF0>.t->last_swap_counter[i];
|
|
<a name="l61"></a> </span><span class=cFB>winmgr</span><span class=cF0>.t->last_swap_counter[i] = c->swap_counter;
|
|
<a name="l62"></a> }
|
|
<a name="l63"></a>
|
|
<a name="l64"></a> task = c->executive_task;
|
|
<a name="l65"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l66"></a> {
|
|
<a name="l67"></a> wpd = &task->wallpaper_data;
|
|
<a name="l68"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l69"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l70"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cFB>winmgr</span><span class=cF0>.updates & </span><span class=cFE>31</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l71"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l72"></a> </span><span class=cF1>if</span><span class=cF0> (c == </span><span class=cF5>Gs</span><span class=cF0>)
|
|
<a name="l73"></a> </span><span class=cF5>Fs</span><span class=cF0>->hash_table = task->hash_table;
|
|
<a name="l74"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF2>//precaution</span><span class=cF0>
|
|
<a name="l75"></a> </span><span class=cF5>Fs</span><span class=cF0>->hash_table = old_hash;
|
|
<a name="l76"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(wpd->caller_stack, </span><span class=cF6>" %-18tp %-18tp %-18tp %-18tp"</span><span class=cF0>,
|
|
<a name="l77"></a> </span><span class=cF5>TaskCaller</span><span class=cF7>(</span><span class=cF0>task, </span><span class=cFE>0</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF5>TaskCaller</span><span class=cF7>(</span><span class=cF0>task, </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0>,
|
|
<a name="l78"></a> </span><span class=cF5>TaskCaller</span><span class=cF7>(</span><span class=cF0>task, </span><span class=cFE>2</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF5>TaskCaller</span><span class=cF7>(</span><span class=cF0>task, </span><span class=cFE>3</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l79"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l80"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>YELLOW</span><span class=cF0>, wpd->caller_stack);
|
|
<a name="l81"></a> j = </span><span class=cF5>UnusedStack</span><span class=cF0>(task);
|
|
<a name="l82"></a> </span><span class=cF1>if</span><span class=cF0> (j < </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l83"></a> </span><span class=cF5>Panic</span><span class=cF0>(</span><span class=cF6>"Stack Overflow"</span><span class=cF0>, task);
|
|
<a name="l84"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cFB>winmgr</span><span class=cF0>.updates & </span><span class=cFE>31</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l85"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l86"></a> wpd->alloced_u8s = </span><span class=cF5>TaskMemAlloced</span><span class=cF0>(task);
|
|
<a name="l87"></a> wpd->used_u8s = </span><span class=cF5>TaskMemUsed</span><span class=cF0>(task);
|
|
<a name="l88"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l89"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>BLACK</span><span class=cF0>,
|
|
<a name="l90"></a> </span><span class=cF6>" %-18ts #%08X %010X %010X/%010X %04X:%02tX:%08X"</span><span class=cF0>,
|
|
<a name="l91"></a> task->task_title, task, j, wpd->used_u8s, wpd->alloced_u8s,
|
|
<a name="l92"></a> task->task_flags, task->display_flags, task->win_inhibit);
|
|
<a name="l93"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l94"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l95"></a> task = task->next_task;
|
|
<a name="l96"></a> }
|
|
<a name="l97"></a> </span><span class=cF1>while</span><span class=cF0> (task != c->executive_task);
|
|
<a name="l98"></a>
|
|
<a name="l99"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>, </span><span class=cF6>"CPU%02X %2tf%% ContextSwaps/s:%9,d"</span><span class=cF0>, i,
|
|
<a name="l100"></a> </span><span class=cFE>100</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> * </span><span class=cF7>(</span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> - c->idle_factor</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF5>ToI64</span><span class=cF7>(</span><span class=cF0>(</span><span class=cFB>winmgr</span><span class=cF0>.t->last_swap_counter[i]
|
|
<a name="l101"></a> - </span><span class=cFB>wall</span><span class=cF0>->last_swap_counter[i]) / </span><span class=cFB>wall</span><span class=cF0>->last_calc_idle_delta_time</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l102"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l103"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, l--, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>,
|
|
<a name="l104"></a> </span><span class=cF6>" ___Description____ #__Task__ UnusedStack_ _UsedMem__/_AllocMem_ "</span><span class=cF0>
|
|
<a name="l105"></a> </span><span class=cF6>"______Flags_____"</span><span class=cF0>);
|
|
<a name="l106"></a>
|
|
<a name="l107"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cFB>winmgr</span><span class=cF0>.updates & </span><span class=cFE>31</span><span class=cF7>)</span><span class=cF0> || !*</span><span class=cFB>wall</span><span class=cF0>->top_line)
|
|
<a name="l108"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l109"></a> </span><span class=cF5>Date2Struct</span><span class=cF0>(&ds, </span><span class=cF5>Now</span><span class=cF0>);
|
|
<a name="l110"></a> i = </span><span class=cFB>sys_code_bp</span><span class=cF0>->alloced_u8s - </span><span class=cFB>sys_code_bp</span><span class=cF0>->used_u8s;
|
|
<a name="l111"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_data_bp</span><span class=cF0>)
|
|
<a name="l112"></a> i += </span><span class=cFB>sys_data_bp</span><span class=cF0>->alloced_u8s - </span><span class=cFB>sys_data_bp</span><span class=cF0>->used_u8s;
|
|
<a name="l113"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(</span><span class=cFB>wall</span><span class=cF0>->top_line,
|
|
<a name="l114"></a> </span><span class=cF6>"%3tZ %02d/%02d/%02d %02d:%02d:%02d FPS:%2tf Mem:%010X CPU"</span><span class=cF0>,
|
|
<a name="l115"></a> ds.day_of_week, </span><span class=cF6>"ST_DAYS_OF_WEEK"</span><span class=cF0>, ds.mon, ds.day_of_mon, ds.year % </span><span class=cFE>100</span><span class=cF0>,
|
|
<a name="l116"></a> ds.hour, ds.min, ds.sec, </span><span class=cFB>winmgr</span><span class=cF0>.fps, i);
|
|
<a name="l117"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l118"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>, </span><span class=cFB>wall</span><span class=cF0>->top_line);
|
|
<a name="l119"></a>
|
|
<a name="l120"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>screencast</span><span class=cF0>.record)
|
|
<a name="l121"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>44</span><span class=cF0> -</span><span class=cFE>4</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>RED</span><span class=cF0>, </span><span class=cF6>"*"</span><span class=cF0>);
|
|
<a name="l122"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cFB>mp_count</span><span class=cF0>; i++)
|
|
<a name="l123"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l124"></a> c = &</span><span class=cFB>cpu_structs</span><span class=cF0>[i];
|
|
<a name="l125"></a> </span><span class=cF1>if</span><span class=cF0> (i & </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l126"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>47</span><span class=cF0> + i * </span><span class=cFE>2</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>, </span><span class=cF6>"%2tf"</span><span class=cF0>, </span><span class=cFE>100</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> * </span><span class=cF7>(</span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> - c->idle_factor</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l127"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l128"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cFE>47</span><span class=cF0> + i * </span><span class=cFE>2</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>YELLOW</span><span class=cF0>, </span><span class=cF6>"%2tf"</span><span class=cF0>, </span><span class=cFE>100</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> * </span><span class=cF7>(</span><span class=cFE>1</span><span class=cF0>.</span><span class=cFE>0</span><span class=cF0> - c->idle_factor</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l129"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l130"></a>
|
|
<a name="l131"></a> st = </span><span class=cF5>ScanCode2KeyName</span><span class=cF0>(</span><span class=cFB>kbd</span><span class=cF0>.last_down_scan_code);
|
|
<a name="l132"></a> </span><span class=cF5>TextPrint</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>, </span><span class=cF3>TEXT_COLS</span><span class=cF0> - </span><span class=cFE>25</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>DKGRAY</span><span class=cF0> << </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>YELLOW</span><span class=cF0>, </span><span class=cF6>"%25ts"</span><span class=cF0>, st);
|
|
<a name="l133"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l134"></a>
|
|
<a name="l135"></a> </span><span class=cF5>Fs</span><span class=cF0>->hash_table = old_hash;
|
|
<a name="l136"></a> </span><span class=cFB>wall</span><span class=cF0>->last_calc_idle_count = </span><span class=cFB>winmgr</span><span class=cF0>.t->calc_idle_count;
|
|
<a name="l137"></a>}
|
|
<a name="l138"></a></span><span class=cFA>
|
|
<a name="l139"></a><1>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l140"></a>
|
|
<a name="l141"></a>
|
|
<a name="l142"></a>
|
|
<a name="l143"></a></span><span class=cFA>
|
|
<a name="l144"></a><2>/* Graphics Not Rendered in HTML */</span><span class=cF0>
|
|
<a name="l145"></a>
|
|
<a name="l146"></a>
|
|
<a name="l147"></a>
|
|
<a name="l148"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DrawTermBttn</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc, </span><span class=cF9>CCtrl</span><span class=cF0> *c)
|
|
<a name="l149"></a>{
|
|
<a name="l150"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Blink</span><span class=cF0>)
|
|
<a name="l151"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, c->left, c->top, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA><1></span><span class=cF0>);
|
|
<a name="l152"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l153"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, c->left, c->top, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA><2></span><span class=cF0>);
|
|
<a name="l154"></a>}
|
|
<a name="l155"></a>
|
|
<a name="l156"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LeftClickTermBttn</span><span class=cF0>(</span><span class=cF9>CCtrl</span><span class=cF0> *, </span><span class=cF9>I64</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0>, </span><span class=cF1>Bool</span><span class=cF0> down)
|
|
<a name="l157"></a>{
|
|
<a name="l158"></a> </span><span class=cF1>if</span><span class=cF0> (down)
|
|
<a name="l159"></a> </span><span class=cF5>User</span><span class=cF0>;
|
|
<a name="l160"></a>}
|
|
<a name="l161"></a>
|
|
<a name="l162"></a></span><span class=cF9>CCtrl</span><span class=cF0> *</span><span class=cF5>TermBttnNew</span><span class=cF0>()
|
|
<a name="l163"></a>{
|
|
<a name="l164"></a> </span><span class=cF9>I64</span><span class=cF0> min_x, max_x, min_y, max_y;
|
|
<a name="l165"></a> </span><span class=cF9>CCtrl</span><span class=cF0> *c = </span><span class=cF5>SysCAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CCtrl</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l166"></a>
|
|
<a name="l167"></a> c->win_task = </span><span class=cFB>sys_winmgr_task</span><span class=cF0>;
|
|
<a name="l168"></a> c->flags = </span><span class=cF3>CTRLF_SHOW</span><span class=cF0>;
|
|
<a name="l169"></a> c->type = </span><span class=cF3>CTRLT_GENERIC</span><span class=cF0>;
|
|
<a name="l170"></a> c->draw_it = &</span><span class=cF5>DrawTermBttn</span><span class=cF0>;
|
|
<a name="l171"></a> c->left_click = &</span><span class=cF5>LeftClickTermBttn</span><span class=cF0>;
|
|
<a name="l172"></a>
|
|
<a name="l173"></a> </span><span class=cF5>SpriteExtents</span><span class=cF0>(</span><span class=cFA><1></span><span class=cF0>, &min_x, &max_x, &min_y, &max_y);
|
|
<a name="l174"></a></span><span class=cF2>//min must be zero</span><span class=cF0>
|
|
<a name="l175"></a> c->left = </span><span class=cFB>sys_winmgr_task</span><span class=cF0>->pix_width - (max_x - min_x + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l176"></a> c->right = c->left + (max_x - min_x + </span><span class=cFE>1</span><span class=cF0>) - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l177"></a> c->top = </span><span class=cFB>sys_winmgr_task</span><span class=cF0>->pix_height - (max_y - min_y + </span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l178"></a> c->bottom = c->top + (max_y - min_y + </span><span class=cFE>1</span><span class=cF0>) - </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l179"></a>
|
|
<a name="l180"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(c, </span><span class=cFB>sys_winmgr_task</span><span class=cF0>->last_ctrl);
|
|
<a name="l181"></a> </span><span class=cF5>TaskDerivedValsUpdate</span><span class=cF0>(</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
|
|
<a name="l182"></a>
|
|
<a name="l183"></a> </span><span class=cF1>return</span><span class=cF0> c;
|
|
<a name="l184"></a>}
|
|
<a name="l185"></a>
|
|
<a name="l186"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WallPaperInit</span><span class=cF0>()
|
|
<a name="l187"></a>{
|
|
<a name="l188"></a> </span><span class=cF5>TermBttnNew</span><span class=cF0>;
|
|
<a name="l189"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_wall_paper = &</span><span class=cF5>WallPaper</span><span class=cF0>;
|
|
<a name="l190"></a>}
|
|
</span></pre></body>
|
|
</html>
|