1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
|
<!--
SPDX-FileCopyrightText: The WebKit GTK and WPE teams
SPDX-License-Identifier: BSD, LGPL-2.1
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>JavaScriptCore.Value.array_buffer_get_data</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8" />
<meta property="og:type" content="website"/>
<meta priority="og:title" content="JavaScriptCore.Value.array_buffer_get_data"/>
<meta priority="og:description" content="Reference for JavaScriptCore.Value.array_buffer_get_data"/>
<meta name="twitter:title" content="JavaScriptCore.Value.array_buffer_get_data"/>
<meta name="twitter:description" content="Reference for JavaScriptCore.Value.array_buffer_get_data"/>
<meta name="twitter:card" content="summary"/>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="urlmap.js"></script>
<script src="fzy.js"></script>
<script src="search.js"></script>
<script src="main.js"></script>
</head>
<body>
<div id="body-wrapper" tabindex="-1">
<nav class="sidebar devhelp-hidden">
<div class="search section">
<form id="search-form" autocomplete="off">
<input id="search-input" type="text" name="do-not-autocomplete" placeholder="Click, or press 's' to search" autocomplete="off"/>
</form>
</div>
<div class="section namespace">
<h3><a href="index.html">JavaScriptCore</a></h3>
<p>API Version: 6.0</p>
<p>Library Version: 2.50.1</p>
</div>
<div class="section">
<h5>Type</h5>
<div class="links">
<a href="class.Value.html">Value</a>
</div>
</div>
<div class="section">
<h5>Methods</h5>
<div class="links">
<a class="method current" href="method.Value.array_buffer_get_data.html">array_buffer_get_data</a>
<a class="method" href="method.Value.array_buffer_get_size.html">array_buffer_get_size</a>
<a class="method" href="method.Value.constructor_call.html">constructor_call</a>
<a class="method" href="method.Value.constructor_callv.html">constructor_callv</a>
<a class="method" href="method.Value.function_call.html">function_call</a>
<a class="method" href="method.Value.function_callv.html">function_callv</a>
<a class="method" href="method.Value.get_context.html">get_context</a>
<a class="method" href="method.Value.is_array.html">is_array</a>
<a class="method" href="method.Value.is_array_buffer.html">is_array_buffer</a>
<a class="method" href="method.Value.is_boolean.html">is_boolean</a>
<a class="method" href="method.Value.is_constructor.html">is_constructor</a>
<a class="method" href="method.Value.is_function.html">is_function</a>
<a class="method" href="method.Value.is_null.html">is_null</a>
<a class="method" href="method.Value.is_number.html">is_number</a>
<a class="method" href="method.Value.is_object.html">is_object</a>
<a class="method" href="method.Value.is_string.html">is_string</a>
<a class="method" href="method.Value.is_typed_array.html">is_typed_array</a>
<a class="method" href="method.Value.is_undefined.html">is_undefined</a>
<a class="method" href="method.Value.new_typed_array_with_buffer.html">new_typed_array_with_buffer</a>
<a class="method" href="method.Value.object_define_property_accessor.html">object_define_property_accessor</a>
<a class="method" href="method.Value.object_define_property_data.html">object_define_property_data</a>
<a class="method" href="method.Value.object_delete_property.html">object_delete_property</a>
<a class="method" href="method.Value.object_enumerate_properties.html">object_enumerate_properties</a>
<a class="method" href="method.Value.object_get_property.html">object_get_property</a>
<a class="method" href="method.Value.object_get_property_at_index.html">object_get_property_at_index</a>
<a class="method" href="method.Value.object_has_property.html">object_has_property</a>
<a class="method" href="method.Value.object_invoke_method.html">object_invoke_method</a>
<a class="method" href="method.Value.object_invoke_methodv.html">object_invoke_methodv</a>
<a class="method" href="method.Value.object_is_instance_of.html">object_is_instance_of</a>
<a class="method" href="method.Value.object_set_property.html">object_set_property</a>
<a class="method" href="method.Value.object_set_property_at_index.html">object_set_property_at_index</a>
<a class="method" href="method.Value.to_boolean.html">to_boolean</a>
<a class="method" href="method.Value.to_double.html">to_double</a>
<a class="method" href="method.Value.to_int32.html">to_int32</a>
<a class="method" href="method.Value.to_json.html">to_json</a>
<a class="method" href="method.Value.to_string.html">to_string</a>
<a class="method" href="method.Value.to_string_as_bytes.html">to_string_as_bytes</a>
<a class="method" href="method.Value.typed_array_get_buffer.html">typed_array_get_buffer</a>
<a class="method" href="method.Value.typed_array_get_data.html">typed_array_get_data</a>
<a class="method" href="method.Value.typed_array_get_length.html">typed_array_get_length</a>
<a class="method" href="method.Value.typed_array_get_offset.html">typed_array_get_offset</a>
<a class="method" href="method.Value.typed_array_get_size.html">typed_array_get_size</a>
<a class="method" href="method.Value.typed_array_get_type.html">typed_array_get_type</a>
</div>
</div>
<div class="section generator">
<p>Generated by <a href="https://gitlab.gnome.org/GNOME/gi-docgen">gi-docgen</a> 2023.4</p>
</div>
</nav>
<button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button>
<section id="main" class="content">
<header>
<h3>Method</h3>
<h1><a href="index.html">JavaScriptCore</a><span class="sep"></span><a href="class.Value.html">Value</a><span class="sep"></span>array_buffer_get_data</h1>
</header>
<section>
<div class="docblock">
<p><span class="emblem available">since: 2.38</span></p>
</div>
<div class="declaration toggle-wrapper">
<h4 style="display:flex;" id="declaration">
Declaration
<a class="anchor" href="#declaration"></a>
<a class="srclink" title="go to source location" href="https://github.com/WebKit/WebKit/tree/WebKitBuild/GTK/Release/JavaScriptCoreGLib/DerivedSources/jsc/JSCValue.h#L249">[src]</a>
</h4>
<div class="docblock c-decl">
<pre><code><div class="highlight"><pre><span></span><span class="n">gpointer</span>
<span class="n">jsc_value_array_buffer_get_data</span><span class="w"> </span><span class="p">(</span>
<span class="w"> </span><span class="n">JSCValue</span><span class="o">*</span><span class="w"> </span><span class="n">value</span><span class="p">,</span>
<span class="w"> </span><span class="n">gsize</span><span class="o">*</span><span class="w"> </span><span class="n">size</span>
<span class="p">)</span>
</pre></div>
</code></pre>
</div>
</div>
<div class="description toggle-wrapper">
<h4 style="display:flex;" id="description">
Description
<a class="anchor" href="#description"></a>
<a class="srclink" title="go to source location" href="https://github.com/WebKit/WebKit/tree/Source/JavaScriptCore/API/glib/JSCValue.cpp#L1568">[src]</a>
</h4>
<div class="docblock">
<p>Gets a pointer to memory that contains the array buffer data.</p>
<p>Obtains a pointer to the memory region that holds the contents of the
%ArrayBuffer; modifications done to the data will be visible to JavaScript
code. If <code>size</code> is not <code>NULL</code>, the size in bytes of the memory region
will also be stored in the pointed location.</p>
<p>Note that the pointer returned by this function is not guaranteed to remain
the same after calls to other <span class="caps">JSC</span> <span class="caps">API</span> functions. If you plan to access the
data of the %ArrayBuffer later, you can keep a reference to the <code>value</code> and
obtain the data pointer at a later point. Keep in mind that if JavaScript
code has a chance to run, for example due to main loop events that result
in <span class="caps">JSC</span> being called, the contents of the memory region might be modified in
the meantime. Consider taking a copy of the data and using the copy instead
in asynchronous code.</p>
</div>
<div class="docblock">
<p>Available since: 2.38</p>
</div>
</div>
<div class="parameters toggle-wrapper">
<h4 id="parameters">
Parameters
<a href="#parameters" class="anchor"></a>
</h4>
<div class="docblock">
<dl class="arguments">
<dt class="arg-name"><code>size</code></dt>
<dd class="arg-description">
<p><em>Type:</em> <code>gsize*</code></p>
<p>Location where to store the size of the memory region.</p>
<table>
<tr><td>The argument can be <code>NULL</code>.</td></tr>
<tr><td title="transfer: none">The data is owned by the caller of the method.</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<div class="return-value toggle-wrapper">
<h4 id="return-value">
Return value
<a href="#return-value" class="anchor"></a>
</h4>
<div class="docblock">
<div class="returns">
<div class="arg-description">
<p><em>Type:</em> <code>gpointer</code></p>
<p>Pointer to memory.</p>
</div>
<div>
<table>
<tr><td title="transfer: none">The returned data is owned by the instance.</td></tr>
<tr><td>The return value can be <code>NULL</code>.</td></tr>
</table>
</div>
</div>
</div>
</div>
</section>
</section>
<section id="search" class="content hidden"></section>
<footer>
</footer>
</div>
</body>
</html>
|