blob: 992af791aaa95b6e4efc82bc50a51e3f295c41e0 [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
Shuzhen Wang16c73e42022-06-13 09:42:11 -0700137 # Work around html links with inner classes.
138 target = target.replace('CaptureRequest/Builder', 'CaptureRequest.Builder')
139 target = target.replace('Build/VERSION', 'Build.VERSION')
140
Eino-Ville Talvaladdda2bb2015-04-16 13:49:52 -0700141 return '<a href="https://developer.android.com/reference/%s">%s</a>' % (target, shortname)
142
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -0800143 # Render as markdown, and do HTML-doc-specific rewrites
144 def md_html(text):
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -0800145 return md(text, IMAGE_SRC_METADATA)
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800146
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800147 # linkify tag names such as "android.x.y.z" into html anchors
148 def linkify_tags(metadata):
149 def linkify_filter(text):
Eino-Ville Talvaladdda2bb2015-04-16 13:49:52 -0700150 tagged_text = filter_tags(text, metadata, html_anchor)
151 return filter_links(tagged_text, html_link)
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800152 return linkify_filter
153
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800154 # Number of rows an entry will span
155 def entry_cols(prop):
156 cols = 1
157 if prop.details: cols = cols + 2
158 if prop.hal_details: cols = cols + 2
159 return cols
Igor Murashkin617da162012-11-29 13:35:15 -0800160%>
161
Igor Murashkin617da162012-11-29 13:35:15 -0800162<body>
Eino-Ville Talvala42165c22014-03-25 15:20:16 -0700163 <h1>Android Camera HAL3.2 Properties</h1>
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700164\
165<%def name="insert_toc_body(node)">
166 % for nested in node.namespaces:
167${ insert_toc_body(nested)}
168 % endfor
169 % for entry in node.merged_entries:
Igor Murashkin6c936c12014-05-13 14:51:49 -0700170 <li
171 % if entry.deprecated:
172 class="toc_deprecated"
173 % endif
174 >${html_anchor(entry)}</li>
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700175 % endfor
176</%def>
Igor Murashkin617da162012-11-29 13:35:15 -0800177
178 <h2>Table of Contents</h2>
179 <ul class="toc">
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700180 <li><a href="#tag_index" class="toc_section_header">Tags</a></li>
181% for root in metadata.outer_namespaces:
182 % for section in root.sections:
183 <li>
184 <span class="toc_section_header"><a href="#section_${section.name}">${section.name}</a></span>
185 <ul class="toc_section">
186 % for kind in section.merged_kinds: # dynamic,static,controls
187 <li>
188 <span class="toc_kind_header">${kind.name}</span>
189 <ul class="toc_section">\
190${ insert_toc_body(kind)}\
191 </ul>
192 </li>
Igor Murashkin617da162012-11-29 13:35:15 -0800193 % endfor
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700194 </ul> <!-- toc_section -->
195 </li>
196 % endfor
197% endfor
Igor Murashkin617da162012-11-29 13:35:15 -0800198 </ul>
199
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700200
Igor Murashkin617da162012-11-29 13:35:15 -0800201 <h1>Properties</h1>
202 <table class="properties">
203
204 <thead class="thead_dummy">
205 <tr>
206 <th class="th_name">Property Name</th>
207 <th class="th_type">Type</th>
208 <th class="th_description">Description</th>
209 <th class="th_units">Units</th>
210 <th class="th_range">Range</th>
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800211 <th class="th_hal_version">HIDL HAL version</th>
Igor Murashkin617da162012-11-29 13:35:15 -0800212 <th class="th_tags">Tags</th>
213 </tr>
214 </thead> <!-- so that the first occurrence of thead is not
215 above the first occurrence of tr -->
216% for root in metadata.outer_namespaces:
217<!-- <namespace name="${root.name}"> -->
218 % for section in root.sections:
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800219 <tr><td colspan="7" id="section_${section.name}" class="section">${section.name}</td></tr>
Igor Murashkin617da162012-11-29 13:35:15 -0800220
221 % if section.description is not None:
222 <tr class="description"><td>${section.description}</td></tr>
223 % endif
224
Igor Murashkin5804a482012-12-05 13:06:59 -0800225 % for kind in section.merged_kinds: # dynamic,static,controls
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800226 <tr><td colspan="7" class="kind">${kind.name}</td></tr>
Igor Murashkin617da162012-11-29 13:35:15 -0800227
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700228 <thead class="entries_header">
Igor Murashkin617da162012-11-29 13:35:15 -0800229 <tr>
230 <th class="th_name">Property Name</th>
231 <th class="th_type">Type</th>
232 <th class="th_description">Description</th>
233 <th class="th_units">Units</th>
234 <th class="th_range">Range</th>
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800235 <th class="th_hal_version">Initial HIDL HAL version</th>
Igor Murashkin617da162012-11-29 13:35:15 -0800236 <th class="th_tags">Tags</th>
237 </tr>
238 </thead>
239
240 <tbody>
241
242 <%def name="insert_body(node)">
243 % for nested in node.namespaces:
244 ${insert_namespace(nested)}
245 % endfor
246
247 % for entry in node.merged_entries:
248 ${insert_entry(entry)}
249 % endfor
250 </%def>
251
252 <%def name="insert_namespace(namespace)">
253 ${insert_body(namespace)}
254 </%def>
255
256 <%def name="insert_entry(prop)">
Igor Murashkin617da162012-11-29 13:35:15 -0800257 <tr class="entry" id="${prop.kind}_${prop.name}">
Igor Murashkin6c936c12014-05-13 14:51:49 -0700258 <td class="entry_name
259 % if prop.deprecated:
260 entry_name_deprecated
261 % endif
262 " rowspan="${entry_cols(prop)}">
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800263 ${prop.name | wbr}
264 </td>
Igor Murashkin617da162012-11-29 13:35:15 -0800265 <td class="entry_type">
Igor Murashkinb556bc42012-12-04 16:07:21 -0800266 % if prop.enum:
267 <span class="entry_type_name entry_type_name_enum">${prop.type}</span>
268 % else:
269 <span class="entry_type_name">${prop.type}</span>
270 % endif
Igor Murashkin617da162012-11-29 13:35:15 -0800271 % if prop.container is not None:
272 <span class="entry_type_container">x</span>
273 % endif
274
275 % if prop.container == 'array':
276 <span class="entry_type_array">
277 ${" x ".join(prop.container_sizes)}
278 </span>
279 % elif prop.container == 'tuple':
280 <ul class="entry_type_tuple">
281 % for val in prop.tuple_values:
282 <li>${val}</li>
283 % endfor
284 </ul>
285 % endif
Igor Murashkinb8dc8812013-07-17 16:29:34 -0700286 <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 -0700287
288 % if prop.synthetic:
289 <span class="entry_type_synthetic">[synthetic] </span>
290 % endif
291
Igor Murashkinca256272014-10-02 15:27:09 -0700292 % if prop.hwlevel:
293 <span class="entry_type_hwlevel">[${prop.hwlevel}] </span>
294 % endif
295
Igor Murashkin6c936c12014-05-13 14:51:49 -0700296 % if prop.deprecated:
297 <span class="entry_type_deprecated">[deprecated] </span>
298 % endif
299
Igor Murashkin617da162012-11-29 13:35:15 -0800300 % if prop.type_notes is not None:
301 <div class="entry_type_notes">${prop.type_notes | wbr}</div>
302 % endif
303
Igor Murashkinb556bc42012-12-04 16:07:21 -0800304 % if prop.enum:
Igor Murashkin617da162012-11-29 13:35:15 -0800305 <ul class="entry_type_enum">
306 % for value in prop.enum.values:
307 <li>
Eino-Ville Talvala63674ff2017-12-07 13:06:05 -0800308 <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 -0700309 % if value.deprecated:
310 <span class="entry_type_enum_deprecated">[deprecated]</span>
311 % endif:
Igor Murashkin617da162012-11-29 13:35:15 -0800312 % if value.optional:
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700313 <span class="entry_type_enum_optional">[optional]</span>
314 % endif:
Eino-Ville Talvala805661a2021-05-27 14:43:59 -0700315 % if value.applied_visibility != 'public':
316 <span class="entry_type_enum_hidden">[${value.visibility}]</span>
Igor Murashkin617da162012-11-29 13:35:15 -0800317 % endif:
318 % if value.id is not None:
319 <span class="entry_type_enum_value">${value.id}</span>
320 % endif
321 % if value.notes is not None:
Igor Murashkina10351a2014-01-15 17:05:22 -0800322 <span class="entry_type_enum_notes">${value.notes | md_html, linkify_tags(metadata), wbr}</span>
Igor Murashkin617da162012-11-29 13:35:15 -0800323 % endif
324 </li>
325 % endfor
326 </ul>
327 % endif
328
329 </td> <!-- entry_type -->
330
331 <td class="entry_description">
332 % if prop.description is not None:
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800333 ${prop.description | md_html, linkify_tags(metadata), wbr}
Igor Murashkin617da162012-11-29 13:35:15 -0800334 % endif
335 </td>
336
337 <td class="entry_units">
338 % if prop.units is not None:
339 ${prop.units | wbr}
340 % endif
341 </td>
342
343 <td class="entry_range">
Igor Murashkin6c936c12014-05-13 14:51:49 -0700344 % if prop.deprecated:
345 <p><span class="entry_range_deprecated">Deprecated</span>. Do not use.</p>
346 % endif
Igor Murashkin617da162012-11-29 13:35:15 -0800347 % if prop.range is not None:
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800348 ${prop.range | md_html, linkify_tags(metadata), wbr}
Igor Murashkin617da162012-11-29 13:35:15 -0800349 % endif
350 </td>
351
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800352 <td class="entry_hal_version">
Eino-Ville Talvaladafa6532017-11-17 14:48:20 -0800353 ${"%d.%d" % (prop.hal_major_version, prop.hal_minor_version) | md_html, linkify_tags(metadata), wbr}
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800354 </td>
355
Igor Murashkin617da162012-11-29 13:35:15 -0800356 <td class="entry_tags">
Igor Murashkinbaacf9a2012-12-05 14:49:11 -0800357 % if next(prop.tags, None):
Igor Murashkin617da162012-11-29 13:35:15 -0800358 <ul class="entry_tags">
359 % for tag in prop.tags:
360 <li><a href="#tag_${tag.id}">${tag.id}</a></li>
361 % endfor
362 </ul>
363 % endif
364 </td>
365
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800366 </tr>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800367 % if prop.details is not None:
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800368 <tr class="entries_header">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800369 <th class="th_details" colspan="6">Details</th>
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800370 </tr>
371 <tr class="entry_cont">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800372 <td class="entry_details" colspan="6">
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800373 ${prop.details | md_html, linkify_tags(metadata), wbr}
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800374 </td>
375 </tr>
376 % endif
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800377
378 % if prop.hal_details is not None:
379 <tr class="entries_header">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800380 <th class="th_details" colspan="6">HAL Implementation Details</th>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800381 </tr>
382 <tr class="entry_cont">
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800383 <td class="entry_details" colspan="6">
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800384 ${prop.hal_details | md_html, linkify_tags(metadata), wbr}
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800385 </td>
386 </tr>
387 % endif
388
Eino-Ville Talvala0d404952017-11-10 15:13:04 -0800389 <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
Eino-Ville Talvala8eb70052013-12-26 12:06:13 -0800390 <!-- end of entry -->
Igor Murashkin617da162012-11-29 13:35:15 -0800391 </%def>
392
393 ${insert_body(kind)}
394
395 <!-- end of kind -->
396 </tbody>
397 % endfor # for each kind
398
399 <!-- end of section -->
400 % endfor
401<!-- </namespace> -->
402% endfor
403 </table>
404
405 <div class="tags" id="tag_index">
406 <h2>Tags</h2>
407 <ul>
408 % for tag in metadata.tags:
409 <li id="tag_${tag.id}">${tag.id} - ${tag.description}
410 <ul class="tags_entries">
411 % for prop in tag.entries:
Eino-Ville Talvala63c0fb22014-01-02 16:11:44 -0800412 <li>${html_anchor(prop)} (${prop.kind})</li>
Igor Murashkin617da162012-11-29 13:35:15 -0800413 % endfor
414 </ul>
415 </li> <!-- tag_${tag.id} -->
416 % endfor
417 </ul>
418 </div>
419
420 [ <a href="#">top</a> ]
421
422</body>
423</html>