📄 macmainif_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MacMainIf.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>MacMainIf.h</h1><a href="MacMainIf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">//</span>00002 <span class="comment">//</span>00003 <span class="comment">// Upper interface declarations for MacMain functions</span>00004 <span class="comment">//</span>00005 <span class="preprocessor">#ifndef MACMAINIF_H_</span><a name="l00006"></a><a class="code" href="MacMainIf_8h.html#a0">00006</a> <span class="preprocessor"></span><span class="preprocessor">#define MACMAINIF_H 1</span>00007 <span class="preprocessor"></span>00008 <span class="comment">// This embarassing hack exists purely because EMACS' electric-c indentation</span>00009 <span class="comment">// mode is too clever by half...</span>00010 <span class="preprocessor">#ifdef __cplusplus</span>00011 <span class="preprocessor"></span><span class="preprocessor">#define BEGIN_EXTERN_C extern "C" {</span>00012 <span class="preprocessor"></span><span class="preprocessor">#define END_EXTERN_C };</span>00013 <span class="preprocessor"></span><span class="preprocessor">#else</span><a name="l00014"></a><a class="code" href="MacMainIf_8h.html#a1">00014</a> <span class="preprocessor"></span><span class="preprocessor">#define BEGIN_EXTERN_C</span><a name="l00015"></a><a class="code" href="MacMainIf_8h.html#a2">00015</a> <span class="preprocessor"></span><span class="preprocessor">#define END_EXTERN_C</span>00016 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00017 <span class="preprocessor"></span>00018 <span class="preprocessor">#include <CoreServices/CoreServices.h></span>00019 00020 <a class="code" href="MacMainIf_8h.html#a1">BEGIN_EXTERN_C</a>00021 00022 <span class="keywordtype">long</span> <a class="code" href="MacMainIf_8h.html#a7">MacInitialisePWLibEvents</a>(<span class="keywordtype">void</span>);00023 <span class="keywordtype">long</span> <a class="code" href="MacMainIf_8h.html#a8">MacTeardownPWLibEvents</a>(<span class="keywordtype">void</span>);00024 <span class="comment">// technically, CALLBACK_API_C returns OSStatus, but that's a long</span><a name="l00025"></a><a class="code" href="MacMainIf_8h.html#a5">00025</a> <span class="keyword">typedef</span> long(*<a class="code" href="MacMainIf_8h.html#a5">callback_api_c</a>)(<span class="keywordtype">void</span>*);00026 <span class="keywordtype">int</span> <a class="code" href="MacMainIf_8h.html#a9">SpawnProcessInContext</a>( <a class="code" href="MacMainIf_8h.html#a5">callback_api_c</a> trampoline );00027 <span class="comment">// The shutdown dance is long and complicated.</span>00028 <span class="comment">// Actually, it's not. When (or shortly after) the PProcess terminates,</span>00029 <span class="comment">// three things happen:</span>00030 <span class="comment">// The extern variable pwlibAppQueueID gets set to zero;</span>00031 <span class="comment">// the main application event loop receives a special event call;</span>00032 <span class="comment">// and the main application receives a Quit event.</span>00033 <span class="comment">// Here's the special event:</span><a name="l00034"></a><a class="code" href="MacMainIf_8h.html#a3">00034</a> <span class="preprocessor">#define kEventClassPwlib 'PWLB'</span><a name="l00035"></a><a class="code" href="MacMainIf_8h.html#a4">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define kEventPwlibPProcExit 0</span>00036 <span class="preprocessor"></span><span class="comment">// Here's the variable:</span><a name="l00037"></a><a class="code" href="MacMainIf_8h.html#a6">00037</a> <span class="keyword">extern</span> MPQueueID <a class="code" href="MacMainIf_8h.html#a6">pwlibAppQueueID</a>;00038 <span class="comment">// And here's a function you can call to wait for the application PProcess</span>00039 <span class="comment">// to exit (assuming you've already suggested to it that it should).</span>00040 <span class="keywordtype">long</span> <a class="code" href="MacMainIf_8h.html#a10">MacWaitForPProcess</a>(Duration);00041 00042 <a class="code" href="MacMainIf_8h.html#a2">END_EXTERN_C</a>00043 <span class="preprocessor">#endif</span></pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:11 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -