blob: 3ba191bb09998702d5cc612fe049e11fbe2d5175 [file] [log] [blame]
Igor Murashkin617da162012-11-29 13:35:15 -08001## -*- coding: utf-8 -*-
2<!DOCTYPE html>
3<html>
4<!-- Copyright (C) 2012 The Android Open Source Project
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17-->
18<head>
Igor Murashkin6ad61d42012-11-21 09:44:05 -080019 <!-- automatically generated from html.mako. do NOT edit directly -->
Igor Murashkin617da162012-11-29 13:35:15 -080020 <meta charset="utf-8" />
Eino-Ville Talvala04778542016-03-24 14:38:29 -070021 <title>Android Camera HAL3.4 Properties</title>
Igor Murashkin617da162012-11-29 13:35:15 -080022 <style type="text/css">
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -070023 body { background-color: #f7f7f7; font-family: Roboto, sans-serif;}
24 h1 { color: #333333; }
25 h2 { color: #333333; }
26 a:link { color: #258aaf; text-decoration: none}
27 a:hover { color: #459aaf; text-decoration: underline }
28 a:visited { color: #154a5f; text-decoration: none}
29 .section { color: #eeeeee; font-size: 1.5em; font-weight: bold; background-color: #888888; padding: 0.5em 0em 0.5em 0.5em; border-width: thick thin thin thin; border-color: #111111 #777777 #777777 #777777}
30 .kind { color: #eeeeee; font-size: 1.2em; font-weight: bold; padding-left: 1.5em; background-color: #aaaaaa }
31 .entry { background-color: #f0f0f0 }
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -080032 .entry_cont { background-color: #f0f0f0 }
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -070033 .entries_header { background-color: #dddddd; text-align: center}
34
35 /* toc style */
36 .toc_section_header { font-size:1.3em; }
37 .toc_kind_header { font-size:1.2em; }
Igor Murashkin6c936c12014-05-13 14:51:49 -070038 .toc_deprecated { text-decoration:line-through; }
Igor Murashkin617da162012-11-29 13:35:15 -080039
40 /* table column sizes */
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -070041 table { border-collapse:collapse; table-layout: fixed; width: 100%; word-wrap: break-word }
42 td,th { border: 1px solid; border-color: #aaaaaa; padding-left: 0.5em; padding-right: 0.5em }
Igor Murashkin617da162012-11-29 13:35:15 -080043 .th_name { width: 20% }
44 .th_units { width: 10% }
45 .th_tags { width: 5% }
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -080046 .th_details { width: 25% }
Eino-Ville Talvala0d404952017-11-10 15:13:04 -080047 .th_type { width: 17% }
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -070048 .th_description { width: 20% }
Eino-Ville Talvala0d404952017-11-10 15:13:04 -080049 .th_range { width: 8% }
50 .th_hal_version { width: 5% }
Igor Murashkin617da162012-11-29 13:35:15 -080051 td { font-size: 0.9em; }
52
53 /* hide the first thead, we need it there only to enforce column sizes */
54 .thead_dummy { visibility: hidden; }
55
56 /* Entry flair */
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -080057 .entry_name { color: #333333; padding-left:1.0em; font-size:1.1em; font-family: monospace; vertical-align:top; }
Igor Murashkin6c936c12014-05-13 14:51:49 -070058 .entry_name_deprecated { text-decoration:line-through; }
Igor Murashkin617da162012-11-29 13:35:15 -080059
60 /* Entry type flair */
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -070061 .entry_type_name { font-size:1.1em; color: #669900; font-weight: bold;}
62 .entry_type_name_enum:after { color: #669900; font-weight: bold; content:" (enum)" }
63 .entry_type_visibility { font-weight: bolder; padding-left:1em}
Igor Murashkin6c936c12014-05-13 14:51:49 -070064 .entry_type_synthetic { font-weight: bolder; color: #996600; }
Igor Murashkinca256272014-10-02 15:27:09 -070065 .entry_type_hwlevel { font-weight: bolder; color: #000066; }
Igor Murashkin6c936c12014-05-13 14:51:49 -070066 .entry_type_deprecated { font-weight: bolder; color: #4D4D4D; }
Igor Murashkin617da162012-11-29 13:35:15 -080067 .entry_type_enum_name { font-family: monospace; font-weight: bolder; }
68 .entry_type_enum_notes:before { content:" - " }
Igor Murashkina10351a2014-01-15 17:05:22 -080069 .entry_type_enum_notes>p:first-child { display:inline; }
Igor Murashkin617da162012-11-29 13:35:15 -080070 .entry_type_enum_value:before { content:" = " }
71 .entry_type_enum_value { font-family: monospace; }
72 .entry ul { margin: 0 0 0 0; list-style-position: inside; padding-left: 0.5em; }
73 .entry ul li { padding: 0 0 0 0; margin: 0 0 0 0;}
Igor Murashkin6c936c12014-05-13 14:51:49 -070074 .entry_range_deprecated { font-weight: bolder; }
Igor Murashkin617da162012-11-29 13:35:15 -080075
76 /* Entry tags flair */
77 .entry_tags ul { list-style-type: none; }
78
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -080079 /* Entry details (full docs) flair */
80 .entry_details_header { font-weight: bold; background-color: #dddddd;
81 text-align: center; font-size: 1.1em; margin-left: 0em; margin-right: 0em; }
82
83 /* Entry spacer flair */
84 .entry_spacer { background-color: transparent; border-style: none; height: 0.5em; }
Igor Murashkin617da162012-11-29 13:35:15 -080085
86 /* TODO: generate abbr element for each tag link? */
87 /* TODO for each x.y.z try to link it to the entry */
88
89 </style>
Igor Murashkin6ad61d42012-11-21 09:44:05 -080090
91 <style>
92
93 {
94 /* broken...
95 supposedly there is a bug in chrome that it lays out tables before
96 it knows its being printed, so the page-break-* styles are ignored
97 */
98 tr { page-break-after: always; page-break-inside: avoid; }
99 }
100
101 </style>
Igor Murashkin617da162012-11-29 13:35:15 -0800102</head>
103
104<%!
Igor Murashkinc469f7d2013-04-23 14:31:02 -0700105 import re
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -0800106 from metadata_helpers import md
107 from metadata_helpers import IMAGE_SRC_METADATA
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800108 from metadata_helpers import filter_tags
Eino-Ville Talvaladdda2bb2015-04-16 13:49:52 -0700109 from metadata_helpers import filter_links
Igor Murashkin0b080452013-12-27 15:30:25 -0800110 from metadata_helpers import wbr
Igor Murashkinc469f7d2013-04-23 14:31:02 -0700111
112 # insert line breaks after every two \n\n
113 def br(text):
114 return re.sub(r"(\r?\n)(\r?\n)", r"\1<br>\2<br>", text)
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -0800115
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800116 # Convert node name "x.y.z" of kind w to an HTML anchor of form
117 # <a href="#w_x.y.z">x.y.z</a>
118 def html_anchor(node):
119 return '<a href="#%s_%s">%s</a>' % (node.kind, node.name, node.name)
120
Eino-Ville Talvaladdda2bb2015-04-16 13:49:52 -0700121 # Convert target "xxx.yyy#zzz" to a HTML reference to Android public developer
122 # docs with link name from shortname.
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800123 def html_link(target, target_ndk, shortname):
Eino-Ville Talvaladdda2bb2015-04-16 13:49:52 -0700124 if shortname == '':
125 lastdot = target.rfind('.')
126 if lastdot == -1:
127 shortname = target
128 else:
129 shortname = target[lastdot + 1:]
130
131 target = target.replace('.','/')
132 if target.find('#') != -1:
133 target = target.replace('#','.html#')
134 else:
135 target = target + '.html'
136
137 return '<a href="https://developer.android.com/reference/%s">%s</a>' % (target, shortname)
138
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -0800139 # Render as markdown, and do HTML-doc-specific rewrites
140 def md_html(text):
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -0800141 return md(text, IMAGE_SRC_METADATA)
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800142
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800143 # linkify tag names such as "android.x.y.z" into html anchors
144 def linkify_tags(metadata):
145 def linkify_filter(text):
Eino-Ville Talvaladdda2bb2015-04-16 13:49:52 -0700146 tagged_text = filter_tags(text, metadata, html_anchor)
147 return filter_links(tagged_text, html_link)
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800148 return linkify_filter
149
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800150 # Number of rows an entry will span
151 def entry_cols(prop):
152 cols = 1
153 if prop.details: cols = cols + 2
154 if prop.hal_details: cols = cols + 2
155 return cols
Igor Murashkin617da162012-11-29 13:35:15 -0800156%>
157
Igor Murashkin617da162012-11-29 13:35:15 -0800158<body>
Eino-Ville Talvala42165c22014-03-25 15:20:16 -0700159 <h1>Android Camera HAL3.2 Properties</h1>
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700160\
161<%def name="insert_toc_body(node)">
162 % for nested in node.namespaces:
163${ insert_toc_body(nested)}
164 % endfor
165 % for entry in node.merged_entries:
Igor Murashkin6c936c12014-05-13 14:51:49 -0700166 <li
167 % if entry.deprecated:
168 class="toc_deprecated"
169 % endif
170 >${html_anchor(entry)}</li>
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700171 % endfor
172</%def>
Igor Murashkin617da162012-11-29 13:35:15 -0800173
174 <h2>Table of Contents</h2>
175 <ul class="toc">
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700176 <li><a href="#tag_index" class="toc_section_header">Tags</a></li>
177% for root in metadata.outer_namespaces:
178 % for section in root.sections:
179 <li>
180 <span class="toc_section_header"><a href="#section_${section.name}">${section.name}</a></span>
181 <ul class="toc_section">
182 % for kind in section.merged_kinds: # dynamic,static,controls
183 <li>
184 <span class="toc_kind_header">${kind.name}</span>
185 <ul class="toc_section">\
186${ insert_toc_body(kind)}\
187 </ul>
188 </li>
Igor Murashkin617da162012-11-29 13:35:15 -0800189 % endfor
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700190 </ul> <!-- toc_section -->
191 </li>
192 % endfor
193% endfor
Igor Murashkin617da162012-11-29 13:35:15 -0800194 </ul>
195
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700196
Igor Murashkin617da162012-11-29 13:35:15 -0800197 <h1>Properties</h1>
198 <table class="properties">
199
200 <thead class="thead_dummy">
201 <tr>
202 <th class="th_name">Property Name</th>
203 <th class="th_type">Type</th>
204 <th class="th_description">Description</th>
205 <th class="th_units">Units</th>
206 <th class="th_range">Range</th>
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800207 <th class="th_hal_version">HIDL HAL version</th>
Igor Murashkin617da162012-11-29 13:35:15 -0800208 <th class="th_tags">Tags</th>
209 </tr>
210 </thead> <!-- so that the first occurrence of thead is not
211 above the first occurrence of tr -->
212% for root in metadata.outer_namespaces:
213<!-- <namespace name="${root.name}"> -->
214 % for section in root.sections:
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800215 <tr><td colspan="7" id="section_${section.name}" class="section">${section.name}</td></tr>
Igor Murashkin617da162012-11-29 13:35:15 -0800216
217 % if section.description is not None:
218 <tr class="description"><td>${section.description}</td></tr>
219 % endif
220
Igor Murashkin5804a482012-12-05 13:06:59 -0800221 % for kind in section.merged_kinds: # dynamic,static,controls
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800222 <tr><td colspan="7" class="kind">${kind.name}</td></tr>
Igor Murashkin617da162012-11-29 13:35:15 -0800223
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700224 <thead class="entries_header">
Igor Murashkin617da162012-11-29 13:35:15 -0800225 <tr>
226 <th class="th_name">Property Name</th>
227 <th class="th_type">Type</th>
228 <th class="th_description">Description</th>
229 <th class="th_units">Units</th>
230 <th class="th_range">Range</th>
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800231 <th class="th_hal_version">Initial HIDL HAL version</th>
Igor Murashkin617da162012-11-29 13:35:15 -0800232 <th class="th_tags">Tags</th>
233 </tr>
234 </thead>
235
236 <tbody>
237
238 <%def name="insert_body(node)">
239 % for nested in node.namespaces:
240 ${insert_namespace(nested)}
241 % endfor
242
243 % for entry in node.merged_entries:
244 ${insert_entry(entry)}
245 % endfor
246 </%def>
247
248 <%def name="insert_namespace(namespace)">
249 ${insert_body(namespace)}
250 </%def>
251
252 <%def name="insert_entry(prop)">
Igor Murashkin617da162012-11-29 13:35:15 -0800253 <tr class="entry" id="${prop.kind}_${prop.name}">
Igor Murashkin6c936c12014-05-13 14:51:49 -0700254 <td class="entry_name
255 % if prop.deprecated:
256 entry_name_deprecated
257 % endif
258 " rowspan="${entry_cols(prop)}">
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800259 ${prop.name | wbr}
260 </td>
Igor Murashkin617da162012-11-29 13:35:15 -0800261 <td class="entry_type">
Igor Murashkinb556bc42012-12-04 16:07:21 -0800262 % if prop.enum:
263 <span class="entry_type_name entry_type_name_enum">${prop.type}</span>
264 % else:
265 <span class="entry_type_name">${prop.type}</span>
266 % endif
Igor Murashkin617da162012-11-29 13:35:15 -0800267 % if prop.container is not None:
268 <span class="entry_type_container">x</span>
269 % endif
270
271 % if prop.container == 'array':
272 <span class="entry_type_array">
273 ${" x ".join(prop.container_sizes)}
274 </span>
275 % elif prop.container == 'tuple':
276 <ul class="entry_type_tuple">
277 % for val in prop.tuple_values:
278 <li>${val}</li>
279 % endfor
280 </ul>
281 % endif
Igor Murashkinb8dc8812013-07-17 16:29:34 -0700282 <span class="entry_type_visibility"> [${prop.applied_visibility}${" as %s" %prop.typedef.name if prop.typedef else ""}]</span>
Igor Murashkin6c936c12014-05-13 14:51:49 -0700283
284 % if prop.synthetic:
285 <span class="entry_type_synthetic">[synthetic] </span>
286 % endif
287
Igor Murashkinca256272014-10-02 15:27:09 -0700288 % if prop.hwlevel:
289 <span class="entry_type_hwlevel">[${prop.hwlevel}] </span>
290 % endif
291
Igor Murashkin6c936c12014-05-13 14:51:49 -0700292 % if prop.deprecated:
293 <span class="entry_type_deprecated">[deprecated] </span>
294 % endif
295
Igor Murashkin617da162012-11-29 13:35:15 -0800296 % if prop.type_notes is not None:
297 <div class="entry_type_notes">${prop.type_notes | wbr}</div>
298 % endif
299
Igor Murashkinb556bc42012-12-04 16:07:21 -0800300 % if prop.enum:
Igor Murashkin617da162012-11-29 13:35:15 -0800301 <ul class="entry_type_enum">
302 % for value in prop.enum.values:
303 <li>
Eino-Ville Talvala63674ff2017-12-07 13:06:05 -0800304 <span class="entry_type_enum_name">${value.name} (v${value.hal_major_version}.${value.hal_minor_version})</span>
Zhijun He7defc682015-05-22 17:04:15 -0700305 % if value.deprecated:
306 <span class="entry_type_enum_deprecated">[deprecated]</span>
307 % endif:
Igor Murashkin617da162012-11-29 13:35:15 -0800308 % if value.optional:
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700309 <span class="entry_type_enum_optional">[optional]</span>
310 % endif:
311 % if value.hidden:
Zhijun He7defc682015-05-22 17:04:15 -0700312 <span class="entry_type_enum_hidden">[hidden]</span>
Igor Murashkin617da162012-11-29 13:35:15 -0800313 % endif:
314 % if value.id is not None:
315 <span class="entry_type_enum_value">${value.id}</span>
316 % endif
317 % if value.notes is not None:
Igor Murashkina10351a2014-01-15 17:05:22 -0800318 <span class="entry_type_enum_notes">${value.notes | md_html, linkify_tags(metadata), wbr}</span>
Igor Murashkin617da162012-11-29 13:35:15 -0800319 % endif
320 </li>
321 % endfor
322 </ul>
323 % endif
324
325 </td> <!-- entry_type -->
326
327 <td class="entry_description">
328 % if prop.description is not None:
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800329 ${prop.description | md_html, linkify_tags(metadata), wbr}
Igor Murashkin617da162012-11-29 13:35:15 -0800330 % endif
331 </td>
332
333 <td class="entry_units">
334 % if prop.units is not None:
335 ${prop.units | wbr}
336 % endif
337 </td>
338
339 <td class="entry_range">
Igor Murashkin6c936c12014-05-13 14:51:49 -0700340 % if prop.deprecated:
341 <p><span class="entry_range_deprecated">Deprecated</span>. Do not use.</p>
342 % endif
Igor Murashkin617da162012-11-29 13:35:15 -0800343 % if prop.range is not None:
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800344 ${prop.range | md_html, linkify_tags(metadata), wbr}
Igor Murashkin617da162012-11-29 13:35:15 -0800345 % endif
346 </td>
347
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800348 <td class="entry_hal_version">
Eino-Ville Talvaladafa6532017-11-17 14:48:20 -0800349 ${"%d.%d" % (prop.hal_major_version, prop.hal_minor_version) | md_html, linkify_tags(metadata), wbr}
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800350 </td>
351
Igor Murashkin617da162012-11-29 13:35:15 -0800352 <td class="entry_tags">
Igor Murashkinbaacf9a2012-12-05 14:49:11 -0800353 % if next(prop.tags, None):
Igor Murashkin617da162012-11-29 13:35:15 -0800354 <ul class="entry_tags">
355 % for tag in prop.tags:
356 <li><a href="#tag_${tag.id}">${tag.id}</a></li>
357 % endfor
358 </ul>
359 % endif
360 </td>
361
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800362 </tr>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800363 % if prop.details is not None:
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800364 <tr class="entries_header">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800365 <th class="th_details" colspan="6">Details</th>
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800366 </tr>
367 <tr class="entry_cont">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800368 <td class="entry_details" colspan="6">
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800369 ${prop.details | md_html, linkify_tags(metadata), wbr}
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800370 </td>
371 </tr>
372 % endif
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800373
374 % if prop.hal_details is not None:
375 <tr class="entries_header">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800376 <th class="th_details" colspan="6">HAL Implementation Details</th>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800377 </tr>
378 <tr class="entry_cont">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800379 <td class="entry_details" colspan="6">
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800380 ${prop.hal_details | md_html, linkify_tags(metadata), wbr}
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800381 </td>
382 </tr>
383 % endif
384
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800385 <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800386 <!-- end of entry -->
Igor Murashkin617da162012-11-29 13:35:15 -0800387 </%def>
388
389 ${insert_body(kind)}
390
391 <!-- end of kind -->
392 </tbody>
393 % endfor # for each kind
394
395 <!-- end of section -->
396 % endfor
397<!-- </namespace> -->
398% endfor
399 </table>
400
401 <div class="tags" id="tag_index">
402 <h2>Tags</h2>
403 <ul>
404 % for tag in metadata.tags:
405 <li id="tag_${tag.id}">${tag.id} - ${tag.description}
406 <ul class="tags_entries">
407 % for prop in tag.entries:
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800408 <li>${html_anchor(prop)} (${prop.kind})</li>
Igor Murashkin617da162012-11-29 13:35:15 -0800409 % endfor
410 </ul>
411 </li> <!-- tag_${tag.id} -->
412 % endfor
413 </ul>
414 </div>
415
416 [ <a href="#">top</a> ]
417
418</body>
419</html>