My favorites | Sign in
Project Logo
             
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">

<!--
Copyright 2007, Google Inc.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of Google Inc. nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<html>
<head>
<title>API Summary</title>
<link rel="stylesheet" type="text/css" href="gears.css" />
</head>

<body>

<h1>API Summary</h1>

<div id="pagecontent">

<!------------------------------------------------------------->
<!-- Gears API Summary Reference -->
<!------------------------------------------------------------->

<p>This is the complete list of Gears APIs. Click the class names to see
the details.</p>


<h3>Factory</h3>
<p>Instantiates all other Gears objects. </p>
<pre><code><a href="api_factory.html">Factory class</a>
Object <b>create</b>(className, [classVersion])
string <b>getBuildInfo</b>()
boolean <b>getPermission</b>([siteName], [imageUrl], [extraMessage])
readonly attribute boolean <b>hasPermission</b>
readonly attribute string <b>version</b></code></pre>


<h3>Blob</h3>
<p>Provides a way to reference binary data.</p>
<pre><code><a href="api_blob.html">Blob class</a>
readonly attribute int <b>length</b>
int[] <b>getBytes</b>(offset, length)</code></pre>
Blob <b>slice</b>(offset, length)</code></pre>


<h3>BlobBuilder</h3>
<p>Provides a way to reference binary data.</p>
<pre><code><a href="api_blobbuilder.html">BlobBuilder class</a>
void <b>append</b>(data)
Blob <b>getAsBlob</b>()</code></pre>


<h3>Canvas</h3>
<p>Provides a way to perform image manipulation.</p>
<pre><code><a href="api_canvas.html">Canvas class</a>
readwrite attribute int <b>height</b>
readwrite attribute int <b>width</b>
void <b>crop</b>(x, y, w, h)
void <b>decode</b>(blob)
Blob <b>encode</b>([mimeType, options])
void <b>resize</b>(w, h, [filter])</code></pre>


<h3>Database</h3>
<p>Provides a SQL database for storing data on the local machine.</p>
<pre><code><a href="api_database.html">Database class</a>
readonly attribute int <b>lastInsertRowId</b>
readonly attribute int <b>rowsAffected</b>
void <b>open</b>([name])
ResultSet <b>execute</b>(sqlStatement, [argArray])
void <b>close</b>()
void <b>remove</b>()</code></pre>

<pre><code><a href="api_database.html">ResultSet class</a>
boolean <b>isValidRow</b>()
void <b>next</b>()
int <b>fieldCount</b>()
string <b>fieldName</b>(fieldIndex)
variant <b>field</b>(fieldIndex)
variant <b>fieldByName</b>(fieldName)
void <b>close</b>()</code></pre>


<h3>Desktop</h3>
<p>Provides an interface for accessing Desktop functionality.</p>
<pre><code><a href="api_desktop.html">Desktop class</a>
void <b>createShortcut</b>(name, url, icons, [description])
Object <b>extractMetaData</b>(blob)
Object <b>getDragData</b>(event, flavor)
void <b>openFiles</b>(callback, [options])
void <b>setDropEffect</b>(event, dropEffect)</code></pre>


<h3>Geolocation</h3>
<p>Provides a way to obtain a user's geographical position.</p>
<pre><code><a href="api_geolocation.html#geolocation">Geolocation class</a>
readonly attribute Position <b>lastPosition</b>
readonly attribute boolean <b>hasPermission</b>
void <b>getCurrentPosition</b>(successCallback, [errorCallback], [options])
int <b>watchPosition</b>(successCallback, [errorCallback], [options])
void <b>clearWatch</b>(int watchId)
boolean <b>getPermission</b>([siteName], [imageUrl], [extraMessage])</code></pre>

<pre><code><a href="api_geolocation.html#position">Position class</a>
readonly attribute Date <b>timestamp</b>
readonly attribute Coords <b>coords</b>
readonly attribute Address <b>gearsAddress</b>
readonly attribute double <b>latitude</b>
readonly attribute double <b>longitude</b>
readonly attribute double <b>accuracy</b>
readonly attribute double <b>altitude</b>
readonly attribute double <b>altitudeAccuracy</b></code></pre>

<pre><code><a href="api_geolocation.html#positionoptions">PositionOptions class</a>
readwrite attribute bool <b>enableHighAccuracy</b>
readwrite attribute int <b>maximumAge</b>
readwrite attribute int <b>timeout</b>
readwrite attribute bool <b>gearsRequestAddress</b>
readwrite attribute string <b>gearsAddressLanguage</b>
readwrite attribute string[] <b>gearsLocationProviderUrls</b></code></pre>

<pre><code><a href="api_geolocation.html#positionerror">PositionError class</a>
readonly attribute int <b>UNKNOWN_ERROR</b>
readonly attribute int <b>PERMISSION_DENIED</b>
readonly attribute int <b>POSITION_UNAVAILABLE</b>
readonly attribute int <b>TIMEOUT</b>
readonly attribute int <b>code</b>
readonly attribute string <b>message</b></code></pre>

<pre><code><a href="api_geolocation.html#coords">Coords class</a>
readonly attribute double <b>latitude</b>
readonly attribute double <b>longitude</b>
readonly attribute double <b>accuracy</b>
readonly attribute double <b>altitude</b>
readonly attribute double <b>altitudeAccuracy</b></code></pre>

<pre><code><a href="api_geolocation.html#address">Address class</a>
readonly attribute string <b>streetNumber</b>
readonly attribute string <b>street</b>
readonly attribute string <b>premises</b>
readonly attribute string <b>city</b>
readonly attribute string <b>county</b>
readonly attribute string <b>region</b>
readonly attribute string <b>country</b>
readonly attribute string <b>countryCode</b>
readonly attribute string <b>postalCode</b></code></pre>


<h3>HttpRequest</h3>
<p>Provides the ability to send HTTP requests in workers, as well as on the main page.</p>
<pre><code><a href="api_httprequest.html">HttpRequest class</a>
void <b>open</b>(method, url)
void <b>setRequestHeader</b>(name, value)
void <b>send</b>([postData])
void <b>abort</b>()
string <b>getResponseHeader</b>(name)
string <b>getAllResponseHeaders</b>()
callback <b>onreadystatechange</b>
readonly attribute int <b>readyState</b>
readonly attribute Blob <b>responseBlob</b>
readonly attribute string <b>responseText</b>
readonly attribute int <b>status</b>
readonly attribute string <b>statusText</b>
readonly attribute HttpRequestUpload <b>upload</b></code></pre>
<pre><code><a href="api_httprequest.html#HttpRequestUpload">HttpRequestUpload class</a>
callback <b>onprogress</b>(progressEvent)</code></pre>
<pre><code><a href="api_httprequest.html#ProgressEvent">ProgressEvent class</a>
readonly attribute int <b>total</b>
readonly attribute int <b>loaded</b>
readonly attribute bool <b>lengthComputable</b></code></pre>

<h3>LocalServer</h3>
<p>Caches and serves your application's resources locally, making it possible to start a web application without a network connection. </p>
<pre><code><a href="api_localserver.html" class="section">LocalServer class</a>
boolean <b>canServeLocally</b>(url)
ResourceStore <b>createStore</b>(name, [requiredCookie])
ResourceStore <b>openStore</b>(name, [requiredCookie])
void <b>removeStore</b>(name, [requiredCookie])
ManagedResourceStore <b>createManagedStore</b>(name, [requiredCookie])
ManagedResourceStore <b>openManagedStore</b>(name, [requiredCookie])
void <b>removeManagedStore</b>(name, [requiredCookie])</code></pre>

<pre><code><a href="api_localserver.html#ManagedResourceStore">ManagedResourceStore class</a>
readonly attribute string <b>name</b>
readonly attribute string <b>requiredCookie</b>
readwrite attribute boolean <b>enabled</b>
readwrite attribute string <b>manifestUrl</b>
readonly attribute int <b>lastUpdateCheckTime</b>
readonly attribute int <b>updateStatus</b>
readonly attribute string <b>lastErrorMessage</b>
readonly attribute string <b>currentVersion</b>
event void <b>oncomplete</b>(Object details)
event void <b>onerror</b>(Error error)
event void <b>onprogress</b>(Object details)
void <b>checkForUpdate</b>()</code></pre>

<pre><code><a href="api_localserver.html#ResourceStore">ResourceStore class</a>
readonly attribute string <b>name</b>
readonly attribute string <b>requiredCookie</b>
readwrite attribute boolean <b>enabled</b>
int <b>capture</b>(urlOrUrlArray, callback)
void <b>abortCapture</b>(captureId)
void <b>remove</b>(url)
void <b>rename</b>(srcUrl, destUrl)
void <b>copy</b>(srcUrl, destUrl)
boolean <b>isCaptured</b>(url)
void <b>captureBlob</b>(blob, url, [contentType])
void <b>captureFile</b>(fileInputElement, url)
Blob <b>getAsBlob</b>(url)
string <b>getCapturedFileName</b>(url)
string <b>getHeader</b>(url, name)
string <b>getAllHeaders</b>(url)
FileSubmitter <b>createFileSubmitter()</b></code></pre>

<pre><code><a href="api_localserver.html#FileSubmitter">FileSubmitter class</a>
void <b>setFileInputElement</b>(htmlElement, url)</code></pre>

<h3>Timer</h3>
<p>Provides a timer that can be used in workers, as well as on the main page.</p>
<pre><code><a href="api_timer.html">Timer class</a>
int <b>setTimeout</b>(function, delay)
int <b>setTimeout</b>(fullScript, delay)
int <b>setInterval</b>(function, delay)
int <b>setInterval</b>(fullScript, delay)
void <b>clearTimeout</b>(timeoutId)
void <b>clearInterval</b>(intervalId)</code></pre>

<h3>WorkerPool</h3>
<p>Provides the ability to run JavaScript code asynchronously.</p>

<pre><code><a href="api_workerpool.html">WorkerPool class</a>
callback <b>onmessage</b>(messageText, senderId, [messageObject:{text,sender,origin}])
callback <b>onerror</b>(errorObject:{message})
int <b>createWorker</b>(scriptText)
int <b>createWorkerFromUrl</b>(scriptUrl)
void <b>sendMessage</b>(messageText, destWorkerId)
void <b>allowCrossOrigin</b>()</code></pre>


</div>
</body>
</html>
Show details Hide details

Change log

r3355 by gears.daemon on Jun 10, 2009   Diff
[Author: nigeltao]

SDK documentation update for 0.5.21.

PRESUBMIT=passed
R=aa
CC=jonc,gears-eng@googlegroups.com
APPROVED=michaeln
DELTA=533  (527 added, 0 deleted, 6
changed)
OCL=11293032
SCL=11465525
Go to: 
Project members, sign in to write a code review

Older revisions

r3163 by gears.daemon on Jan 15, 2009   Diff
[Author: steveblock]

Adds documentation for Geolocation
position.coords

...
r3118 by gears.daemon on Dec 16, 2008   Diff
[Author: steveblock]

Adds maximumAge option to Geolocation
API.
Also disallows empty string for
...
r3089 by gears.daemon on Dec 05, 2008   Diff
[Author: steveblock]

Updates api_summary.html with latest
changes to Geolocation API.

...
All revisions of this file

File info

Size: 11416 bytes, 264 lines

File properties

svn:mime-type
text/html
Hosted by Google Code