ZealOS/docs/System/WallPaper.CC.html
2021-09-21 23:45:45 -04:00

218 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 V1.01">
<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>&quot;Windows&quot;</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>-&gt;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>-&gt;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-&gt;text_attr = </span><span class=cF3>DKGRAY</span><span class=cF0> &lt;&lt; </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> &lt;&lt; </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>&quot;%010X/%010X %010X/%010X%12td%12td%12td&quot;</span><span class=cF0>,
<a name="l32"></a> </span><span class=cFB>sys_data_bp</span><span class=cF0>-&gt;used_u8s, </span><span class=cFB>sys_data_bp</span><span class=cF0>-&gt;alloced_u8s,
<a name="l33"></a> </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;used_u8s, </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;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> &lt;&lt; </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>&quot;______Data_Heap______ ______Code_Heap______ &quot;</span><span class=cF0>
<a name="l38"></a> </span><span class=cF6>&quot;___Lines___ ___Reads___ __Writes___&quot;</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> &lt;&lt; </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>&quot;%010X/%010X%12td%12td%12td&quot;</span><span class=cF0>,
<a name="l44"></a> </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;used_u8s, </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;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> &lt;&lt; </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>&quot;____CodeData_Heap____ &quot;</span><span class=cF0>
<a name="l49"></a> </span><span class=cF6>&quot;___Lines___ ___Reads___ ___Writes__&quot;</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> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>, </span><span class=cF6>&quot;ProgressBars:%016X %016X %016X %016X&quot;</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 &lt; </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 = &amp;</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-&gt;calc_idle_count != </span><span class=cFB>wall</span><span class=cF0>-&gt;last_calc_idle_count)
<a name="l58"></a> {
<a name="l59"></a> </span><span class=cFB>wall</span><span class=cF0>-&gt;last_calc_idle_delta_time = </span><span class=cFB>winmgr</span><span class=cF0>.t-&gt;calc_idle_delta_time;
<a name="l60"></a> </span><span class=cFB>wall</span><span class=cF0>-&gt;last_swap_counter[i] = </span><span class=cFB>winmgr</span><span class=cF0>.t-&gt;last_swap_counter[i];
<a name="l61"></a> </span><span class=cFB>winmgr</span><span class=cF0>.t-&gt;last_swap_counter[i] = c-&gt;swap_counter;
<a name="l62"></a> }
<a name="l63"></a>
<a name="l64"></a> task = c-&gt;executive_task;
<a name="l65"></a> </span><span class=cF1>do</span><span class=cF0>
<a name="l66"></a> {
<a name="l67"></a> wpd = &amp;task-&gt;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 &amp; </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>-&gt;hash_table = task-&gt;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>-&gt;hash_table = old_hash;
<a name="l76"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(wpd-&gt;caller_stack, </span><span class=cF6>&quot; %-18tp %-18tp %-18tp %-18tp&quot;</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> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>YELLOW</span><span class=cF0>, wpd-&gt;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 &lt; </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>&quot;Stack Overflow&quot;</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 &amp; </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-&gt;alloced_u8s = </span><span class=cF5>TaskMemAlloced</span><span class=cF0>(task);
<a name="l87"></a> wpd-&gt;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> &lt;&lt; </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>&quot; %-18ts #%08X %010X %010X/%010X %04X:%02tX:%08X&quot;</span><span class=cF0>,
<a name="l91"></a> task-&gt;task_title, task, j, wpd-&gt;used_u8s, wpd-&gt;alloced_u8s,
<a name="l92"></a> task-&gt;task_flags, task-&gt;display_flags, task-&gt;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-&gt;next_task;
<a name="l96"></a> }
<a name="l97"></a> </span><span class=cF1>while</span><span class=cF0> (task != c-&gt;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> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>, </span><span class=cF6>&quot;CPU%02X %2tf%% ContextSwaps/s:%9,d&quot;</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-&gt;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-&gt;last_swap_counter[i]
<a name="l101"></a> - </span><span class=cFB>wall</span><span class=cF0>-&gt;last_swap_counter[i]) / </span><span class=cFB>wall</span><span class=cF0>-&gt;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> &lt;&lt; </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>&quot; ___Description____ #__Task__ UnusedStack _UsedMem_/_AllocMem_ ______Flags_____&quot;</span><span class=cF0>);
<a name="l105"></a>
<a name="l106"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cFB>winmgr</span><span class=cF0>.updates &amp; </span><span class=cFE>31</span><span class=cF7>)</span><span class=cF0> || !*</span><span class=cFB>wall</span><span class=cF0>-&gt;top_line)
<a name="l107"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l108"></a> </span><span class=cF5>Date2Struct</span><span class=cF0>(&amp;ds, </span><span class=cF5>Now</span><span class=cF0>);
<a name="l109"></a> i = </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;alloced_u8s - </span><span class=cFB>sys_code_bp</span><span class=cF0>-&gt;used_u8s;
<a name="l110"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>sys_data_bp</span><span class=cF0>)
<a name="l111"></a> i += </span><span class=cFB>sys_data_bp</span><span class=cF0>-&gt;alloced_u8s - </span><span class=cFB>sys_data_bp</span><span class=cF0>-&gt;used_u8s;
<a name="l112"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(</span><span class=cFB>wall</span><span class=cF0>-&gt;top_line,
<a name="l113"></a> </span><span class=cF6>&quot;%3tZ %02d/%02d/%02d %02d:%02d:%02d FPS:%2tf Mem:%010X CPU&quot;</span><span class=cF0>,
<a name="l114"></a> ds.day_of_week, </span><span class=cF6>&quot;ST_DAYS_OF_WEEK&quot;</span><span class=cF0>, ds.mon, ds.day_of_mon, ds.year % </span><span class=cFE>100</span><span class=cF0>,
<a name="l115"></a> ds.hour, ds.min, ds.sec, </span><span class=cFB>winmgr</span><span class=cF0>.fps, i);
<a name="l116"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l117"></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> &lt;&lt; </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>-&gt;top_line);
<a name="l118"></a>
<a name="l119"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>screencast</span><span class=cF0>.record)
<a name="l120"></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> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>RED</span><span class=cF0>, </span><span class=cF6>&quot;*&quot;</span><span class=cF0>);
<a name="l121"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i &lt; </span><span class=cFB>mp_count</span><span class=cF0>; i++)
<a name="l122"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l123"></a> c = &amp;</span><span class=cFB>cpu_structs</span><span class=cF0>[i];
<a name="l124"></a> </span><span class=cF1>if</span><span class=cF0> (i &amp; </span><span class=cFE>1</span><span class=cF0>)
<a name="l125"></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> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>WHITE</span><span class=cF0>, </span><span class=cF6>&quot;%2tf&quot;</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-&gt;idle_factor</span><span class=cF7>)</span><span class=cF0>);
<a name="l126"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l127"></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> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>YELLOW</span><span class=cF0>, </span><span class=cF6>&quot;%2tf&quot;</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-&gt;idle_factor</span><span class=cF7>)</span><span class=cF0>);
<a name="l128"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l129"></a>
<a name="l130"></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="l131"></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> &lt;&lt; </span><span class=cFE>4</span><span class=cF0> + </span><span class=cF3>YELLOW</span><span class=cF0>, </span><span class=cF6>&quot;%25ts&quot;</span><span class=cF0>, st);
<a name="l132"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l133"></a>
<a name="l134"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;hash_table = old_hash;
<a name="l135"></a> </span><span class=cFB>wall</span><span class=cF0>-&gt;last_calc_idle_count = </span><span class=cFB>winmgr</span><span class=cF0>.t-&gt;calc_idle_count;
<a name="l136"></a>}
<a name="l137"></a></span><span class=cFA>
<a name="l138"></a>&lt;1&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l139"></a>
<a name="l140"></a>
<a name="l141"></a>
<a name="l142"></a></span><span class=cFA>
<a name="l143"></a>&lt;2&gt;/* Graphics Not Rendered in HTML */</span><span class=cF0>
<a name="l144"></a>
<a name="l145"></a>
<a name="l146"></a>
<a name="l147"></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="l148"></a>{
<a name="l149"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Blink</span><span class=cF0>)
<a name="l150"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, c-&gt;left, c-&gt;top, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA>&lt;1&gt;</span><span class=cF0>);
<a name="l151"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l152"></a> </span><span class=cF5>Sprite3</span><span class=cF0>(dc, c-&gt;left, c-&gt;top, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFA>&lt;2&gt;</span><span class=cF0>);
<a name="l153"></a>}
<a name="l154"></a>
<a name="l155"></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="l156"></a>{
<a name="l157"></a> </span><span class=cF1>if</span><span class=cF0> (down)
<a name="l158"></a> </span><span class=cF5>User</span><span class=cF0>;
<a name="l159"></a>}
<a name="l160"></a>
<a name="l161"></a></span><span class=cF9>CCtrl</span><span class=cF0> *</span><span class=cF5>TermBttnNew</span><span class=cF0>()
<a name="l162"></a>{
<a name="l163"></a> </span><span class=cF9>I64</span><span class=cF0> min_x, max_x, min_y, max_y;
<a name="l164"></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="l165"></a>
<a name="l166"></a> c-&gt;win_task = </span><span class=cFB>sys_winmgr_task</span><span class=cF0>;
<a name="l167"></a> c-&gt;flags = </span><span class=cF3>CTRLF_SHOW</span><span class=cF0>;
<a name="l168"></a> c-&gt;type = </span><span class=cF3>CTRLT_GENERIC</span><span class=cF0>;
<a name="l169"></a> c-&gt;draw_it = &amp;</span><span class=cF5>DrawTermBttn</span><span class=cF0>;
<a name="l170"></a> c-&gt;left_click = &amp;</span><span class=cF5>LeftClickTermBttn</span><span class=cF0>;
<a name="l171"></a>
<a name="l172"></a> </span><span class=cF5>SpriteExtents</span><span class=cF0>(</span><span class=cFA>&lt;1&gt;</span><span class=cF0>, &amp;min_x, &amp;max_x, &amp;min_y, &amp;max_y);
<a name="l173"></a></span><span class=cF2>//min must be zero</span><span class=cF0>
<a name="l174"></a> c-&gt;left = </span><span class=cFB>sys_winmgr_task</span><span class=cF0>-&gt;pix_width - (max_x - min_x + </span><span class=cFE>1</span><span class=cF0>);
<a name="l175"></a> c-&gt;right = c-&gt;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="l176"></a> c-&gt;top = </span><span class=cFB>sys_winmgr_task</span><span class=cF0>-&gt;pix_height - (max_y - min_y + </span><span class=cFE>1</span><span class=cF0>);
<a name="l177"></a> c-&gt;bottom = c-&gt;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="l178"></a>
<a name="l179"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(c, </span><span class=cFB>sys_winmgr_task</span><span class=cF0>-&gt;last_ctrl);
<a name="l180"></a> </span><span class=cF5>TaskDerivedValsUpdate</span><span class=cF0>(</span><span class=cFB>sys_winmgr_task</span><span class=cF0>);
<a name="l181"></a>
<a name="l182"></a> </span><span class=cF1>return</span><span class=cF0> c;
<a name="l183"></a>}
<a name="l184"></a>
<a name="l185"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>WallPaperInit</span><span class=cF0>()
<a name="l186"></a>{
<a name="l187"></a> </span><span class=cF5>TermBttnNew</span><span class=cF0>;
<a name="l188"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_wall_paper = &amp;</span><span class=cF5>WallPaper</span><span class=cF0>;
<a name="l189"></a>}
</span></pre></body>
</html>