142 lines
14 KiB
HTML
Executable File
142 lines
14 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="generator" content="TempleOS V5.03">
|
|
<meta name="viewport" content="width=device-width">
|
|
<link rel="stylesheet" href="/style/templeos.css">
|
|
<script src="/script/templeos.js"></script>
|
|
<style type="text/css">
|
|
.cF0{color:#000000;background-color:#ffffff;}
|
|
.cF1{color:#0000aa;background-color:#ffffff;}
|
|
.cF2{color:#00aa00;background-color:#ffffff;}
|
|
.cF3{color:#00aaaa;background-color:#ffffff;}
|
|
.cF4{color:#aa0000;background-color:#ffffff;}
|
|
.cF5{color:#aa00aa;background-color:#ffffff;}
|
|
.cF6{color:#aa5500;background-color:#ffffff;}
|
|
.cF7{color:#aaaaaa;background-color:#ffffff;}
|
|
.cF8{color:#555555;background-color:#ffffff;}
|
|
.cF9{color:#5555ff;background-color:#ffffff;}
|
|
.cFA{color:#55ff55;background-color:#ffffff;}
|
|
.cFB{color:#55ffff;background-color:#ffffff;}
|
|
.cFC{color:#ff5555;background-color:#ffffff;}
|
|
.cFD{color:#ff55ff;background-color:#ffffff;}
|
|
.cFE{color:#ffff55;background-color:#ffffff;}
|
|
.cFF{color:#ffffff;background-color:#ffffff;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre id="content">
|
|
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"DolDoc/Task;StdOut/Task"</span><span class=cF0>
|
|
<a name="l2"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CDoc</span><span class=cF0> *</span><span class=cF5>DocPut</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l3"></a>{</span><span class=cF2>//Current document that StdOut Put() goes to.</span><span class=cF0>
|
|
<a name="l4"></a></span><span class=cF2>//Basically, StdOut unless double buffering.</span><span class=cF0>
|
|
<a name="l5"></a> </span><span class=cF9>CDoc</span><span class=cF0> *res;
|
|
<a name="l6"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
|
|
<a name="l7"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&task->task_flags,</span><span class=cF3>TASKf_INPUT_FILTER_TASK</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l8"></a> task=task->parent_task;
|
|
<a name="l9"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>res=task->put_doc</span><span class=cF7>)</span><span class=cF0> && res->doc_signature==</span><span class=cF3>DOC_SIGNATURE_VAL</span><span class=cF0>)
|
|
<a name="l10"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l11"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l12"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l13"></a>}
|
|
<a name="l14"></a>
|
|
<a name="l15"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CDoc</span><span class=cF0> *</span><span class=cF5>DocDisplay</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l16"></a>{</span><span class=cF2>//StdOut displayed unless double buffering.</span><span class=cF0>
|
|
<a name="l17"></a> </span><span class=cF9>CDoc</span><span class=cF0> *res;
|
|
<a name="l18"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
|
|
<a name="l19"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>res=task->display_doc</span><span class=cF7>)</span><span class=cF0> && res->doc_signature==</span><span class=cF3>DOC_SIGNATURE_VAL</span><span class=cF0>)
|
|
<a name="l20"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l21"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l22"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l23"></a>}
|
|
<a name="l24"></a>
|
|
<a name="l25"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CDoc</span><span class=cF0> *</span><span class=cF5>DocBorder</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l26"></a>{</span><span class=cF2>//Doc holding border of window text.</span><span class=cF0>
|
|
<a name="l27"></a> </span><span class=cF9>CDoc</span><span class=cF0> *res;
|
|
<a name="l28"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
|
|
<a name="l29"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>res=task->border_doc</span><span class=cF7>)</span><span class=cF0> && res->doc_signature==</span><span class=cF3>DOC_SIGNATURE_VAL</span><span class=cF0>)
|
|
<a name="l30"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l31"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l32"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l33"></a>}
|
|
<a name="l34"></a>
|
|
<a name="l35"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CDoc</span><span class=cF0> *</span><span class=cF5>DocDblBufStart</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l36"></a>{</span><span class=cF2>//See </span><a href="/Wb/Demo/Spy.HC.HTML#l1"><span class=cF4>::/Demo/Spy.HC</span></a><span class=cF0>
|
|
<a name="l37"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock_ddoc;
|
|
<a name="l38"></a> </span><span class=cF9>CDoc</span><span class=cF0> *pdoc=</span><span class=cF5>DocPut</span><span class=cF0>(task),*ddoc=</span><span class=cF5>DocDisplay</span><span class=cF0>(task),*res;
|
|
<a name="l39"></a> </span><span class=cF1>if</span><span class=cF0> (!pdoc || !ddoc || pdoc!=ddoc)
|
|
<a name="l40"></a> res=</span><span class=cF3>NULL</span><span class=cF0>; </span><span class=cF2>//Already Double buffering</span><span class=cF0>
|
|
<a name="l41"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l42"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
|
|
<a name="l43"></a> unlock_ddoc=</span><span class=cF5>DocLock</span><span class=cF0>(ddoc); </span><span class=cF2>//dont change during winupdate, so lock DocPut</span><span class=cF0>
|
|
<a name="l44"></a> res=</span><span class=cF5>DocNew</span><span class=cF0>(,task);
|
|
<a name="l45"></a> res->win_task =ddoc->win_task;
|
|
<a name="l46"></a> res->max_entries =ddoc->max_entries;
|
|
<a name="l47"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(res->find_replace,ddoc->find_replace,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CEdFindText</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l48"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&res->filename,&ddoc->filename,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CEdFileName</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l49"></a> res->left_click_link =ddoc->left_click_link;
|
|
<a name="l50"></a> res->right_click_link =ddoc->right_click_link;
|
|
<a name="l51"></a> res->user_put_data =ddoc->user_put_data;
|
|
<a name="l52"></a> res->user_put_key =ddoc->user_put_key;
|
|
<a name="l53"></a> res->user_put_s =ddoc->user_put_s;
|
|
<a name="l54"></a> res->parent_doc =ddoc->parent_doc;
|
|
<a name="l55"></a> res->desc =ddoc->desc;
|
|
<a name="l56"></a> res->user_data =ddoc->user_data;
|
|
<a name="l57"></a> res->flags|=ddoc->flags&</span><span class=cF3>DOCG_DBL_BUF_FLAGS</span><span class=cF0> | </span><span class=cF3>DOCF_DONT_SHOW</span><span class=cF0>;
|
|
<a name="l58"></a> task->put_doc=res;
|
|
<a name="l59"></a> </span><span class=cF1>if</span><span class=cF0> (unlock_ddoc)
|
|
<a name="l60"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(ddoc);
|
|
<a name="l61"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l62"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l63"></a>}
|
|
<a name="l64"></a>
|
|
<a name="l65"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>DocDblBufEnd</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l66"></a>{</span><span class=cF2>//See </span><a href="/Wb/Demo/Spy.HC.HTML#l1"><span class=cF4>::/Demo/Spy.HC</span></a><span class=cF0>
|
|
<a name="l67"></a> </span><span class=cF1>Bool</span><span class=cF0> res=</span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l68"></a> </span><span class=cF9>CDoc</span><span class=cF0> *pdoc=</span><span class=cF5>DocPut</span><span class=cF0>(task),*ddoc=</span><span class=cF5>DocDisplay</span><span class=cF0>(task);
|
|
<a name="l69"></a> </span><span class=cF1>if</span><span class=cF0> (pdoc && ddoc && pdoc!=ddoc) </span><span class=cF7>{</span><span class=cF2>//Double buffering?</span><span class=cF0>
|
|
<a name="l70"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
|
|
<a name="l71"></a> ddoc->flags|=</span><span class=cF3>DOCF_DONT_SHOW</span><span class=cF0>;
|
|
<a name="l72"></a> pdoc->flags&=~</span><span class=cF3>DOCF_DONT_SHOW</span><span class=cF0>;
|
|
<a name="l73"></a> </span><span class=cF5>DocLock</span><span class=cF0>(ddoc);
|
|
<a name="l74"></a> task->display_doc=pdoc;
|
|
<a name="l75"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(ddoc);
|
|
<a name="l76"></a> </span><span class=cF5>DocDel</span><span class=cF0>(ddoc);
|
|
<a name="l77"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l78"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l79"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l80"></a>}
|
|
<a name="l81"></a>
|
|
<a name="l82"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>DocDblBufSwap</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l83"></a>{</span><span class=cF2>//See </span><a href="/Wb/Demo/Spy.HC.HTML#l1"><span class=cF4>::/Demo/Spy.HC</span></a><span class=cF0>
|
|
<a name="l84"></a> </span><span class=cF1>Bool</span><span class=cF0> res=</span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l85"></a> </span><span class=cF9>CDoc</span><span class=cF0> *pdoc=</span><span class=cF5>DocPut</span><span class=cF0>(task),*ddoc=</span><span class=cF5>DocDisplay</span><span class=cF0>(task);
|
|
<a name="l86"></a> </span><span class=cF1>if</span><span class=cF0> (pdoc && ddoc && pdoc!=ddoc) </span><span class=cF7>{</span><span class=cF2>//Double buffering?</span><span class=cF0>
|
|
<a name="l87"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
|
|
<a name="l88"></a> ddoc->flags|=</span><span class=cF3>DOCF_DONT_SHOW</span><span class=cF0>;
|
|
<a name="l89"></a> pdoc->flags&=~</span><span class=cF3>DOCF_DONT_SHOW</span><span class=cF0>;
|
|
<a name="l90"></a> </span><span class=cF5>DocLock</span><span class=cF0>(ddoc);
|
|
<a name="l91"></a> task->display_doc=pdoc;
|
|
<a name="l92"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(ddoc);
|
|
<a name="l93"></a> </span><span class=cF5>DocRst</span><span class=cF0>(ddoc,</span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l94"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(ddoc->find_replace,pdoc->find_replace,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CEdFindText</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l95"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&ddoc->filename,&pdoc->filename,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CEdFileName</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l96"></a> ddoc->max_entries =pdoc->max_entries;
|
|
<a name="l97"></a> ddoc->flags =pdoc->flags&</span><span class=cF3>DOCG_DBL_BUF_FLAGS</span><span class=cF0> |
|
|
<a name="l98"></a> ddoc->flags&~</span><span class=cF3>DOCG_DBL_BUF_FLAGS</span><span class=cF0>;
|
|
<a name="l99"></a> ddoc->left_click_link =pdoc->left_click_link;
|
|
<a name="l100"></a> ddoc->right_click_link =pdoc->right_click_link;
|
|
<a name="l101"></a> ddoc->user_put_data =pdoc->user_put_data;
|
|
<a name="l102"></a> ddoc->user_put_key =pdoc->user_put_key;
|
|
<a name="l103"></a> ddoc->user_put_s =pdoc->user_put_s;
|
|
<a name="l104"></a> ddoc->desc =pdoc->desc;
|
|
<a name="l105"></a> ddoc->user_data =pdoc->user_data;
|
|
<a name="l106"></a> task->put_doc=ddoc;
|
|
<a name="l107"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l108"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l109"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l110"></a>}
|
|
</span></pre></body>
|
|
</html>
|