1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5 6<title>android::RSC::RS Class Reference</title> 7<link href="tabs.css" rel="stylesheet" type="text/css"/> 8<link href="doxygen.css" rel="stylesheet" type="text/css" /> 9 10 11 12</head> 13<body> 14<div id="top"><!-- do not remove this div! --> 15 16 17<!-- Generated by Doxygen 1.7.5.1 --> 18 <div id="navrow1" class="tabs"> 19 <ul class="tablist"> 20 <li><a href="index.html"><span>Overview</span></a></li> 21 <li class="current"><a href="annotated.html"><span>Structs</span></a></li> 22 </ul> 23 </div> 24 <div id="nav-path" class="navpath"> 25 <ul> 26 <li class="navelem"><b>android</b> </li> 27 <li class="navelem"><b>RSC</b> </li> 28 <li class="navelem"><a class="el" href="classandroid_1_1RSC_1_1RS.html">RS</a> </li> 29 </ul> 30 </div> 31</div> 32<div class="header"> 33 <div class="summary"> 34<a href="#pub-methods">Public Member Functions</a> </div> 35 <div class="headertitle"> 36<div class="title">android::RSC::RS Class Reference</div> </div> 37</div> 38<div class="contents"> 39<!-- doxytag: class="android::RSC::RS" --> 40<p><code>#include <<a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a>></code></p> 41<table class="memberdecls"> 42<tr><td colspan="2"><h2><a name="pub-methods"></a> 43Public Member Functions</h2></td></tr> 44<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1RS.html#a04fd7161619e7b2ede4e54a14064097f">init</a> (std::string name, uint32_t flags=0)</td></tr> 45<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1RS.html#a3e91e22835c85d230eba3ff1d20455a5">setErrorHandler</a> (ErrorHandlerFunc_t func)</td></tr> 46<tr><td class="memItemLeft" align="right" valign="top">ErrorHandlerFunc_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1RS.html#aeb1f7ac6b745b64d56ea07f92d4003b1">getErrorHandler</a> ()</td></tr> 47<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1RS.html#a37d0314f4a5f861da12355b4ca5ffee6">setMessageHandler</a> (MessageHandlerFunc_t func)</td></tr> 48<tr><td class="memItemLeft" align="right" valign="top">MessageHandlerFunc_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1RS.html#a5f1336fbd31c78a97a7bc9fdeccc6020">getMessageHandler</a> ()</td></tr> 49<tr><td class="memItemLeft" align="right" valign="top">RSError </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1RS.html#a44f4660452aee0b1dbd747e383e531be">getError</a> ()</td></tr> 50<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1RSC_1_1RS.html#aff0d61c3a1fa1432a07dae0db14569c4">finish</a> ()</td></tr> 51</table> 52<hr/><a name="details" id="details"></a><h2>Detailed Description</h2> 53<div class="textblock"><p>The RenderScript context. This class controls initialization, resource management, and teardown. </p> 54 55<p>Definition at line <a class="el" href="rsCppStructs_8h_source.html#l00085">85</a> of file <a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a>.</p> 56</div><hr/><h2>Member Function Documentation</h2> 57<a class="anchor" id="aff0d61c3a1fa1432a07dae0db14569c4"></a><!-- doxytag: member="android::RSC::RS::finish" ref="aff0d61c3a1fa1432a07dae0db14569c4" args="()" --> 58<div class="memitem"> 59<div class="memproto"> 60 <table class="memname"> 61 <tr> 62 <td class="memname">void android::RSC::RS::finish </td> 63 <td>(</td> 64 <td class="paramname"></td><td>)</td> 65 <td></td> 66 </tr> 67 </table> 68</div> 69<div class="memdoc"> 70<p>Waits for any currently running asynchronous operations to finish. This should only be used for performance testing and timing. </p> 71 72</div> 73</div> 74<a class="anchor" id="a44f4660452aee0b1dbd747e383e531be"></a><!-- doxytag: member="android::RSC::RS::getError" ref="a44f4660452aee0b1dbd747e383e531be" args="()" --> 75<div class="memitem"> 76<div class="memproto"> 77 <table class="memname"> 78 <tr> 79 <td class="memname">RSError android::RSC::RS::getError </td> 80 <td>(</td> 81 <td class="paramname"></td><td>)</td> 82 <td></td> 83 </tr> 84 </table> 85</div> 86<div class="memdoc"> 87<p>Returns current status for the context.</p> 88<dl class="return"><dt><b>Returns:</b></dt><dd>current error </dd></dl> 89 90</div> 91</div> 92<a class="anchor" id="aeb1f7ac6b745b64d56ea07f92d4003b1"></a><!-- doxytag: member="android::RSC::RS::getErrorHandler" ref="aeb1f7ac6b745b64d56ea07f92d4003b1" args="()" --> 93<div class="memitem"> 94<div class="memproto"> 95 <table class="memname"> 96 <tr> 97 <td class="memname">ErrorHandlerFunc_t android::RSC::RS::getErrorHandler </td> 98 <td>(</td> 99 <td class="paramname"></td><td>)</td> 100 <td><code> [inline]</code></td> 101 </tr> 102 </table> 103</div> 104<div class="memdoc"> 105<p>Returns the current error handler function for this context.</p> 106<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to current error handler function or NULL if not set </dd></dl> 107 108<p>Definition at line <a class="el" href="rsCppStructs_8h_source.html#l00113">113</a> of file <a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a>.</p> 109 110</div> 111</div> 112<a class="anchor" id="a5f1336fbd31c78a97a7bc9fdeccc6020"></a><!-- doxytag: member="android::RSC::RS::getMessageHandler" ref="a5f1336fbd31c78a97a7bc9fdeccc6020" args="()" --> 113<div class="memitem"> 114<div class="memproto"> 115 <table class="memname"> 116 <tr> 117 <td class="memname">MessageHandlerFunc_t android::RSC::RS::getMessageHandler </td> 118 <td>(</td> 119 <td class="paramname"></td><td>)</td> 120 <td><code> [inline]</code></td> 121 </tr> 122 </table> 123</div> 124<div class="memdoc"> 125<p>Returns the current message handler function for this context.</p> 126<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to current message handler function or NULL if not set </dd></dl> 127 128<p>Definition at line <a class="el" href="rsCppStructs_8h_source.html#l00128">128</a> of file <a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a>.</p> 129 130</div> 131</div> 132<a class="anchor" id="a04fd7161619e7b2ede4e54a14064097f"></a><!-- doxytag: member="android::RSC::RS::init" ref="a04fd7161619e7b2ede4e54a14064097f" args="(std::string name, uint32_t flags=0)" --> 133<div class="memitem"> 134<div class="memproto"> 135 <table class="memname"> 136 <tr> 137 <td class="memname">bool android::RSC::RS::init </td> 138 <td>(</td> 139 <td class="paramtype">std::string </td> 140 <td class="paramname"><em>name</em>, </td> 141 </tr> 142 <tr> 143 <td class="paramkey"></td> 144 <td></td> 145 <td class="paramtype">uint32_t </td> 146 <td class="paramname"><em>flags</em> = <code>0</code> </td> 147 </tr> 148 <tr> 149 <td></td> 150 <td>)</td> 151 <td></td><td></td> 152 </tr> 153 </table> 154</div> 155<div class="memdoc"> 156<p>Initializes a RenderScript context. A context must be initialized before it can be used. </p> 157<dl><dt><b>Parameters:</b></dt><dd> 158 <table class="params"> 159 <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>Directory name to be used by this context. This should be equivalent to Context.getCacheDir(). </td></tr> 160 <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>Optional flags for this context. </td></tr> 161 </table> 162 </dd> 163</dl> 164<dl class="return"><dt><b>Returns:</b></dt><dd>true on success </dd></dl> 165 166</div> 167</div> 168<a class="anchor" id="a3e91e22835c85d230eba3ff1d20455a5"></a><!-- doxytag: member="android::RSC::RS::setErrorHandler" ref="a3e91e22835c85d230eba3ff1d20455a5" args="(ErrorHandlerFunc_t func)" --> 169<div class="memitem"> 170<div class="memproto"> 171 <table class="memname"> 172 <tr> 173 <td class="memname">void android::RSC::RS::setErrorHandler </td> 174 <td>(</td> 175 <td class="paramtype">ErrorHandlerFunc_t </td> 176 <td class="paramname"><em>func</em></td><td>)</td> 177 <td></td> 178 </tr> 179 </table> 180</div> 181<div class="memdoc"> 182<p>Sets the error handler function for this context. This error handler is called whenever an error is set.</p> 183<dl><dt><b>Parameters:</b></dt><dd> 184 <table class="params"> 185 <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Error handler function </td></tr> 186 </table> 187 </dd> 188</dl> 189 190</div> 191</div> 192<a class="anchor" id="a37d0314f4a5f861da12355b4ca5ffee6"></a><!-- doxytag: member="android::RSC::RS::setMessageHandler" ref="a37d0314f4a5f861da12355b4ca5ffee6" args="(MessageHandlerFunc_t func)" --> 193<div class="memitem"> 194<div class="memproto"> 195 <table class="memname"> 196 <tr> 197 <td class="memname">void android::RSC::RS::setMessageHandler </td> 198 <td>(</td> 199 <td class="paramtype">MessageHandlerFunc_t </td> 200 <td class="paramname"><em>func</em></td><td>)</td> 201 <td></td> 202 </tr> 203 </table> 204</div> 205<div class="memdoc"> 206<p>Sets the message handler function for this context. This message handler is called whenever a message is sent from a RenderScript kernel.</p> 207<dl><dt><b>Parameters:</b></dt><dd> 208 <table class="params"> 209 <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Message handler function </td></tr> 210 </table> 211 </dd> 212</dl> 213 214</div> 215</div> 216<hr/>The documentation for this class was generated from the following file:<ul> 217<li><a class="el" href="rsCppStructs_8h_source.html">rsCppStructs.h</a></li> 218</ul> 219</div> 220 221</body> 222</html> 223