summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmds/atrace/atrace.cpp24
-rw-r--r--cmds/dumpstate/dumpstate.c32
-rw-r--r--data/etc/android.hardware.audio.pro.xml22
-rw-r--r--docs/Doxyfile1902
-rw-r--r--docs/Makefile13
-rw-r--r--docs/footer.jd0
-rw-r--r--docs/header.jd3
-rw-r--r--include/android/asset_manager.h42
-rw-r--r--include/android/asset_manager_jni.h10
-rw-r--r--include/android/bitmap.h46
-rw-r--r--include/android/configuration.h312
-rw-r--r--include/android/input.h850
-rw-r--r--include/android/keycodes.h435
-rw-r--r--include/android/looper.h35
-rw-r--r--include/android/native_activity.h52
-rw-r--r--include/android/native_window.h36
-rw-r--r--include/android/native_window_jni.h11
-rw-r--r--include/android/obb.h13
-rw-r--r--include/android/rect.h21
-rw-r--r--include/android/sensor.h147
-rw-r--r--include/android/storage_manager.h43
-rw-r--r--include/android/window.h166
-rw-r--r--include/batteryservice/BatteryService.h1
-rw-r--r--include/gui/SensorManager.h53
-rw-r--r--include/input/InputEventLabels.h5
-rw-r--r--include/ui/DisplayInfo.h1
-rw-r--r--libs/binder/ProcessState.cpp7
-rw-r--r--libs/gui/IGraphicBufferProducer.cpp6
-rw-r--r--libs/gui/Sensor.cpp4
-rw-r--r--libs/gui/SensorManager.cpp72
-rw-r--r--libs/input/InputTransport.cpp13
-rw-r--r--services/batteryservice/BatteryProperties.cpp2
-rw-r--r--services/inputflinger/InputReader.cpp6
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp27
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.h1
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp53
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h1
-rw-r--r--services/surfaceflinger/surfaceflinger.rc1
38 files changed, 4087 insertions, 381 deletions
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index 3b4ccab15..3c9d899df 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -278,9 +278,27 @@ static bool appendStr(const char* filename, const char* str)
278static void writeClockSyncMarker() 278static void writeClockSyncMarker()
279{ 279{
280 char buffer[128]; 280 char buffer[128];
281 int len = 0;
282 int fd = open(k_traceMarkerPath, O_WRONLY);
283 if (fd == -1) {
284 fprintf(stderr, "error opening %s: %s (%d)\n", k_traceMarkerPath,
285 strerror(errno), errno);
286 return;
287 }
281 float now_in_seconds = systemTime(CLOCK_MONOTONIC) / 1000000000.0f; 288 float now_in_seconds = systemTime(CLOCK_MONOTONIC) / 1000000000.0f;
282 snprintf(buffer, 128, "trace_event_clock_sync: parent_ts=%f\n", now_in_seconds); 289
283 writeStr(k_traceMarkerPath, buffer); 290 len = snprintf(buffer, 128, "trace_event_clock_sync: parent_ts=%f\n", now_in_seconds);
291 if (write(fd, buffer, len) != len) {
292 fprintf(stderr, "error writing clock sync marker %s (%d)\n", strerror(errno), errno);
293 }
294
295 int64_t realtime_in_ms = systemTime(CLOCK_REALTIME) / 1000000;
296 len = snprintf(buffer, 128, "trace_event_clock_sync: realtime_ts=%" PRId64 "\n", realtime_in_ms);
297 if (write(fd, buffer, len) != len) {
298 fprintf(stderr, "error writing clock sync marker %s (%d)\n", strerror(errno), errno);
299 }
300
301 close(fd);
284} 302}
285 303
286// Enable or disable a kernel option by writing a "1" or a "0" into a /sys 304// Enable or disable a kernel option by writing a "1" or a "0" into a /sys
@@ -707,7 +725,6 @@ static bool startTrace()
707// Disable tracing in the kernel. 725// Disable tracing in the kernel.
708static void stopTrace() 726static void stopTrace()
709{ 727{
710 writeClockSyncMarker();
711 setTracingEnabled(false); 728 setTracingEnabled(false);
712} 729}
713 730
@@ -983,6 +1000,7 @@ int main(int argc, char **argv)
983 // another. 1000 // another.
984 ok = clearTrace(); 1001 ok = clearTrace();
985 1002
1003 writeClockSyncMarker();
986 if (ok && !async) { 1004 if (ok && !async) {
987 // Sleep to allow the trace to be captured. 1005 // Sleep to allow the trace to be captured.
988 struct timespec timeLeft; 1006 struct timespec timeLeft;
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 9a13499db..0a393fd91 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -47,6 +47,7 @@ static char screenshot_path[PATH_MAX] = "";
47 47
48#define PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops" 48#define PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops"
49 49
50#define RAFT_DIR "/data/misc/raft/"
50#define TOMBSTONE_DIR "/data/tombstones" 51#define TOMBSTONE_DIR "/data/tombstones"
51#define TOMBSTONE_FILE_PREFIX TOMBSTONE_DIR "/tombstone_" 52#define TOMBSTONE_FILE_PREFIX TOMBSTONE_DIR "/tombstone_"
52/* Can accomodate a tombstone number up to 9999. */ 53/* Can accomodate a tombstone number up to 9999. */
@@ -359,6 +360,9 @@ static void dumpstate() {
359 360
360 run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", NULL); 361 run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", NULL);
361 362
363 // raft disabled as per http://b/24159112
364 // run_command("RAFT LOGS", 300, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL);
365
362 /* show the traces we collected in main(), if that was done */ 366 /* show the traces we collected in main(), if that was done */
363 if (dump_traces_path != NULL) { 367 if (dump_traces_path != NULL) {
364 dump_file("VM TRACES JUST NOW", dump_traces_path); 368 dump_file("VM TRACES JUST NOW", dump_traces_path);
@@ -447,8 +451,6 @@ static void dumpstate() {
447 run_command("ARP CACHE", 10, "ip", "-4", "neigh", "show", NULL); 451 run_command("ARP CACHE", 10, "ip", "-4", "neigh", "show", NULL);
448 run_command("IPv6 ND CACHE", 10, "ip", "-6", "neigh", "show", NULL); 452 run_command("IPv6 ND CACHE", 10, "ip", "-6", "neigh", "show", NULL);
449 453
450 run_command("NETWORK DIAGNOSTICS", 10, "dumpsys", "connectivity", "--diag", NULL);
451
452 run_command("IPTABLES", 10, SU_PATH, "root", "iptables", "-L", "-nvx", NULL); 454 run_command("IPTABLES", 10, SU_PATH, "root", "iptables", "-L", "-nvx", NULL);
453 run_command("IP6TABLES", 10, SU_PATH, "root", "ip6tables", "-L", "-nvx", NULL); 455 run_command("IP6TABLES", 10, SU_PATH, "root", "ip6tables", "-L", "-nvx", NULL);
454 run_command("IPTABLE NAT", 10, SU_PATH, "root", "iptables", "-t", "nat", "-L", "-nvx", NULL); 456 run_command("IPTABLE NAT", 10, SU_PATH, "root", "iptables", "-t", "nat", "-L", "-nvx", NULL);
@@ -460,25 +462,29 @@ static void dumpstate() {
460 SU_PATH, "root", "wpa_cli", "IFNAME=wlan0", "list_networks", NULL); 462 SU_PATH, "root", "wpa_cli", "IFNAME=wlan0", "list_networks", NULL);
461 463
462#ifdef FWDUMP_bcmdhd 464#ifdef FWDUMP_bcmdhd
463 run_command("DUMP WIFI INTERNAL COUNTERS", 20, 465 run_command("ND OFFLOAD TABLE", 5,
466 SU_PATH, "root", "wlutil", "nd_hostip", NULL);
467
468 run_command("DUMP WIFI INTERNAL COUNTERS (1)", 20,
464 SU_PATH, "root", "wlutil", "counters", NULL); 469 SU_PATH, "root", "wlutil", "counters", NULL);
470
471 run_command("ND OFFLOAD STATUS (1)", 5,
472 SU_PATH, "root", "wlutil", "nd_status", NULL);
473
465#endif 474#endif
466 dump_file("INTERRUPTS (1)", "/proc/interrupts"); 475 dump_file("INTERRUPTS (1)", "/proc/interrupts");
467 476
468 property_get("dhcp.wlan0.gateway", network, ""); 477 run_command("NETWORK DIAGNOSTICS", 10, "dumpsys", "connectivity", "--diag", NULL);
469 if (network[0]) 478
470 run_command("PING GATEWAY", 10, "ping", "-c", "3", "-i", ".5", network, NULL);
471 property_get("dhcp.wlan0.dns1", network, "");
472 if (network[0])
473 run_command("PING DNS1", 10, "ping", "-c", "3", "-i", ".5", network, NULL);
474 property_get("dhcp.wlan0.dns2", network, "");
475 if (network[0])
476 run_command("PING DNS2", 10, "ping", "-c", "3", "-i", ".5", network, NULL);
477#ifdef FWDUMP_bcmdhd 479#ifdef FWDUMP_bcmdhd
478 run_command("DUMP WIFI STATUS", 20, 480 run_command("DUMP WIFI STATUS", 20,
479 SU_PATH, "root", "dhdutil", "-i", "wlan0", "dump", NULL); 481 SU_PATH, "root", "dhdutil", "-i", "wlan0", "dump", NULL);
480 run_command("DUMP WIFI INTERNAL COUNTERS", 20, 482
483 run_command("DUMP WIFI INTERNAL COUNTERS (2)", 20,
481 SU_PATH, "root", "wlutil", "counters", NULL); 484 SU_PATH, "root", "wlutil", "counters", NULL);
485
486 run_command("ND OFFLOAD STATUS (2)", 5,
487 SU_PATH, "root", "wlutil", "nd_status", NULL);
482#endif 488#endif
483 dump_file("INTERRUPTS (2)", "/proc/interrupts"); 489 dump_file("INTERRUPTS (2)", "/proc/interrupts");
484 490
diff --git a/data/etc/android.hardware.audio.pro.xml b/data/etc/android.hardware.audio.pro.xml
new file mode 100644
index 000000000..5328d415c
--- /dev/null
+++ b/data/etc/android.hardware.audio.pro.xml
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2015 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16
17<!-- This is the feature indicating professional audio, as specified by the
18 CDD. ONLY devices that meet the CDD's requirements may declare this
19 feature. -->
20<permissions>
21 <feature name="android.hardware.audio.pro" />
22</permissions>
diff --git a/docs/Doxyfile b/docs/Doxyfile
new file mode 100644
index 000000000..46d6d846d
--- /dev/null
+++ b/docs/Doxyfile
@@ -0,0 +1,1902 @@
1# Doxyfile 1.8.3.1
2
3# This file describes the settings to be used by the documentation system
4# doxygen (www.doxygen.org) for a project
5#
6# All text after a hash (#) is considered a comment and will be ignored
7# The format is:
8# TAG = value [value, ...]
9# For lists items can also be appended using:
10# TAG += value [value, ...]
11# Values that contain spaces should be placed between quotes (" ")
12
13#---------------------------------------------------------------------------
14# Project related configuration options
15#---------------------------------------------------------------------------
16
17# This tag specifies the encoding used for all characters in the config file
18# that follow. The default is UTF-8 which is also the encoding used for all
19# text before the first occurrence of this tag. Doxygen uses libiconv (or the
20# iconv built into libc) for the transcoding. See
21# http://www.gnu.org/software/libiconv for the list of possible encodings.
22
23DOXYFILE_ENCODING = UTF-8
24
25# The PROJECT_NAME tag is a single word (or sequence of words) that should
26# identify the project. Note that if you do not use Doxywizard you need
27# to put quotes around the project name if it contains spaces.
28
29PROJECT_NAME = "NDK API"
30
31# The PROJECT_NUMBER tag can be used to enter a project or revision number.
32# This could be handy for archiving the generated documentation or
33# if some version control system is used.
34
35PROJECT_NUMBER =
36
37# Using the PROJECT_BRIEF tag one can provide an optional one line description
38# for a project that appears at the top of each page and should give viewer
39# a quick idea about the purpose of the project. Keep the description short.
40
41PROJECT_BRIEF = ""
42
43# With the PROJECT_LOGO tag one can specify an logo or icon that is
44# included in the documentation. The maximum height of the logo should not
45# exceed 55 pixels and the maximum width should not exceed 200 pixels.
46# Doxygen will copy the logo to the output directory.
47
48PROJECT_LOGO = logo.png
49
50# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
51# base path where the generated documentation will be put.
52# If a relative path is entered, it will be relative to the location
53# where doxygen was started. If left blank the current directory will be used.
54
55OUTPUT_DIRECTORY =
56
57# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
58# 4096 sub-directories (in 2 levels) under the output directory of each output
59# format and will distribute the generated files over these directories.
60# Enabling this option can be useful when feeding doxygen a huge amount of
61# source files, where putting all generated files in the same directory would
62# otherwise cause performance problems for the file system.
63
64CREATE_SUBDIRS = NO
65
66# The OUTPUT_LANGUAGE tag is used to specify the language in which all
67# documentation generated by doxygen is written. Doxygen will use this
68# information to generate all constant output in the proper language.
69# The default language is English, other supported languages are:
70# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
71# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
72# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
73# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
74# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
75# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
76
77OUTPUT_LANGUAGE = English
78
79# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
80# include brief member descriptions after the members that are listed in
81# the file and class documentation (similar to JavaDoc).
82# Set to NO to disable this.
83
84BRIEF_MEMBER_DESC = YES
85
86# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
87# the brief description of a member or function before the detailed description.
88# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
89# brief descriptions will be completely suppressed.
90
91REPEAT_BRIEF = YES
92
93# This tag implements a quasi-intelligent brief description abbreviator
94# that is used to form the text in various listings. Each string
95# in this list, if found as the leading text of the brief description, will be
96# stripped from the text and the result after processing the whole list, is
97# used as the annotated text. Otherwise, the brief description is used as-is.
98# If left blank, the following values are used ("$name" is automatically
99# replaced with the name of the entity): "The $name class" "The $name widget"
100# "The $name file" "is" "provides" "specifies" "contains"
101# "represents" "a" "an" "the"
102
103ABBREVIATE_BRIEF = "The $name class" \
104 "The $name widget" \
105 "The $name file" \
106 is \
107 provides \
108 specifies \
109 contains \
110 represents \
111 a \
112 an \
113 the
114
115# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
116# Doxygen will generate a detailed section even if there is only a brief
117# description.
118
119ALWAYS_DETAILED_SEC = NO
120
121# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
122# inherited members of a class in the documentation of that class as if those
123# members were ordinary class members. Constructors, destructors and assignment
124# operators of the base classes will not be shown.
125
126INLINE_INHERITED_MEMB = NO
127
128# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
129# path before files name in the file list and in the header files. If set
130# to NO the shortest path that makes the file name unique will be used.
131
132FULL_PATH_NAMES = NO
133
134# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
135# can be used to strip a user-defined part of the path. Stripping is
136# only done if one of the specified strings matches the left-hand part of
137# the path. The tag can be used to show relative paths in the file list.
138# If left blank the directory from which doxygen is run is used as the
139# path to strip. Note that you specify absolute paths here, but also
140# relative paths, which will be relative from the directory where doxygen is
141# started.
142
143STRIP_FROM_PATH =
144
145# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
146# the path mentioned in the documentation of a class, which tells
147# the reader which header file to include in order to use a class.
148# If left blank only the name of the header file containing the class
149# definition is used. Otherwise one should specify the include paths that
150# are normally passed to the compiler using the -I flag.
151
152STRIP_FROM_INC_PATH =
153
154# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
155# (but less readable) file names. This can be useful if your file system
156# doesn't support long names like on DOS, Mac, or CD-ROM.
157
158SHORT_NAMES = NO
159
160# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
161# will interpret the first line (until the first dot) of a JavaDoc-style
162# comment as the brief description. If set to NO, the JavaDoc
163# comments will behave just like regular Qt-style comments
164# (thus requiring an explicit @brief command for a brief description.)
165
166JAVADOC_AUTOBRIEF = NO
167
168# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
169# interpret the first line (until the first dot) of a Qt-style
170# comment as the brief description. If set to NO, the comments
171# will behave just like regular Qt-style comments (thus requiring
172# an explicit \brief command for a brief description.)
173
174QT_AUTOBRIEF = NO
175
176# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
177# treat a multi-line C++ special comment block (i.e. a block of //! or ///
178# comments) as a brief description. This used to be the default behaviour.
179# The new default is to treat a multi-line C++ comment block as a detailed
180# description. Set this tag to YES if you prefer the old behaviour instead.
181
182MULTILINE_CPP_IS_BRIEF = NO
183
184# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
185# member inherits the documentation from any documented member that it
186# re-implements.
187
188INHERIT_DOCS = YES
189
190# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
191# a new page for each member. If set to NO, the documentation of a member will
192# be part of the file/class/namespace that contains it.
193
194SEPARATE_MEMBER_PAGES = NO
195
196# The TAB_SIZE tag can be used to set the number of spaces in a tab.
197# Doxygen uses this value to replace tabs by spaces in code fragments.
198
199TAB_SIZE = 4
200
201# This tag can be used to specify a number of aliases that acts
202# as commands in the documentation. An alias has the form "name=value".
203# For example adding "sideeffect=\par Side Effects:\n" will allow you to
204# put the command \sideeffect (or @sideeffect) in the documentation, which
205# will result in a user-defined paragraph with heading "Side Effects:".
206# You can put \n's in the value part of an alias to insert newlines.
207
208ALIASES =
209
210# This tag can be used to specify a number of word-keyword mappings (TCL only).
211# A mapping has the form "name=value". For example adding
212# "class=itcl::class" will allow you to use the command class in the
213# itcl::class meaning.
214
215TCL_SUBST =
216
217# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
218# sources only. Doxygen will then generate output that is more tailored for C.
219# For instance, some of the names that are used will be different. The list
220# of all members will be omitted, etc.
221
222OPTIMIZE_OUTPUT_FOR_C = YES
223
224# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
225# sources only. Doxygen will then generate output that is more tailored for
226# Java. For instance, namespaces will be presented as packages, qualified
227# scopes will look different, etc.
228
229OPTIMIZE_OUTPUT_JAVA = NO
230
231# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
232# sources only. Doxygen will then generate output that is more tailored for
233# Fortran.
234
235OPTIMIZE_FOR_FORTRAN = NO
236
237# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
238# sources. Doxygen will then generate output that is tailored for
239# VHDL.
240
241OPTIMIZE_OUTPUT_VHDL = NO
242
243# Doxygen selects the parser to use depending on the extension of the files it
244# parses. With this tag you can assign which parser to use for a given
245# extension. Doxygen has a built-in mapping, but you can override or extend it
246# using this tag. The format is ext=language, where ext is a file extension,
247# and language is one of the parsers supported by doxygen: IDL, Java,
248# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,
249# C++. For instance to make doxygen treat .inc files as Fortran files (default
250# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note
251# that for custom extensions you also need to set FILE_PATTERNS otherwise the
252# files are not read by doxygen.
253
254EXTENSION_MAPPING =
255
256# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
257# comments according to the Markdown format, which allows for more readable
258# documentation. See http://daringfireball.net/projects/markdown/ for details.
259# The output of markdown processing is further processed by doxygen, so you
260# can mix doxygen, HTML, and XML commands with Markdown formatting.
261# Disable only in case of backward compatibilities issues.
262
263MARKDOWN_SUPPORT = YES
264
265# When enabled doxygen tries to link words that correspond to documented classes,
266# or namespaces to their corresponding documentation. Such a link can be
267# prevented in individual cases by by putting a % sign in front of the word or
268# globally by setting AUTOLINK_SUPPORT to NO.
269
270AUTOLINK_SUPPORT = YES
271
272# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
273# to include (a tag file for) the STL sources as input, then you should
274# set this tag to YES in order to let doxygen match functions declarations and
275# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
276# func(std::string) {}). This also makes the inheritance and collaboration
277# diagrams that involve STL classes more complete and accurate.
278
279BUILTIN_STL_SUPPORT = NO
280
281# If you use Microsoft's C++/CLI language, you should set this option to YES to
282# enable parsing support.
283
284CPP_CLI_SUPPORT = NO
285
286# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
287# Doxygen will parse them like normal C++ but will assume all classes use public
288# instead of private inheritance when no explicit protection keyword is present.
289
290SIP_SUPPORT = NO
291
292# For Microsoft's IDL there are propget and propput attributes to indicate
293# getter and setter methods for a property. Setting this option to YES (the
294# default) will make doxygen replace the get and set methods by a property in
295# the documentation. This will only work if the methods are indeed getting or
296# setting a simple type. If this is not the case, or you want to show the
297# methods anyway, you should set this option to NO.
298
299IDL_PROPERTY_SUPPORT = YES
300
301# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
302# tag is set to YES, then doxygen will reuse the documentation of the first
303# member in the group (if any) for the other members of the group. By default
304# all members of a group must be documented explicitly.
305
306DISTRIBUTE_GROUP_DOC = NO
307
308# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
309# the same type (for instance a group of public functions) to be put as a
310# subgroup of that type (e.g. under the Public Functions section). Set it to
311# NO to prevent subgrouping. Alternatively, this can be done per class using
312# the \nosubgrouping command.
313
314SUBGROUPING = YES
315
316# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
317# unions are shown inside the group in which they are included (e.g. using
318# @ingroup) instead of on a separate page (for HTML and Man pages) or
319# section (for LaTeX and RTF).
320
321INLINE_GROUPED_CLASSES = NO
322
323# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
324# unions with only public data fields will be shown inline in the documentation
325# of the scope in which they are defined (i.e. file, namespace, or group
326# documentation), provided this scope is documented. If set to NO (the default),
327# structs, classes, and unions are shown on a separate page (for HTML and Man
328# pages) or section (for LaTeX and RTF).
329
330INLINE_SIMPLE_STRUCTS = NO
331
332# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
333# is documented as struct, union, or enum with the name of the typedef. So
334# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
335# with name TypeT. When disabled the typedef will appear as a member of a file,
336# namespace, or class. And the struct will be named TypeS. This can typically
337# be useful for C code in case the coding convention dictates that all compound
338# types are typedef'ed and only the typedef is referenced, never the tag name.
339
340TYPEDEF_HIDES_STRUCT = NO
341
342# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
343# determine which symbols to keep in memory and which to flush to disk.
344# When the cache is full, less often used symbols will be written to disk.
345# For small to medium size projects (<1000 input files) the default value is
346# probably good enough. For larger projects a too small cache size can cause
347# doxygen to be busy swapping symbols to and from disk most of the time
348# causing a significant performance penalty.
349# If the system has enough physical memory increasing the cache will improve the
350# performance by keeping more symbols in memory. Note that the value works on
351# a logarithmic scale so increasing the size by one will roughly double the
352# memory usage. The cache size is given by this formula:
353# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
354# corresponding to a cache size of 2^16 = 65536 symbols.
355
356SYMBOL_CACHE_SIZE = 0
357
358# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
359# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
360# their name and scope. Since this can be an expensive process and often the
361# same symbol appear multiple times in the code, doxygen keeps a cache of
362# pre-resolved symbols. If the cache is too small doxygen will become slower.
363# If the cache is too large, memory is wasted. The cache size is given by this
364# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
365# corresponding to a cache size of 2^16 = 65536 symbols.
366
367LOOKUP_CACHE_SIZE = 0
368
369#---------------------------------------------------------------------------
370# Build related configuration options
371#---------------------------------------------------------------------------
372
373# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
374# documentation are documented, even if no documentation was available.
375# Private class members and static file members will be hidden unless
376# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
377
378EXTRACT_ALL = YES
379
380# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
381# will be included in the documentation.
382
383EXTRACT_PRIVATE = NO
384
385# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
386# scope will be included in the documentation.
387
388EXTRACT_PACKAGE = NO
389
390# If the EXTRACT_STATIC tag is set to YES all static members of a file
391# will be included in the documentation.
392
393EXTRACT_STATIC = NO
394
395# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
396# defined locally in source files will be included in the documentation.
397# If set to NO only classes defined in header files are included.
398
399EXTRACT_LOCAL_CLASSES = YES
400
401# This flag is only useful for Objective-C code. When set to YES local
402# methods, which are defined in the implementation section but not in
403# the interface are included in the documentation.
404# If set to NO (the default) only methods in the interface are included.
405
406EXTRACT_LOCAL_METHODS = NO
407
408# If this flag is set to YES, the members of anonymous namespaces will be
409# extracted and appear in the documentation as a namespace called
410# 'anonymous_namespace{file}', where file will be replaced with the base
411# name of the file that contains the anonymous namespace. By default
412# anonymous namespaces are hidden.
413
414EXTRACT_ANON_NSPACES = NO
415
416# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
417# undocumented members of documented classes, files or namespaces.
418# If set to NO (the default) these members will be included in the
419# various overviews, but no documentation section is generated.
420# This option has no effect if EXTRACT_ALL is enabled.
421
422HIDE_UNDOC_MEMBERS = NO
423
424# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
425# undocumented classes that are normally visible in the class hierarchy.
426# If set to NO (the default) these classes will be included in the various
427# overviews. This option has no effect if EXTRACT_ALL is enabled.
428
429HIDE_UNDOC_CLASSES = NO
430
431# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
432# friend (class|struct|union) declarations.
433# If set to NO (the default) these declarations will be included in the
434# documentation.
435
436HIDE_FRIEND_COMPOUNDS = NO
437
438# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
439# documentation blocks found inside the body of a function.
440# If set to NO (the default) these blocks will be appended to the
441# function's detailed documentation block.
442
443HIDE_IN_BODY_DOCS = NO
444
445# The INTERNAL_DOCS tag determines if documentation
446# that is typed after a \internal command is included. If the tag is set
447# to NO (the default) then the documentation will be excluded.
448# Set it to YES to include the internal documentation.
449
450INTERNAL_DOCS = NO
451
452# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
453# file names in lower-case letters. If set to YES upper-case letters are also
454# allowed. This is useful if you have classes or files whose names only differ
455# in case and if your file system supports case sensitive file names. Windows
456# and Mac users are advised to set this option to NO.
457
458CASE_SENSE_NAMES = NO
459
460# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
461# will show members with their full class and namespace scopes in the
462# documentation. If set to YES the scope will be hidden.
463
464HIDE_SCOPE_NAMES = YES
465
466# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
467# will put a list of the files that are included by a file in the documentation
468# of that file.
469
470SHOW_INCLUDE_FILES = YES
471
472# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
473# will list include files with double quotes in the documentation
474# rather than with sharp brackets.
475
476FORCE_LOCAL_INCLUDES = NO
477
478# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
479# is inserted in the documentation for inline members.
480
481INLINE_INFO = YES
482
483# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
484# will sort the (detailed) documentation of file and class members
485# alphabetically by member name. If set to NO the members will appear in
486# declaration order.
487
488SORT_MEMBER_DOCS = YES
489
490# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
491# brief documentation of file, namespace and class members alphabetically
492# by member name. If set to NO (the default) the members will appear in
493# declaration order.
494
495SORT_BRIEF_DOCS = NO
496
497# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
498# will sort the (brief and detailed) documentation of class members so that
499# constructors and destructors are listed first. If set to NO (the default)
500# the constructors will appear in the respective orders defined by
501# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
502# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
503# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
504
505SORT_MEMBERS_CTORS_1ST = NO
506
507# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
508# hierarchy of group names into alphabetical order. If set to NO (the default)
509# the group names will appear in their defined order.
510
511SORT_GROUP_NAMES = NO
512
513# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
514# sorted by fully-qualified names, including namespaces. If set to
515# NO (the default), the class list will be sorted only by class name,
516# not including the namespace part.
517# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
518# Note: This option applies only to the class list, not to the
519# alphabetical list.
520
521SORT_BY_SCOPE_NAME = NO
522
523# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
524# do proper type resolution of all parameters of a function it will reject a
525# match between the prototype and the implementation of a member function even
526# if there is only one candidate or it is obvious which candidate to choose
527# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
528# will still accept a match between prototype and implementation in such cases.
529
530STRICT_PROTO_MATCHING = NO
531
532# The GENERATE_TODOLIST tag can be used to enable (YES) or
533# disable (NO) the todo list. This list is created by putting \todo
534# commands in the documentation.
535
536GENERATE_TODOLIST = YES
537
538# The GENERATE_TESTLIST tag can be used to enable (YES) or
539# disable (NO) the test list. This list is created by putting \test
540# commands in the documentation.
541
542GENERATE_TESTLIST = YES
543
544# The GENERATE_BUGLIST tag can be used to enable (YES) or
545# disable (NO) the bug list. This list is created by putting \bug
546# commands in the documentation.
547
548GENERATE_BUGLIST = YES
549
550# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
551# disable (NO) the deprecated list. This list is created by putting
552# \deprecated commands in the documentation.
553
554GENERATE_DEPRECATEDLIST= YES
555
556# The ENABLED_SECTIONS tag can be used to enable conditional
557# documentation sections, marked by \if section-label ... \endif
558# and \cond section-label ... \endcond blocks.
559
560ENABLED_SECTIONS =
561
562# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
563# the initial value of a variable or macro consists of for it to appear in
564# the documentation. If the initializer consists of more lines than specified
565# here it will be hidden. Use a value of 0 to hide initializers completely.
566# The appearance of the initializer of individual variables and macros in the
567# documentation can be controlled using \showinitializer or \hideinitializer
568# command in the documentation regardless of this setting.
569
570MAX_INITIALIZER_LINES = 26
571
572# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
573# at the bottom of the documentation of classes and structs. If set to YES the
574# list will mention the files that were used to generate the documentation.
575
576SHOW_USED_FILES = YES
577
578# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
579# This will remove the Files entry from the Quick Index and from the
580# Folder Tree View (if specified). The default is YES.
581
582SHOW_FILES = YES
583
584# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
585# Namespaces page. This will remove the Namespaces entry from the Quick Index
586# and from the Folder Tree View (if specified). The default is YES.
587
588SHOW_NAMESPACES = YES
589
590# The FILE_VERSION_FILTER tag can be used to specify a program or script that
591# doxygen should invoke to get the current version for each file (typically from
592# the version control system). Doxygen will invoke the program by executing (via
593# popen()) the command <command> <input-file>, where <command> is the value of
594# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
595# provided by doxygen. Whatever the program writes to standard output
596# is used as the file version. See the manual for examples.
597
598FILE_VERSION_FILTER =
599
600# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
601# by doxygen. The layout file controls the global structure of the generated
602# output files in an output format independent way. To create the layout file
603# that represents doxygen's defaults, run doxygen with the -l option.
604# You can optionally specify a file name after the option, if omitted
605# DoxygenLayout.xml will be used as the name of the layout file.
606
607LAYOUT_FILE =
608
609# The CITE_BIB_FILES tag can be used to specify one or more bib files
610# containing the references data. This must be a list of .bib files. The
611# .bib extension is automatically appended if omitted. Using this command
612# requires the bibtex tool to be installed. See also
613# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
614# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
615# feature you need bibtex and perl available in the search path. Do not use
616# file names with spaces, bibtex cannot handle them.
617
618CITE_BIB_FILES =
619
620#---------------------------------------------------------------------------
621# configuration options related to warning and progress messages
622#---------------------------------------------------------------------------
623
624# The QUIET tag can be used to turn on/off the messages that are generated
625# by doxygen. Possible values are YES and NO. If left blank NO is used.
626
627QUIET = NO
628
629# The WARNINGS tag can be used to turn on/off the warning messages that are
630# generated by doxygen. Possible values are YES and NO. If left blank
631# NO is used.
632
633WARNINGS = YES
634
635# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
636# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
637# automatically be disabled.
638
639WARN_IF_UNDOCUMENTED = YES
640
641# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
642# potential errors in the documentation, such as not documenting some
643# parameters in a documented function, or documenting parameters that
644# don't exist or using markup commands wrongly.
645
646WARN_IF_DOC_ERROR = YES
647
648# The WARN_NO_PARAMDOC option can be enabled to get warnings for
649# functions that are documented, but have no documentation for their parameters
650# or return value. If set to NO (the default) doxygen will only warn about
651# wrong or incomplete parameter documentation, but not about the absence of
652# documentation.
653
654WARN_NO_PARAMDOC = NO
655
656# The WARN_FORMAT tag determines the format of the warning messages that
657# doxygen can produce. The string should contain the $file, $line, and $text
658# tags, which will be replaced by the file and line number from which the
659# warning originated and the warning text. Optionally the format may contain
660# $version, which will be replaced by the version of the file (if it could
661# be obtained via FILE_VERSION_FILTER)
662
663WARN_FORMAT = "$file:$line: $text"
664
665# The WARN_LOGFILE tag can be used to specify a file to which warning
666# and error messages should be written. If left blank the output is written
667# to stderr.
668
669WARN_LOGFILE =
670
671#---------------------------------------------------------------------------
672# configuration options related to the input files
673#---------------------------------------------------------------------------
674
675# The INPUT tag can be used to specify the files and/or directories that contain
676# documented source files. You may enter file names like "myfile.cpp" or
677# directories like "/usr/src/myproject". Separate the files or directories
678# with spaces.
679
680INPUT = ../include/android
681
682# This tag can be used to specify the character encoding of the source files
683# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
684# also the default input encoding. Doxygen uses libiconv (or the iconv built
685# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
686# the list of possible encodings.
687
688INPUT_ENCODING = UTF-8
689
690# If the value of the INPUT tag contains directories, you can use the
691# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
692# and *.h) to filter out the source-files in the directories. If left
693# blank the following patterns are tested:
694# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
695# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
696# *.f90 *.f *.for *.vhd *.vhdl
697
698FILE_PATTERNS = *.c \
699 *.cc \
700 *.cxx \
701 *.cpp \
702 *.c++ \
703 *.d \
704 *.java \
705 *.ii \
706 *.ixx \
707 *.ipp \
708 *.i++ \
709 *.inl \
710 *.h \
711 *.hh \
712 *.hxx \
713 *.hpp \
714 *.h++ \
715 *.idl \
716 *.odl \
717 *.cs \
718 *.php \
719 *.php3 \
720 *.inc \
721 *.m \
722 *.markdown \
723 *.md \
724 *.mm \
725 *.dox \
726 *.py \
727 *.f90 \
728 *.f \
729 *.for \
730 *.vhd \
731 *.vhdl
732
733# The RECURSIVE tag can be used to turn specify whether or not subdirectories
734# should be searched for input files as well. Possible values are YES and NO.
735# If left blank NO is used.
736
737RECURSIVE = YES
738
739# The EXCLUDE tag can be used to specify files and/or directories that should be
740# excluded from the INPUT source files. This way you can easily exclude a
741# subdirectory from a directory tree whose root is specified with the INPUT tag.
742# Note that relative paths are relative to the directory from which doxygen is
743# run.
744
745EXCLUDE =
746
747# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
748# directories that are symbolic links (a Unix file system feature) are excluded
749# from the input.
750
751EXCLUDE_SYMLINKS = NO
752
753# If the value of the INPUT tag contains directories, you can use the
754# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
755# certain files from those directories. Note that the wildcards are matched
756# against the file with absolute path, so to exclude all test directories
757# for example use the pattern */test/*
758
759EXCLUDE_PATTERNS =
760
761# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
762# (namespaces, classes, functions, etc.) that should be excluded from the
763# output. The symbol name can be a fully qualified name, a word, or if the
764# wildcard * is used, a substring. Examples: ANamespace, AClass,
765# AClass::ANamespace, ANamespace::*Test
766
767EXCLUDE_SYMBOLS =
768
769# The EXAMPLE_PATH tag can be used to specify one or more files or
770# directories that contain example code fragments that are included (see
771# the \include command).
772
773EXAMPLE_PATH =
774
775# If the value of the EXAMPLE_PATH tag contains directories, you can use the
776# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
777# and *.h) to filter out the source-files in the directories. If left
778# blank all files are included.
779
780EXAMPLE_PATTERNS = *
781
782# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
783# searched for input files to be used with the \include or \dontinclude
784# commands irrespective of the value of the RECURSIVE tag.
785# Possible values are YES and NO. If left blank NO is used.
786
787EXAMPLE_RECURSIVE = NO
788
789# The IMAGE_PATH tag can be used to specify one or more files or
790# directories that contain image that are included in the documentation (see
791# the \image command).
792
793IMAGE_PATH =
794
795# The INPUT_FILTER tag can be used to specify a program that doxygen should
796# invoke to filter for each input file. Doxygen will invoke the filter program
797# by executing (via popen()) the command <filter> <input-file>, where <filter>
798# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
799# input file. Doxygen will then use the output that the filter program writes
800# to standard output. If FILTER_PATTERNS is specified, this tag will be
801# ignored.
802
803INPUT_FILTER =
804
805# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
806# basis. Doxygen will compare the file name with each pattern and apply the
807# filter if there is a match. The filters are a list of the form:
808# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
809# info on how filters are used. If FILTER_PATTERNS is empty or if
810# non of the patterns match the file name, INPUT_FILTER is applied.
811
812FILTER_PATTERNS =
813
814# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
815# INPUT_FILTER) will be used to filter the input files when producing source
816# files to browse (i.e. when SOURCE_BROWSER is set to YES).
817
818FILTER_SOURCE_FILES = NO
819
820# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
821# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
822# and it is also possible to disable source filtering for a specific pattern
823# using *.ext= (so without naming a filter). This option only has effect when
824# FILTER_SOURCE_FILES is enabled.
825
826FILTER_SOURCE_PATTERNS =
827
828# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
829# is part of the input, its contents will be placed on the main page (index.html).
830# This can be useful if you have a project on for instance GitHub and want reuse
831# the introduction page also for the doxygen output.
832
833USE_MDFILE_AS_MAINPAGE =
834
835#---------------------------------------------------------------------------
836# configuration options related to source browsing
837#---------------------------------------------------------------------------
838
839# If the SOURCE_BROWSER tag is set to YES then a list of source files will
840# be generated. Documented entities will be cross-referenced with these sources.
841# Note: To get rid of all source code in the generated output, make sure also
842# VERBATIM_HEADERS is set to NO.
843
844SOURCE_BROWSER = NO
845
846# Setting the INLINE_SOURCES tag to YES will include the body
847# of functions and classes directly in the documentation.
848
849INLINE_SOURCES = NO
850
851# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
852# doxygen to hide any special comment blocks from generated source code
853# fragments. Normal C, C++ and Fortran comments will always remain visible.
854
855STRIP_CODE_COMMENTS = NO
856
857# If the REFERENCED_BY_RELATION tag is set to YES
858# then for each documented function all documented
859# functions referencing it will be listed.
860
861REFERENCED_BY_RELATION = NO
862
863# If the REFERENCES_RELATION tag is set to YES
864# then for each documented function all documented entities
865# called/used by that function will be listed.
866
867REFERENCES_RELATION = NO
868
869# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
870# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
871# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
872# link to the source code. Otherwise they will link to the documentation.
873
874REFERENCES_LINK_SOURCE = YES
875
876# If the USE_HTAGS tag is set to YES then the references to source code
877# will point to the HTML generated by the htags(1) tool instead of doxygen
878# built-in source browser. The htags tool is part of GNU's global source
879# tagging system (see http://www.gnu.org/software/global/global.html). You
880# will need version 4.8.6 or higher.
881
882USE_HTAGS = NO
883
884# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
885# will generate a verbatim copy of the header file for each class for
886# which an include is specified. Set to NO to disable this.
887
888VERBATIM_HEADERS = NO
889
890#---------------------------------------------------------------------------
891# configuration options related to the alphabetical class index
892#---------------------------------------------------------------------------
893
894# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
895# of all compounds will be generated. Enable this if the project
896# contains a lot of classes, structs, unions or interfaces.
897
898ALPHABETICAL_INDEX = NO
899
900# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
901# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
902# in which this list will be split (can be a number in the range [1..20])
903
904COLS_IN_ALPHA_INDEX = 5
905
906# In case all classes in a project start with a common prefix, all
907# classes will be put under the same header in the alphabetical index.
908# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
909# should be ignored while generating the index headers.
910
911IGNORE_PREFIX =
912
913#---------------------------------------------------------------------------
914# configuration options related to the HTML output
915#---------------------------------------------------------------------------
916
917# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
918# generate HTML output.
919
920GENERATE_HTML = YES
921
922# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
923# If a relative path is entered the value of OUTPUT_DIRECTORY will be
924# put in front of it. If left blank `html' will be used as the default path.
925
926HTML_OUTPUT = $(HTML_OUTPUT)
927
928# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
929# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
930# doxygen will generate files with .html extension.
931
932HTML_FILE_EXTENSION = .html
933
934# The HTML_HEADER tag can be used to specify a personal HTML header for
935# each generated HTML page. If it is left blank doxygen will generate a
936# standard header. Note that when using a custom header you are responsible
937# for the proper inclusion of any scripts and style sheets that doxygen
938# needs, which is dependent on the configuration options used.
939# It is advised to generate a default header using "doxygen -w html
940# header.html footer.html stylesheet.css YourConfigFile" and then modify
941# that header. Note that the header is subject to change so you typically
942# have to redo this when upgrading to a newer version of doxygen or when
943# changing the value of configuration settings such as GENERATE_TREEVIEW!
944
945HTML_HEADER = $(HTML_HEADER)
946
947# The HTML_FOOTER tag can be used to specify a personal HTML footer for
948# each generated HTML page. If it is left blank doxygen will generate a
949# standard footer.
950
951HTML_FOOTER = $(HTML_FOOTER)
952
953# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
954# style sheet that is used by each HTML page. It can be used to
955# fine-tune the look of the HTML output. If left blank doxygen will
956# generate a default style sheet. Note that it is recommended to use
957# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
958# tag will in the future become obsolete.
959
960HTML_STYLESHEET =
961
962# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
963# user-defined cascading style sheet that is included after the standard
964# style sheets created by doxygen. Using this option one can overrule
965# certain style aspects. This is preferred over using HTML_STYLESHEET
966# since it does not replace the standard style sheet and is therefor more
967# robust against future updates. Doxygen will copy the style sheet file to
968# the output directory.
969
970HTML_EXTRA_STYLESHEET =
971
972# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
973# other source files which should be copied to the HTML output directory. Note
974# that these files will be copied to the base HTML output directory. Use the
975# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
976# files. In the HTML_STYLESHEET file, use the file name only. Also note that
977# the files will be copied as-is; there are no commands or markers available.
978
979HTML_EXTRA_FILES =
980
981# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
982# Doxygen will adjust the colors in the style sheet and background images
983# according to this color. Hue is specified as an angle on a colorwheel,
984# see http://en.wikipedia.org/wiki/Hue for more information.
985# For instance the value 0 represents red, 60 is yellow, 120 is green,
986# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
987# The allowed range is 0 to 359.
988
989HTML_COLORSTYLE_HUE = 220
990
991# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
992# the colors in the HTML output. For a value of 0 the output will use
993# grayscales only. A value of 255 will produce the most vivid colors.
994
995HTML_COLORSTYLE_SAT = 0
996
997# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
998# the luminance component of the colors in the HTML output. Values below
999# 100 gradually make the output lighter, whereas values above 100 make
1000# the output darker. The value divided by 100 is the actual gamma applied,
1001# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
1002# and 100 does not change the gamma.
1003
1004HTML_COLORSTYLE_GAMMA = 80
1005
1006# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1007# page will contain the date and time when the page was generated. Setting
1008# this to NO can help when comparing the output of multiple runs.
1009
1010HTML_TIMESTAMP = YES
1011
1012# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
1013# documentation will contain sections that can be hidden and shown after the
1014# page has loaded.
1015
1016HTML_DYNAMIC_SECTIONS = NO
1017
1018# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
1019# entries shown in the various tree structured indices initially; the user
1020# can expand and collapse entries dynamically later on. Doxygen will expand
1021# the tree to such a level that at most the specified number of entries are
1022# visible (unless a fully collapsed tree already exceeds this amount).
1023# So setting the number of entries 1 will produce a full collapsed tree by
1024# default. 0 is a special value representing an infinite number of entries
1025# and will result in a full expanded tree by default.
1026
1027HTML_INDEX_NUM_ENTRIES = 100
1028
1029# If the GENERATE_DOCSET tag is set to YES, additional index files
1030# will be generated that can be used as input for Apple's Xcode 3
1031# integrated development environment, introduced with OSX 10.5 (Leopard).
1032# To create a documentation set, doxygen will generate a Makefile in the
1033# HTML output directory. Running make will produce the docset in that
1034# directory and running "make install" will install the docset in
1035# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
1036# it at startup.
1037# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
1038# for more information.
1039
1040GENERATE_DOCSET = NO
1041
1042# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
1043# feed. A documentation feed provides an umbrella under which multiple
1044# documentation sets from a single provider (such as a company or product suite)
1045# can be grouped.
1046
1047DOCSET_FEEDNAME = "Doxygen generated docs"
1048
1049# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
1050# should uniquely identify the documentation set bundle. This should be a
1051# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
1052# will append .docset to the name.
1053
1054DOCSET_BUNDLE_ID = org.doxygen.Project
1055
1056# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely
1057# identify the documentation publisher. This should be a reverse domain-name
1058# style string, e.g. com.mycompany.MyDocSet.documentation.
1059
1060DOCSET_PUBLISHER_ID = org.doxygen.Publisher
1061
1062# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
1063
1064DOCSET_PUBLISHER_NAME = Publisher
1065
1066# If the GENERATE_HTMLHELP tag is set to YES, additional index files
1067# will be generated that can be used as input for tools like the
1068# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
1069# of the generated HTML documentation.
1070
1071GENERATE_HTMLHELP = NO
1072
1073# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
1074# be used to specify the file name of the resulting .chm file. You
1075# can add a path in front of the file if the result should not be
1076# written to the html output directory.
1077
1078CHM_FILE =
1079
1080# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
1081# be used to specify the location (absolute path including file name) of
1082# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
1083# the HTML help compiler on the generated index.hhp.
1084
1085HHC_LOCATION =
1086
1087# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
1088# controls if a separate .chi index file is generated (YES) or that
1089# it should be included in the master .chm file (NO).
1090
1091GENERATE_CHI = NO
1092
1093# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
1094# is used to encode HtmlHelp index (hhk), content (hhc) and project file
1095# content.
1096
1097CHM_INDEX_ENCODING =
1098
1099# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
1100# controls whether a binary table of contents is generated (YES) or a
1101# normal table of contents (NO) in the .chm file.
1102
1103BINARY_TOC = NO
1104
1105# The TOC_EXPAND flag can be set to YES to add extra items for group members
1106# to the contents of the HTML help documentation and to the tree view.
1107
1108TOC_EXPAND = NO
1109
1110# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1111# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
1112# that can be used as input for Qt's qhelpgenerator to generate a
1113# Qt Compressed Help (.qch) of the generated HTML documentation.
1114
1115GENERATE_QHP = NO
1116
1117# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
1118# be used to specify the file name of the resulting .qch file.
1119# The path specified is relative to the HTML output folder.
1120
1121QCH_FILE =
1122
1123# The QHP_NAMESPACE tag specifies the namespace to use when generating
1124# Qt Help Project output. For more information please see
1125# http://doc.trolltech.com/qthelpproject.html#namespace
1126
1127QHP_NAMESPACE = org.doxygen.Project
1128
1129# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
1130# Qt Help Project output. For more information please see
1131# http://doc.trolltech.com/qthelpproject.html#virtual-folders
1132
1133QHP_VIRTUAL_FOLDER = doc
1134
1135# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
1136# add. For more information please see
1137# http://doc.trolltech.com/qthelpproject.html#custom-filters
1138
1139QHP_CUST_FILTER_NAME =
1140
1141# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
1142# custom filter to add. For more information please see
1143# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
1144# Qt Help Project / Custom Filters</a>.
1145
1146QHP_CUST_FILTER_ATTRS =
1147
1148# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1149# project's
1150# filter section matches.
1151# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
1152# Qt Help Project / Filter Attributes</a>.
1153
1154QHP_SECT_FILTER_ATTRS =
1155
1156# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
1157# be used to specify the location of Qt's qhelpgenerator.
1158# If non-empty doxygen will try to run qhelpgenerator on the generated
1159# .qhp file.
1160
1161QHG_LOCATION =
1162
1163# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
1164# will be generated, which together with the HTML files, form an Eclipse help
1165# plugin. To install this plugin and make it available under the help contents
1166# menu in Eclipse, the contents of the directory containing the HTML and XML
1167# files needs to be copied into the plugins directory of eclipse. The name of
1168# the directory within the plugins directory should be the same as
1169# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
1170# the help appears.
1171
1172GENERATE_ECLIPSEHELP = NO
1173
1174# A unique identifier for the eclipse help plugin. When installing the plugin
1175# the directory name containing the HTML and XML files should also have
1176# this name.
1177
1178ECLIPSE_DOC_ID = org.doxygen.Project
1179
1180# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
1181# at top of each HTML page. The value NO (the default) enables the index and
1182# the value YES disables it. Since the tabs have the same information as the
1183# navigation tree you can set this option to NO if you already set
1184# GENERATE_TREEVIEW to YES.
1185
1186DISABLE_INDEX = YES
1187
1188# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1189# structure should be generated to display hierarchical information.
1190# If the tag value is set to YES, a side panel will be generated
1191# containing a tree-like index structure (just like the one that
1192# is generated for HTML Help). For this to work a browser that supports
1193# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1194# Windows users are probably better off using the HTML help feature.
1195# Since the tree basically has the same information as the tab index you
1196# could consider to set DISABLE_INDEX to NO when enabling this option.
1197
1198GENERATE_TREEVIEW = NO
1199
1200# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
1201# (range [0,1..20]) that doxygen will group on one line in the generated HTML
1202# documentation. Note that a value of 0 will completely suppress the enum
1203# values from appearing in the overview section.
1204
1205ENUM_VALUES_PER_LINE = 4
1206
1207# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1208# used to set the initial width (in pixels) of the frame in which the tree
1209# is shown.
1210
1211TREEVIEW_WIDTH = 250
1212
1213# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
1214# links to external symbols imported via tag files in a separate window.
1215
1216EXT_LINKS_IN_WINDOW = NO
1217
1218# Use this tag to change the font size of Latex formulas included
1219# as images in the HTML documentation. The default is 10. Note that
1220# when you change the font size after a successful doxygen run you need
1221# to manually remove any form_*.png images from the HTML output directory
1222# to force them to be regenerated.
1223
1224FORMULA_FONTSIZE = 10
1225
1226# Use the FORMULA_TRANPARENT tag to determine whether or not the images
1227# generated for formulas are transparent PNGs. Transparent PNGs are
1228# not supported properly for IE 6.0, but are supported on all modern browsers.
1229# Note that when changing this option you need to delete any form_*.png files
1230# in the HTML output before the changes have effect.
1231
1232FORMULA_TRANSPARENT = YES
1233
1234# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
1235# (see http://www.mathjax.org) which uses client side Javascript for the
1236# rendering instead of using prerendered bitmaps. Use this if you do not
1237# have LaTeX installed or if you want to formulas look prettier in the HTML
1238# output. When enabled you may also need to install MathJax separately and
1239# configure the path to it using the MATHJAX_RELPATH option.
1240
1241USE_MATHJAX = NO
1242
1243# When MathJax is enabled you can set the default output format to be used for
1244# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
1245# SVG. The default value is HTML-CSS, which is slower, but has the best
1246# compatibility.
1247
1248MATHJAX_FORMAT = HTML-CSS
1249
1250# When MathJax is enabled you need to specify the location relative to the
1251# HTML output directory using the MATHJAX_RELPATH option. The destination
1252# directory should contain the MathJax.js script. For instance, if the mathjax
1253# directory is located at the same level as the HTML output directory, then
1254# MATHJAX_RELPATH should be ../mathjax. The default value points to
1255# the MathJax Content Delivery Network so you can quickly see the result without
1256# installing MathJax. However, it is strongly recommended to install a local
1257# copy of MathJax from http://www.mathjax.org before deployment.
1258
1259MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
1260
1261# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
1262# names that should be enabled during MathJax rendering.
1263
1264MATHJAX_EXTENSIONS =
1265
1266# When the SEARCHENGINE tag is enabled doxygen will generate a search box
1267# for the HTML output. The underlying search engine uses javascript
1268# and DHTML and should work on any modern browser. Note that when using
1269# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
1270# (GENERATE_DOCSET) there is already a search function so this one should
1271# typically be disabled. For large projects the javascript based search engine
1272# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1273
1274SEARCHENGINE = NO
1275
1276# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1277# implemented using a web server instead of a web client using Javascript.
1278# There are two flavours of web server based search depending on the
1279# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
1280# searching and an index file used by the script. When EXTERNAL_SEARCH is
1281# enabled the indexing and searching needs to be provided by external tools.
1282# See the manual for details.
1283
1284SERVER_BASED_SEARCH = NO
1285
1286# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP
1287# script for searching. Instead the search results are written to an XML file
1288# which needs to be processed by an external indexer. Doxygen will invoke an
1289# external search engine pointed to by the SEARCHENGINE_URL option to obtain
1290# the search results. Doxygen ships with an example indexer (doxyindexer) and
1291# search engine (doxysearch.cgi) which are based on the open source search engine
1292# library Xapian. See the manual for configuration details.
1293
1294EXTERNAL_SEARCH = NO
1295
1296# The SEARCHENGINE_URL should point to a search engine hosted by a web server
1297# which will returned the search results when EXTERNAL_SEARCH is enabled.
1298# Doxygen ships with an example search engine (doxysearch) which is based on
1299# the open source search engine library Xapian. See the manual for configuration
1300# details.
1301
1302SEARCHENGINE_URL =
1303
1304# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
1305# search data is written to a file for indexing by an external tool. With the
1306# SEARCHDATA_FILE tag the name of this file can be specified.
1307
1308SEARCHDATA_FILE = searchdata.xml
1309
1310# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the
1311# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
1312# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
1313# projects and redirect the results back to the right project.
1314
1315EXTERNAL_SEARCH_ID =
1316
1317# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
1318# projects other than the one defined by this configuration file, but that are
1319# all added to the same external search index. Each project needs to have a
1320# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id
1321# of to a relative location where the documentation can be found.
1322# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...
1323
1324EXTRA_SEARCH_MAPPINGS =
1325
1326#---------------------------------------------------------------------------
1327# configuration options related to the LaTeX output
1328#---------------------------------------------------------------------------
1329
1330# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1331# generate Latex output.
1332
1333GENERATE_LATEX = NO
1334
1335# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1336# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1337# put in front of it. If left blank `latex' will be used as the default path.
1338
1339LATEX_OUTPUT = latex
1340
1341# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1342# invoked. If left blank `latex' will be used as the default command name.
1343# Note that when enabling USE_PDFLATEX this option is only used for
1344# generating bitmaps for formulas in the HTML output, but not in the
1345# Makefile that is written to the output directory.
1346
1347LATEX_CMD_NAME = latex
1348
1349# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1350# generate index for LaTeX. If left blank `makeindex' will be used as the
1351# default command name.
1352
1353MAKEINDEX_CMD_NAME = makeindex
1354
1355# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1356# LaTeX documents. This may be useful for small projects and may help to
1357# save some trees in general.
1358
1359COMPACT_LATEX = NO
1360
1361# The PAPER_TYPE tag can be used to set the paper type that is used
1362# by the printer. Possible values are: a4, letter, legal and
1363# executive. If left blank a4wide will be used.
1364
1365PAPER_TYPE = a4
1366
1367# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1368# packages that should be included in the LaTeX output.
1369
1370EXTRA_PACKAGES =
1371
1372# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1373# the generated latex document. The header should contain everything until
1374# the first chapter. If it is left blank doxygen will generate a
1375# standard header. Notice: only use this tag if you know what you are doing!
1376
1377LATEX_HEADER =
1378
1379# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
1380# the generated latex document. The footer should contain everything after
1381# the last chapter. If it is left blank doxygen will generate a
1382# standard footer. Notice: only use this tag if you know what you are doing!
1383
1384LATEX_FOOTER =
1385
1386# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1387# is prepared for conversion to pdf (using ps2pdf). The pdf file will
1388# contain links (just like the HTML output) instead of page references
1389# This makes the output suitable for online browsing using a pdf viewer.
1390
1391PDF_HYPERLINKS = YES
1392
1393# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1394# plain latex in the generated Makefile. Set this option to YES to get a
1395# higher quality PDF documentation.
1396
1397USE_PDFLATEX = YES
1398
1399# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1400# command to the generated LaTeX files. This will instruct LaTeX to keep
1401# running if errors occur, instead of asking the user for help.
1402# This option is also used when generating formulas in HTML.
1403
1404LATEX_BATCHMODE = NO
1405
1406# If LATEX_HIDE_INDICES is set to YES then doxygen will not
1407# include the index chapters (such as File Index, Compound Index, etc.)
1408# in the output.
1409
1410LATEX_HIDE_INDICES = NO
1411
1412# If LATEX_SOURCE_CODE is set to YES then doxygen will include
1413# source code with syntax highlighting in the LaTeX output.
1414# Note that which sources are shown also depends on other settings
1415# such as SOURCE_BROWSER.
1416
1417LATEX_SOURCE_CODE = NO
1418
1419# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1420# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
1421# http://en.wikipedia.org/wiki/BibTeX for more info.
1422
1423LATEX_BIB_STYLE = plain
1424
1425#---------------------------------------------------------------------------
1426# configuration options related to the RTF output
1427#---------------------------------------------------------------------------
1428
1429# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1430# The RTF output is optimized for Word 97 and may not look very pretty with
1431# other RTF readers or editors.
1432
1433GENERATE_RTF = NO
1434
1435# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1436# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1437# put in front of it. If left blank `rtf' will be used as the default path.
1438
1439RTF_OUTPUT = rtf
1440
1441# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1442# RTF documents. This may be useful for small projects and may help to
1443# save some trees in general.
1444
1445COMPACT_RTF = NO
1446
1447# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1448# will contain hyperlink fields. The RTF file will
1449# contain links (just like the HTML output) instead of page references.
1450# This makes the output suitable for online browsing using WORD or other
1451# programs which support those fields.
1452# Note: wordpad (write) and others do not support links.
1453
1454RTF_HYPERLINKS = NO
1455
1456# Load style sheet definitions from file. Syntax is similar to doxygen's
1457# config file, i.e. a series of assignments. You only have to provide
1458# replacements, missing definitions are set to their default value.
1459
1460RTF_STYLESHEET_FILE =
1461
1462# Set optional variables used in the generation of an rtf document.
1463# Syntax is similar to doxygen's config file.
1464
1465RTF_EXTENSIONS_FILE =
1466
1467#---------------------------------------------------------------------------
1468# configuration options related to the man page output
1469#---------------------------------------------------------------------------
1470
1471# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1472# generate man pages
1473
1474GENERATE_MAN = NO
1475
1476# The MAN_OUTPUT tag is used to specify where the man pages will be put.
1477# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1478# put in front of it. If left blank `man' will be used as the default path.
1479
1480MAN_OUTPUT = man
1481
1482# The MAN_EXTENSION tag determines the extension that is added to
1483# the generated man pages (default is the subroutine's section .3)
1484
1485MAN_EXTENSION = .3
1486
1487# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1488# then it will generate one additional man file for each entity
1489# documented in the real man page(s). These additional files
1490# only source the real man page, but without them the man command
1491# would be unable to find the correct page. The default is NO.
1492
1493MAN_LINKS = NO
1494
1495#---------------------------------------------------------------------------
1496# configuration options related to the XML output
1497#---------------------------------------------------------------------------
1498
1499# If the GENERATE_XML tag is set to YES Doxygen will
1500# generate an XML file that captures the structure of
1501# the code including all documentation.
1502
1503GENERATE_XML = NO
1504
1505# The XML_OUTPUT tag is used to specify where the XML pages will be put.
1506# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1507# put in front of it. If left blank `xml' will be used as the default path.
1508
1509XML_OUTPUT = xml
1510
1511# The XML_SCHEMA tag can be used to specify an XML schema,
1512# which can be used by a validating XML parser to check the
1513# syntax of the XML files.
1514
1515XML_SCHEMA =
1516
1517# The XML_DTD tag can be used to specify an XML DTD,
1518# which can be used by a validating XML parser to check the
1519# syntax of the XML files.
1520
1521XML_DTD =
1522
1523# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1524# dump the program listings (including syntax highlighting
1525# and cross-referencing information) to the XML output. Note that
1526# enabling this will significantly increase the size of the XML output.
1527
1528XML_PROGRAMLISTING = YES
1529
1530#---------------------------------------------------------------------------
1531# configuration options for the AutoGen Definitions output
1532#---------------------------------------------------------------------------
1533
1534# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1535# generate an AutoGen Definitions (see autogen.sf.net) file
1536# that captures the structure of the code including all
1537# documentation. Note that this feature is still experimental
1538# and incomplete at the moment.
1539
1540GENERATE_AUTOGEN_DEF = NO
1541
1542#---------------------------------------------------------------------------
1543# configuration options related to the Perl module output
1544#---------------------------------------------------------------------------
1545
1546# If the GENERATE_PERLMOD tag is set to YES Doxygen will
1547# generate a Perl module file that captures the structure of
1548# the code including all documentation. Note that this
1549# feature is still experimental and incomplete at the
1550# moment.
1551
1552GENERATE_PERLMOD = NO
1553
1554# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1555# the necessary Makefile rules, Perl scripts and LaTeX code to be able
1556# to generate PDF and DVI output from the Perl module output.
1557
1558PERLMOD_LATEX = NO
1559
1560# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1561# nicely formatted so it can be parsed by a human reader. This is useful
1562# if you want to understand what is going on. On the other hand, if this
1563# tag is set to NO the size of the Perl module output will be much smaller
1564# and Perl will parse it just the same.
1565
1566PERLMOD_PRETTY = YES
1567
1568# The names of the make variables in the generated doxyrules.make file
1569# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1570# This is useful so different doxyrules.make files included by the same
1571# Makefile don't overwrite each other's variables.
1572
1573PERLMOD_MAKEVAR_PREFIX =
1574
1575#---------------------------------------------------------------------------
1576# Configuration options related to the preprocessor
1577#---------------------------------------------------------------------------
1578
1579# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1580# evaluate all C-preprocessor directives found in the sources and include
1581# files.
1582
1583ENABLE_PREPROCESSING = YES
1584
1585# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1586# names in the source code. If set to NO (the default) only conditional
1587# compilation will be performed. Macro expansion can be done in a controlled
1588# way by setting EXPAND_ONLY_PREDEF to YES.
1589
1590MACRO_EXPANSION = NO
1591
1592# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1593# then the macro expansion is limited to the macros specified with the
1594# PREDEFINED and EXPAND_AS_DEFINED tags.
1595
1596EXPAND_ONLY_PREDEF = NO
1597
1598# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1599# pointed to by INCLUDE_PATH will be searched when a #include is found.
1600
1601SEARCH_INCLUDES = YES
1602
1603# The INCLUDE_PATH tag can be used to specify one or more directories that
1604# contain include files that are not input files but should be processed by
1605# the preprocessor.
1606
1607INCLUDE_PATH =
1608
1609# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1610# patterns (like *.h and *.hpp) to filter out the header-files in the
1611# directories. If left blank, the patterns specified with FILE_PATTERNS will
1612# be used.
1613
1614INCLUDE_FILE_PATTERNS =
1615
1616# The PREDEFINED tag can be used to specify one or more macro names that
1617# are defined before the preprocessor is started (similar to the -D option of
1618# gcc). The argument of the tag is a list of macros of the form: name
1619# or name=definition (no spaces). If the definition and the = are
1620# omitted =1 is assumed. To prevent a macro definition from being
1621# undefined via #undef or recursively expanded use the := operator
1622# instead of the = operator.
1623
1624PREDEFINED =
1625
1626# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1627# this tag can be used to specify a list of macro names that should be expanded.
1628# The macro definition that is found in the sources will be used.
1629# Use the PREDEFINED tag if you want to use a different macro definition that
1630# overrules the definition found in the source code.
1631
1632EXPAND_AS_DEFINED =
1633
1634# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1635# doxygen's preprocessor will remove all references to function-like macros
1636# that are alone on a line, have an all uppercase name, and do not end with a
1637# semicolon, because these will confuse the parser if not removed.
1638
1639SKIP_FUNCTION_MACROS = YES
1640
1641#---------------------------------------------------------------------------
1642# Configuration::additions related to external references
1643#---------------------------------------------------------------------------
1644
1645# The TAGFILES option can be used to specify one or more tagfiles. For each
1646# tag file the location of the external documentation should be added. The
1647# format of a tag file without this location is as follows:
1648# TAGFILES = file1 file2 ...
1649# Adding location for the tag files is done as follows:
1650# TAGFILES = file1=loc1 "file2 = loc2" ...
1651# where "loc1" and "loc2" can be relative or absolute paths
1652# or URLs. Note that each tag file must have a unique name (where the name does
1653# NOT include the path). If a tag file is not located in the directory in which
1654# doxygen is run, you must also specify the path to the tagfile here.
1655
1656TAGFILES =
1657
1658# When a file name is specified after GENERATE_TAGFILE, doxygen will create
1659# a tag file that is based on the input files it reads.
1660
1661GENERATE_TAGFILE =
1662
1663# If the ALLEXTERNALS tag is set to YES all external classes will be listed
1664# in the class index. If set to NO only the inherited external classes
1665# will be listed.
1666
1667ALLEXTERNALS = NO
1668
1669# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1670# in the modules index. If set to NO, only the current project's groups will
1671# be listed.
1672
1673EXTERNAL_GROUPS = YES
1674
1675# The PERL_PATH should be the absolute path and name of the perl script
1676# interpreter (i.e. the result of `which perl').
1677
1678PERL_PATH = /usr/bin/perl
1679
1680#---------------------------------------------------------------------------
1681# Configuration options related to the dot tool
1682#---------------------------------------------------------------------------
1683
1684# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1685# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1686# or super classes. Setting the tag to NO turns the diagrams off. Note that
1687# this option also works with HAVE_DOT disabled, but it is recommended to
1688# install and use dot, since it yields more powerful graphs.
1689
1690CLASS_DIAGRAMS = NO
1691
1692# You can define message sequence charts within doxygen comments using the \msc
1693# command. Doxygen will then run the mscgen tool (see
1694# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1695# documentation. The MSCGEN_PATH tag allows you to specify the directory where
1696# the mscgen tool resides. If left empty the tool is assumed to be found in the
1697# default search path.
1698
1699MSCGEN_PATH =
1700
1701# If set to YES, the inheritance and collaboration graphs will hide
1702# inheritance and usage relations if the target is undocumented
1703# or is not a class.
1704
1705HIDE_UNDOC_RELATIONS = YES
1706
1707# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1708# available from the path. This tool is part of Graphviz, a graph visualization
1709# toolkit from AT&T and Lucent Bell Labs. The other options in this section
1710# have no effect if this option is set to NO (the default)
1711
1712HAVE_DOT = NO
1713
1714# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1715# allowed to run in parallel. When set to 0 (the default) doxygen will
1716# base this on the number of processors available in the system. You can set it
1717# explicitly to a value larger than 0 to get control over the balance
1718# between CPU load and processing speed.
1719
1720DOT_NUM_THREADS = 0
1721
1722# By default doxygen will use the Helvetica font for all dot files that
1723# doxygen generates. When you want a differently looking font you can specify
1724# the font name using DOT_FONTNAME. You need to make sure dot is able to find
1725# the font, which can be done by putting it in a standard location or by setting
1726# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
1727# directory containing the font.
1728
1729DOT_FONTNAME = Helvetica
1730
1731# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1732# The default size is 10pt.
1733
1734DOT_FONTSIZE = 10
1735
1736# By default doxygen will tell dot to use the Helvetica font.
1737# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
1738# set the path where dot can find it.
1739
1740DOT_FONTPATH =
1741
1742# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1743# will generate a graph for each documented class showing the direct and
1744# indirect inheritance relations. Setting this tag to YES will force the
1745# CLASS_DIAGRAMS tag to NO.
1746
1747CLASS_GRAPH = YES
1748
1749# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1750# will generate a graph for each documented class showing the direct and
1751# indirect implementation dependencies (inheritance, containment, and
1752# class references variables) of the class with other documented classes.
1753
1754COLLABORATION_GRAPH = YES
1755
1756# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1757# will generate a graph for groups, showing the direct groups dependencies
1758
1759GROUP_GRAPHS = YES
1760
1761# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1762# collaboration diagrams in a style similar to the OMG's Unified Modeling
1763# Language.
1764
1765UML_LOOK = NO
1766
1767# If the UML_LOOK tag is enabled, the fields and methods are shown inside
1768# the class node. If there are many fields or methods and many nodes the
1769# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
1770# threshold limits the number of items for each type to make the size more
1771# managable. Set this to 0 for no limit. Note that the threshold may be
1772# exceeded by 50% before the limit is enforced.
1773
1774UML_LIMIT_NUM_FIELDS = 10
1775
1776# If set to YES, the inheritance and collaboration graphs will show the
1777# relations between templates and their instances.
1778
1779TEMPLATE_RELATIONS = NO
1780
1781# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1782# tags are set to YES then doxygen will generate a graph for each documented
1783# file showing the direct and indirect include dependencies of the file with
1784# other documented files.
1785
1786INCLUDE_GRAPH = YES
1787
1788# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1789# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1790# documented header file showing the documented files that directly or
1791# indirectly include this file.
1792
1793INCLUDED_BY_GRAPH = YES
1794
1795# If the CALL_GRAPH and HAVE_DOT options are set to YES then
1796# doxygen will generate a call dependency graph for every global function
1797# or class method. Note that enabling this option will significantly increase
1798# the time of a run. So in most cases it will be better to enable call graphs
1799# for selected functions only using the \callgraph command.
1800
1801CALL_GRAPH = NO
1802
1803# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1804# doxygen will generate a caller dependency graph for every global function
1805# or class method. Note that enabling this option will significantly increase
1806# the time of a run. So in most cases it will be better to enable caller
1807# graphs for selected functions only using the \callergraph command.
1808
1809CALLER_GRAPH = NO
1810
1811# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1812# will generate a graphical hierarchy of all classes instead of a textual one.
1813
1814GRAPHICAL_HIERARCHY = YES
1815
1816# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
1817# then doxygen will show the dependencies a directory has on other directories
1818# in a graphical way. The dependency relations are determined by the #include
1819# relations between the files in the directories.
1820
1821DIRECTORY_GRAPH = YES
1822
1823# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1824# generated by dot. Possible values are svg, png, jpg, or gif.
1825# If left blank png will be used. If you choose svg you need to set
1826# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1827# visible in IE 9+ (other browsers do not have this requirement).
1828
1829DOT_IMAGE_FORMAT = png
1830
1831# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
1832# enable generation of interactive SVG images that allow zooming and panning.
1833# Note that this requires a modern browser other than Internet Explorer.
1834# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
1835# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1836# visible. Older versions of IE do not have SVG support.
1837
1838INTERACTIVE_SVG = NO
1839
1840# The tag DOT_PATH can be used to specify the path where the dot tool can be
1841# found. If left blank, it is assumed the dot tool can be found in the path.
1842
1843DOT_PATH =
1844
1845# The DOTFILE_DIRS tag can be used to specify one or more directories that
1846# contain dot files that are included in the documentation (see the
1847# \dotfile command).
1848
1849DOTFILE_DIRS =
1850
1851# The MSCFILE_DIRS tag can be used to specify one or more directories that
1852# contain msc files that are included in the documentation (see the
1853# \mscfile command).
1854
1855MSCFILE_DIRS =
1856
1857# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1858# nodes that will be shown in the graph. If the number of nodes in a graph
1859# becomes larger than this value, doxygen will truncate the graph, which is
1860# visualized by representing a node as a red box. Note that doxygen if the
1861# number of direct children of the root node in a graph is already larger than
1862# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1863# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1864
1865DOT_GRAPH_MAX_NODES = 50
1866
1867# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1868# graphs generated by dot. A depth value of 3 means that only nodes reachable
1869# from the root by following a path via at most 3 edges will be shown. Nodes
1870# that lay further from the root node will be omitted. Note that setting this
1871# option to 1 or 2 may greatly reduce the computation time needed for large
1872# code bases. Also note that the size of a graph can be further restricted by
1873# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1874
1875MAX_DOT_GRAPH_DEPTH = 0
1876
1877# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1878# background. This is disabled by default, because dot on Windows does not
1879# seem to support this out of the box. Warning: Depending on the platform used,
1880# enabling this option may lead to badly anti-aliased labels on the edges of
1881# a graph (i.e. they become hard to read).
1882
1883DOT_TRANSPARENT = NO
1884
1885# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1886# files in one run (i.e. multiple -o and -T options on the command line). This
1887# makes dot run faster, but since only newer versions of dot (>1.8.10)
1888# support this, this feature is disabled by default.
1889
1890DOT_MULTI_TARGETS = NO
1891
1892# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1893# generate a legend page explaining the meaning of the various boxes and
1894# arrows in the dot generated graphs.
1895
1896GENERATE_LEGEND = YES
1897
1898# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1899# remove the intermediate dot files that are used to generate
1900# the various graphs.
1901
1902DOT_CLEANUP = YES
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 000000000..5104d81c2
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,13 @@
1HEADERS := $(wildcard ../include/android/*.h)
2
3all: html jd
4
5html: $(HEADERS) Doxyfile
6 mkdir -p html
7 doxygen
8
9jd: $(HEADERS) Doxyfile header.jd
10 mkdir -p jd
11 HTML_HEADER=header.jd HTML_FOOTER=footer.jd HTML_OUTPUT=jd doxygen
12 for file in jd/*.html; do mv "$${file}" "$${file/.html/.jd}"; done
13 rm -f jd/index.jd
diff --git a/docs/footer.jd b/docs/footer.jd
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/docs/footer.jd
diff --git a/docs/header.jd b/docs/header.jd
new file mode 100644
index 000000000..e50f41b03
--- /dev/null
+++ b/docs/header.jd
@@ -0,0 +1,3 @@
1page.title=$title
2page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
3@jd:body
diff --git a/include/android/asset_manager.h b/include/android/asset_manager.h
index f5df46bd7..d65483968 100644
--- a/include/android/asset_manager.h
+++ b/include/android/asset_manager.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Asset
19 * @{
20 */
21
22/**
23 * @file asset_manager.h
24 */
17 25
18#ifndef ANDROID_ASSET_MANAGER_H 26#ifndef ANDROID_ASSET_MANAGER_H
19#define ANDROID_ASSET_MANAGER_H 27#define ANDROID_ASSET_MANAGER_H
@@ -23,19 +31,49 @@ extern "C" {
23#endif 31#endif
24 32
25struct AAssetManager; 33struct AAssetManager;
34/**
35 * {@link AAssetManager} provides access to an application's raw assets by
36 * creating {@link AAsset} objects.
37 *
38 * AAssetManager is a wrapper to the low-level native implementation
39 * of the java {@link AAssetManager}, a pointer can be obtained using
40 * AAssetManager_fromJava().
41 *
42 * The asset hierarchy may be examined like a filesystem, using
43 * {@link AAssetDir} objects to peruse a single directory.
44 *
45 * A native {@link AAssetManager} pointer may be shared across multiple threads.
46 */
26typedef struct AAssetManager AAssetManager; 47typedef struct AAssetManager AAssetManager;
27 48
28struct AAssetDir; 49struct AAssetDir;
50/**
51 * {@link AAssetDir} provides access to a chunk of the asset hierarchy as if
52 * it were a single directory. The contents are populated by the
53 * {@link AAssetManager}.
54 *
55 * The list of files will be sorted in ascending order by ASCII value.
56 */
29typedef struct AAssetDir AAssetDir; 57typedef struct AAssetDir AAssetDir;
30 58
31struct AAsset; 59struct AAsset;
60/**
61 * {@link AAsset} provides access to a read-only asset.
62 *
63 * {@link AAsset} objects are NOT thread-safe, and should not be shared across
64 * threads.
65 */
32typedef struct AAsset AAsset; 66typedef struct AAsset AAsset;
33 67
34/* Available modes for opening assets */ 68/** Available access modes for opening assets with {@link AAssetManager_open} */
35enum { 69enum {
70 /** No specific information about how data will be accessed. **/
36 AASSET_MODE_UNKNOWN = 0, 71 AASSET_MODE_UNKNOWN = 0,
72 /** Read chunks, and seek forward and backward. */
37 AASSET_MODE_RANDOM = 1, 73 AASSET_MODE_RANDOM = 1,
74 /** Read sequentially, with an occasional forward seek. */
38 AASSET_MODE_STREAMING = 2, 75 AASSET_MODE_STREAMING = 2,
76 /** Caller plans to ask for a read-only buffer with all data. */
39 AASSET_MODE_BUFFER = 3 77 AASSET_MODE_BUFFER = 3
40}; 78};
41 79
@@ -173,3 +211,5 @@ int AAsset_isAllocated(AAsset* asset);
173#endif 211#endif
174 212
175#endif // ANDROID_ASSET_MANAGER_H 213#endif // ANDROID_ASSET_MANAGER_H
214
215/** @} */
diff --git a/include/android/asset_manager_jni.h b/include/android/asset_manager_jni.h
index aec2d3c97..dcee17e10 100644
--- a/include/android/asset_manager_jni.h
+++ b/include/android/asset_manager_jni.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Asset
19 * @{
20 */
21
22/**
23 * @file asset_manager_jni.h
24 */
17 25
18#ifndef ANDROID_ASSET_MANAGER_JNI_H 26#ifndef ANDROID_ASSET_MANAGER_JNI_H
19#define ANDROID_ASSET_MANAGER_JNI_H 27#define ANDROID_ASSET_MANAGER_JNI_H
@@ -38,3 +46,5 @@ AAssetManager* AAssetManager_fromJava(JNIEnv* env, jobject assetManager);
38#endif 46#endif
39 47
40#endif // ANDROID_ASSET_MANAGER_JNI_H 48#endif // ANDROID_ASSET_MANAGER_JNI_H
49
50/** @} */
diff --git a/include/android/bitmap.h b/include/android/bitmap.h
index 6e18763bf..261e64fac 100644
--- a/include/android/bitmap.h
+++ b/include/android/bitmap.h
@@ -14,6 +14,15 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Bitmap
19 * @{
20 */
21
22/**
23 * @file bitmap.h
24 */
25
17#ifndef ANDROID_BITMAP_H 26#ifndef ANDROID_BITMAP_H
18#define ANDROID_BITMAP_H 27#define ANDROID_BITMAP_H
19 28
@@ -24,33 +33,52 @@
24extern "C" { 33extern "C" {
25#endif 34#endif
26 35
27#define ANDROID_BITMAP_RESULT_SUCCESS 0 36/** AndroidBitmap functions result code. */
28#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1 37enum {
29#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2 38 /** Operation was successful. */
30#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3 39 ANDROID_BITMAP_RESULT_SUCCESS = 0,
40 /** Bad parameter. */
41 ANDROID_BITMAP_RESULT_BAD_PARAMETER = -1,
42 /** JNI exception occured. */
43 ANDROID_BITMAP_RESULT_JNI_EXCEPTION = -2,
44 /** Allocation failed. */
45 ANDROID_BITMAP_RESULT_ALLOCATION_FAILED = -3,
46};
31 47
32/* Backward compatibility: this macro used to be misspelled. */ 48/** Backward compatibility: this macro used to be misspelled. */
33#define ANDROID_BITMAP_RESUT_SUCCESS ANDROID_BITMAP_RESULT_SUCCESS 49#define ANDROID_BITMAP_RESUT_SUCCESS ANDROID_BITMAP_RESULT_SUCCESS
34 50
51/** Bitmap pixel format. */
35enum AndroidBitmapFormat { 52enum AndroidBitmapFormat {
53 /** No format. */
36 ANDROID_BITMAP_FORMAT_NONE = 0, 54 ANDROID_BITMAP_FORMAT_NONE = 0,
55 /** Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. **/
37 ANDROID_BITMAP_FORMAT_RGBA_8888 = 1, 56 ANDROID_BITMAP_FORMAT_RGBA_8888 = 1,
57 /** Red: 5 bits, Green: 6 bits, Blue: 5 bits. **/
38 ANDROID_BITMAP_FORMAT_RGB_565 = 4, 58 ANDROID_BITMAP_FORMAT_RGB_565 = 4,
59 /** Red: 4 bits, Green: 4 bits, Blue: 4 bits, Alpha: 4 bits. **/
39 ANDROID_BITMAP_FORMAT_RGBA_4444 = 7, 60 ANDROID_BITMAP_FORMAT_RGBA_4444 = 7,
61 /** Deprecated. */
40 ANDROID_BITMAP_FORMAT_A_8 = 8, 62 ANDROID_BITMAP_FORMAT_A_8 = 8,
41}; 63};
42 64
65/** Bitmap info, see AndroidBitmap_getInfo(). */
43typedef struct { 66typedef struct {
67 /** The bitmap width in pixels. */
44 uint32_t width; 68 uint32_t width;
69 /** The bitmap height in pixels. */
45 uint32_t height; 70 uint32_t height;
71 /** The number of byte per row. */
46 uint32_t stride; 72 uint32_t stride;
73 /** The bitmap pixel format. See {@link AndroidBitmapFormat} */
47 int32_t format; 74 int32_t format;
75 /** Unused. */
48 uint32_t flags; // 0 for now 76 uint32_t flags; // 0 for now
49} AndroidBitmapInfo; 77} AndroidBitmapInfo;
50 78
51/** 79/**
52 * Given a java bitmap object, fill out the AndroidBitmap struct for it. 80 * Given a java bitmap object, fill out the AndroidBitmapInfo struct for it.
53 * If the call fails, the info parameter will be ignored 81 * If the call fails, the info parameter will be ignored.
54 */ 82 */
55int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap, 83int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
56 AndroidBitmapInfo* info); 84 AndroidBitmapInfo* info);
@@ -71,7 +99,7 @@ int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
71int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr); 99int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr);
72 100
73/** 101/**
74 * Call this to balanace a successful call to AndroidBitmap_lockPixels 102 * Call this to balance a successful call to AndroidBitmap_lockPixels.
75 */ 103 */
76int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap); 104int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
77 105
@@ -80,3 +108,5 @@ int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
80#endif 108#endif
81 109
82#endif 110#endif
111
112/** @} */
diff --git a/include/android/configuration.h b/include/android/configuration.h
index 7573ccac3..81f71a92c 100644
--- a/include/android/configuration.h
+++ b/include/android/configuration.h
@@ -14,6 +14,15 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Configuration
19 * @{
20 */
21
22/**
23 * @file configuration.h
24 */
25
17#ifndef ANDROID_CONFIGURATION_H 26#ifndef ANDROID_CONFIGURATION_H
18#define ANDROID_CONFIGURATION_H 27#define ANDROID_CONFIGURATION_H
19 28
@@ -24,103 +33,400 @@ extern "C" {
24#endif 33#endif
25 34
26struct AConfiguration; 35struct AConfiguration;
36/**
37 * {@link AConfiguration} is an opaque type used to get and set
38 * various subsystem configurations.
39 *
40 * A {@link AConfiguration} pointer can be obtained using:
41 * - AConfiguration_new()
42 * - AConfiguration_fromAssetManager()
43 */
27typedef struct AConfiguration AConfiguration; 44typedef struct AConfiguration AConfiguration;
28 45
46
47/**
48 * Define flags and constants for various subsystem configurations.
49 */
29enum { 50enum {
51 /** Orientation: not specified. */
30 ACONFIGURATION_ORIENTATION_ANY = 0x0000, 52 ACONFIGURATION_ORIENTATION_ANY = 0x0000,
53 /**
54 * Orientation: value corresponding to the
55 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">port</a>
56 * resource qualifier.
57 */
31 ACONFIGURATION_ORIENTATION_PORT = 0x0001, 58 ACONFIGURATION_ORIENTATION_PORT = 0x0001,
59 /**
60 * Orientation: value corresponding to the
61 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">land</a>
62 * resource qualifier.
63 */
32 ACONFIGURATION_ORIENTATION_LAND = 0x0002, 64 ACONFIGURATION_ORIENTATION_LAND = 0x0002,
65 /** @deprecated Not currently supported or used. */
33 ACONFIGURATION_ORIENTATION_SQUARE = 0x0003, 66 ACONFIGURATION_ORIENTATION_SQUARE = 0x0003,
34 67
68 /** Touchscreen: not specified. */
35 ACONFIGURATION_TOUCHSCREEN_ANY = 0x0000, 69 ACONFIGURATION_TOUCHSCREEN_ANY = 0x0000,
70 /**
71 * Touchscreen: value corresponding to the
72 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">notouch</a>
73 * resource qualifier.
74 */
36 ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 0x0001, 75 ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 0x0001,
76 /** @deprecated Not currently supported or used. */
37 ACONFIGURATION_TOUCHSCREEN_STYLUS = 0x0002, 77 ACONFIGURATION_TOUCHSCREEN_STYLUS = 0x0002,
78 /**
79 * Touchscreen: value corresponding to the
80 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">finger</a>
81 * resource qualifier.
82 */
38 ACONFIGURATION_TOUCHSCREEN_FINGER = 0x0003, 83 ACONFIGURATION_TOUCHSCREEN_FINGER = 0x0003,
39 84
85 /** Density: default density. */
40 ACONFIGURATION_DENSITY_DEFAULT = 0, 86 ACONFIGURATION_DENSITY_DEFAULT = 0,
87 /**
88 * Density: value corresponding to the
89 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">ldpi</a>
90 * resource qualifier.
91 */
41 ACONFIGURATION_DENSITY_LOW = 120, 92 ACONFIGURATION_DENSITY_LOW = 120,
93 /**
94 * Density: value corresponding to the
95 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">mdpi</a>
96 * resource qualifier.
97 */
42 ACONFIGURATION_DENSITY_MEDIUM = 160, 98 ACONFIGURATION_DENSITY_MEDIUM = 160,
99 /**
100 * Density: value corresponding to the
101 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">tvdpi</a>
102 * resource qualifier.
103 */
43 ACONFIGURATION_DENSITY_TV = 213, 104 ACONFIGURATION_DENSITY_TV = 213,
105 /**
106 * Density: value corresponding to the
107 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">hdpi</a>
108 * resource qualifier.
109 */
44 ACONFIGURATION_DENSITY_HIGH = 240, 110 ACONFIGURATION_DENSITY_HIGH = 240,
111 /**
112 * Density: value corresponding to the
113 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xhdpi</a>
114 * resource qualifier.
115 */
45 ACONFIGURATION_DENSITY_XHIGH = 320, 116 ACONFIGURATION_DENSITY_XHIGH = 320,
117 /**
118 * Density: value corresponding to the
119 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xxhdpi</a>
120 * resource qualifier.
121 */
46 ACONFIGURATION_DENSITY_XXHIGH = 480, 122 ACONFIGURATION_DENSITY_XXHIGH = 480,
123 /**
124 * Density: value corresponding to the
125 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xxxhdpi</a>
126 * resource qualifier.
127 */
47 ACONFIGURATION_DENSITY_XXXHIGH = 640, 128 ACONFIGURATION_DENSITY_XXXHIGH = 640,
129 /** Density: any density. */
48 ACONFIGURATION_DENSITY_ANY = 0xfffe, 130 ACONFIGURATION_DENSITY_ANY = 0xfffe,
131 /** Density: no density specified. */
49 ACONFIGURATION_DENSITY_NONE = 0xffff, 132 ACONFIGURATION_DENSITY_NONE = 0xffff,
50 133
134 /** Keyboard: not specified. */
51 ACONFIGURATION_KEYBOARD_ANY = 0x0000, 135 ACONFIGURATION_KEYBOARD_ANY = 0x0000,
136 /**
137 * Keyboard: value corresponding to the
138 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">nokeys</a>
139 * resource qualifier.
140 */
52 ACONFIGURATION_KEYBOARD_NOKEYS = 0x0001, 141 ACONFIGURATION_KEYBOARD_NOKEYS = 0x0001,
142 /**
143 * Keyboard: value corresponding to the
144 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">qwerty</a>
145 * resource qualifier.
146 */
53 ACONFIGURATION_KEYBOARD_QWERTY = 0x0002, 147 ACONFIGURATION_KEYBOARD_QWERTY = 0x0002,
148 /**
149 * Keyboard: value corresponding to the
150 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">12key</a>
151 * resource qualifier.
152 */
54 ACONFIGURATION_KEYBOARD_12KEY = 0x0003, 153 ACONFIGURATION_KEYBOARD_12KEY = 0x0003,
55 154
155 /** Navigation: not specified. */
56 ACONFIGURATION_NAVIGATION_ANY = 0x0000, 156 ACONFIGURATION_NAVIGATION_ANY = 0x0000,
157 /**
158 * Navigation: value corresponding to the
159 * <a href="@@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">nonav</a>
160 * resource qualifier.
161 */
57 ACONFIGURATION_NAVIGATION_NONAV = 0x0001, 162 ACONFIGURATION_NAVIGATION_NONAV = 0x0001,
163 /**
164 * Navigation: value corresponding to the
165 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">dpad</a>
166 * resource qualifier.
167 */
58 ACONFIGURATION_NAVIGATION_DPAD = 0x0002, 168 ACONFIGURATION_NAVIGATION_DPAD = 0x0002,
169 /**
170 * Navigation: value corresponding to the
171 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">trackball</a>
172 * resource qualifier.
173 */
59 ACONFIGURATION_NAVIGATION_TRACKBALL = 0x0003, 174 ACONFIGURATION_NAVIGATION_TRACKBALL = 0x0003,
175 /**
176 * Navigation: value corresponding to the
177 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">wheel</a>
178 * resource qualifier.
179 */
60 ACONFIGURATION_NAVIGATION_WHEEL = 0x0004, 180 ACONFIGURATION_NAVIGATION_WHEEL = 0x0004,
61 181
182 /** Keyboard availability: not specified. */
62 ACONFIGURATION_KEYSHIDDEN_ANY = 0x0000, 183 ACONFIGURATION_KEYSHIDDEN_ANY = 0x0000,
184 /**
185 * Keyboard availability: value corresponding to the
186 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keysexposed</a>
187 * resource qualifier.
188 */
63 ACONFIGURATION_KEYSHIDDEN_NO = 0x0001, 189 ACONFIGURATION_KEYSHIDDEN_NO = 0x0001,
190 /**
191 * Keyboard availability: value corresponding to the
192 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyshidden</a>
193 * resource qualifier.
194 */
64 ACONFIGURATION_KEYSHIDDEN_YES = 0x0002, 195 ACONFIGURATION_KEYSHIDDEN_YES = 0x0002,
196 /**
197 * Keyboard availability: value corresponding to the
198 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyssoft</a>
199 * resource qualifier.
200 */
65 ACONFIGURATION_KEYSHIDDEN_SOFT = 0x0003, 201 ACONFIGURATION_KEYSHIDDEN_SOFT = 0x0003,
66 202
203 /** Navigation availability: not specified. */
67 ACONFIGURATION_NAVHIDDEN_ANY = 0x0000, 204 ACONFIGURATION_NAVHIDDEN_ANY = 0x0000,
205 /**
206 * Navigation availability: value corresponding to the
207 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavAvailQualifier">navexposed</a>
208 * resource qualifier.
209 */
68 ACONFIGURATION_NAVHIDDEN_NO = 0x0001, 210 ACONFIGURATION_NAVHIDDEN_NO = 0x0001,
211 /**
212 * Navigation availability: value corresponding to the
213 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavAvailQualifier">navhidden</a>
214 * resource qualifier.
215 */
69 ACONFIGURATION_NAVHIDDEN_YES = 0x0002, 216 ACONFIGURATION_NAVHIDDEN_YES = 0x0002,
70 217
218 /** Screen size: not specified. */
71 ACONFIGURATION_SCREENSIZE_ANY = 0x00, 219 ACONFIGURATION_SCREENSIZE_ANY = 0x00,
220 /**
221 * Screen size: value indicating the screen is at least
222 * approximately 320x426 dp units, corresponding to the
223 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">small</a>
224 * resource qualifier.
225 */
72 ACONFIGURATION_SCREENSIZE_SMALL = 0x01, 226 ACONFIGURATION_SCREENSIZE_SMALL = 0x01,
227 /**
228 * Screen size: value indicating the screen is at least
229 * approximately 320x470 dp units, corresponding to the
230 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">normal</a>
231 * resource qualifier.
232 */
73 ACONFIGURATION_SCREENSIZE_NORMAL = 0x02, 233 ACONFIGURATION_SCREENSIZE_NORMAL = 0x02,
234 /**
235 * Screen size: value indicating the screen is at least
236 * approximately 480x640 dp units, corresponding to the
237 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">large</a>
238 * resource qualifier.
239 */
74 ACONFIGURATION_SCREENSIZE_LARGE = 0x03, 240 ACONFIGURATION_SCREENSIZE_LARGE = 0x03,
241 /**
242 * Screen size: value indicating the screen is at least
243 * approximately 720x960 dp units, corresponding to the
244 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">xlarge</a>
245 * resource qualifier.
246 */
75 ACONFIGURATION_SCREENSIZE_XLARGE = 0x04, 247 ACONFIGURATION_SCREENSIZE_XLARGE = 0x04,
76 248
249 /** Screen layout: not specified. */
77 ACONFIGURATION_SCREENLONG_ANY = 0x00, 250 ACONFIGURATION_SCREENLONG_ANY = 0x00,
251 /**
252 * Screen layout: value that corresponds to the
253 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">notlong</a>
254 * resource qualifier.
255 */
78 ACONFIGURATION_SCREENLONG_NO = 0x1, 256 ACONFIGURATION_SCREENLONG_NO = 0x1,
257 /**
258 * Screen layout: value that corresponds to the
259 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">long</a>
260 * resource qualifier.
261 */
79 ACONFIGURATION_SCREENLONG_YES = 0x2, 262 ACONFIGURATION_SCREENLONG_YES = 0x2,
80 263
81 ACONFIGURATION_SCREENROUND_ANY = 0x00, 264 ACONFIGURATION_SCREENROUND_ANY = 0x00,
82 ACONFIGURATION_SCREENROUND_NO = 0x1, 265 ACONFIGURATION_SCREENROUND_NO = 0x1,
83 ACONFIGURATION_SCREENROUND_YES = 0x2, 266 ACONFIGURATION_SCREENROUND_YES = 0x2,
84 267
268 /** UI mode: not specified. */
85 ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00, 269 ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00,
270 /**
271 * UI mode: value that corresponds to
272 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">no
273 * UI mode type</a> resource qualifier specified.
274 */
86 ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01, 275 ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01,
276 /**
277 * UI mode: value that corresponds to
278 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">desk</a> resource qualifier specified.
279 */
87 ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02, 280 ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02,
281 /**
282 * UI mode: value that corresponds to
283 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">car</a> resource qualifier specified.
284 */
88 ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03, 285 ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
286 /**
287 * UI mode: value that corresponds to
288 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">television</a> resource qualifier specified.
289 */
89 ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04, 290 ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
291 /**
292 * UI mode: value that corresponds to
293 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">appliance</a> resource qualifier specified.
294 */
90 ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05, 295 ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05,
296 /**
297 * UI mode: value that corresponds to
298 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">watch</a> resource qualifier specified.
299 */
91 ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06, 300 ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06,
92 301
302 /** UI night mode: not specified.*/
93 ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00, 303 ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
304 /**
305 * UI night mode: value that corresponds to
306 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NightQualifier">notnight</a> resource qualifier specified.
307 */
94 ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1, 308 ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
309 /**
310 * UI night mode: value that corresponds to
311 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NightQualifier">night</a> resource qualifier specified.
312 */
95 ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2, 313 ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2,
96 314
315 /** Screen width DPI: not specified. */
97 ACONFIGURATION_SCREEN_WIDTH_DP_ANY = 0x0000, 316 ACONFIGURATION_SCREEN_WIDTH_DP_ANY = 0x0000,
98 317
318 /** Screen height DPI: not specified. */
99 ACONFIGURATION_SCREEN_HEIGHT_DP_ANY = 0x0000, 319 ACONFIGURATION_SCREEN_HEIGHT_DP_ANY = 0x0000,
100 320
321 /** Smallest screen width DPI: not specified.*/
101 ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY = 0x0000, 322 ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY = 0x0000,
102 323
324 /** Layout direction: not specified. */
103 ACONFIGURATION_LAYOUTDIR_ANY = 0x00, 325 ACONFIGURATION_LAYOUTDIR_ANY = 0x00,
326 /**
327 * Layout direction: value that corresponds to
328 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldltr</a> resource qualifier specified.
329 */
104 ACONFIGURATION_LAYOUTDIR_LTR = 0x01, 330 ACONFIGURATION_LAYOUTDIR_LTR = 0x01,
331 /**
332 * Layout direction: value that corresponds to
333 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldrtl</a> resource qualifier specified.
334 */
105 ACONFIGURATION_LAYOUTDIR_RTL = 0x02, 335 ACONFIGURATION_LAYOUTDIR_RTL = 0x02,
106 336
337 /**
338 * Bit mask for
339 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#MccQualifier">mcc</a>
340 * configuration.
341 */
107 ACONFIGURATION_MCC = 0x0001, 342 ACONFIGURATION_MCC = 0x0001,
343 /**
344 * Bit mask for
345 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#MccQualifier">mnc</a>
346 * configuration.
347 */
108 ACONFIGURATION_MNC = 0x0002, 348 ACONFIGURATION_MNC = 0x0002,
349 /**
350 * Bit mask for
351 * <a href="{@docRoot}guide/topics/resources/providing-resources.html#LocaleQualifier">locale</a>
352 * configuration.
353 */
109 ACONFIGURATION_LOCALE = 0x0004, 354 ACONFIGURATION_LOCALE = 0x0004,
355 /**
356 * Bit mask for
357 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">touchscreen</a>
358 * configuration.
359 */
110 ACONFIGURATION_TOUCHSCREEN = 0x0008, 360 ACONFIGURATION_TOUCHSCREEN = 0x0008,
361 /**
362 * Bit mask for
363 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">keyboard</a>
364 * configuration.
365 */
111 ACONFIGURATION_KEYBOARD = 0x0010, 366 ACONFIGURATION_KEYBOARD = 0x0010,
367 /**
368 * Bit mask for
369 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyboardHidden</a>
370 * configuration.
371 */
112 ACONFIGURATION_KEYBOARD_HIDDEN = 0x0020, 372 ACONFIGURATION_KEYBOARD_HIDDEN = 0x0020,
373 /**
374 * Bit mask for
375 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">navigation</a>
376 * configuration.
377 */
113 ACONFIGURATION_NAVIGATION = 0x0040, 378 ACONFIGURATION_NAVIGATION = 0x0040,
379 /**
380 * Bit mask for
381 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">orientation</a>
382 * configuration.
383 */
114 ACONFIGURATION_ORIENTATION = 0x0080, 384 ACONFIGURATION_ORIENTATION = 0x0080,
385 /**
386 * Bit mask for
387 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">density</a>
388 * configuration.
389 */
115 ACONFIGURATION_DENSITY = 0x0100, 390 ACONFIGURATION_DENSITY = 0x0100,
391 /**
392 * Bit mask for
393 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">screen size</a>
394 * configuration.
395 */
116 ACONFIGURATION_SCREEN_SIZE = 0x0200, 396 ACONFIGURATION_SCREEN_SIZE = 0x0200,
397 /**
398 * Bit mask for
399 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#VersionQualifier">platform version</a>
400 * configuration.
401 */
117 ACONFIGURATION_VERSION = 0x0400, 402 ACONFIGURATION_VERSION = 0x0400,
403 /**
404 * Bit mask for screen layout configuration.
405 */
118 ACONFIGURATION_SCREEN_LAYOUT = 0x0800, 406 ACONFIGURATION_SCREEN_LAYOUT = 0x0800,
407 /**
408 * Bit mask for
409 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">ui mode</a>
410 * configuration.
411 */
119 ACONFIGURATION_UI_MODE = 0x1000, 412 ACONFIGURATION_UI_MODE = 0x1000,
413 /**
414 * Bit mask for
415 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">smallest screen width</a>
416 * configuration.
417 */
120 ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000, 418 ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000,
419 /**
420 * Bit mask for
421 * <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">layout direction</a>
422 * configuration.
423 */
121 ACONFIGURATION_LAYOUTDIR = 0x4000, 424 ACONFIGURATION_LAYOUTDIR = 0x4000,
122 ACONFIGURATION_SCREEN_ROUND = 0x8000, 425 ACONFIGURATION_SCREEN_ROUND = 0x8000,
123 426 /**
427 * Constant used to to represent MNC (Mobile Network Code) zero.
428 * 0 cannot be used, since it is used to represent an undefined MNC.
429 */
124 ACONFIGURATION_MNC_ZERO = 0xffff, 430 ACONFIGURATION_MNC_ZERO = 0xffff,
125}; 431};
126 432
@@ -137,7 +443,7 @@ void AConfiguration_delete(AConfiguration* config);
137 443
138/** 444/**
139 * Create and return a new AConfiguration based on the current configuration in 445 * Create and return a new AConfiguration based on the current configuration in
140 * use in the given AssetManager. 446 * use in the given {@link AAssetManager}.
141 */ 447 */
142void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am); 448void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am);
143 449
@@ -398,3 +704,5 @@ int32_t AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test,
398#endif 704#endif
399 705
400#endif // ANDROID_CONFIGURATION_H 706#endif // ANDROID_CONFIGURATION_H
707
708/** @} */
diff --git a/include/android/input.h b/include/android/input.h
index efbbb8558..5ab4e2926 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -14,6 +14,15 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Input
19 * @{
20 */
21
22/**
23 * @file input.h
24 */
25
17#ifndef _ANDROID_INPUT_H 26#ifndef _ANDROID_INPUT_H
18#define _ANDROID_INPUT_H 27#define _ANDROID_INPUT_H
19 28
@@ -49,247 +58,271 @@
49extern "C" { 58extern "C" {
50#endif 59#endif
51 60
52/* 61/**
53 * Key states (may be returned by queries about the current state of a 62 * Key states (may be returned by queries about the current state of a
54 * particular key code, scan code or switch). 63 * particular key code, scan code or switch).
55 */ 64 */
56enum { 65enum {
57 /* The key state is unknown or the requested key itself is not supported. */ 66 /** The key state is unknown or the requested key itself is not supported. */
58 AKEY_STATE_UNKNOWN = -1, 67 AKEY_STATE_UNKNOWN = -1,
59 68
60 /* The key is up. */ 69 /** The key is up. */
61 AKEY_STATE_UP = 0, 70 AKEY_STATE_UP = 0,
62 71
63 /* The key is down. */ 72 /** The key is down. */
64 AKEY_STATE_DOWN = 1, 73 AKEY_STATE_DOWN = 1,
65 74
66 /* The key is down but is a virtual key press that is being emulated by the system. */ 75 /** The key is down but is a virtual key press that is being emulated by the system. */
67 AKEY_STATE_VIRTUAL = 2 76 AKEY_STATE_VIRTUAL = 2
68}; 77};
69 78
70/* 79/**
71 * Meta key / modifer state. 80 * Meta key / modifer state.
72 */ 81 */
73enum { 82enum {
74 /* No meta keys are pressed. */ 83 /** No meta keys are pressed. */
75 AMETA_NONE = 0, 84 AMETA_NONE = 0,
76 85
77 /* This mask is used to check whether one of the ALT meta keys is pressed. */ 86 /** This mask is used to check whether one of the ALT meta keys is pressed. */
78 AMETA_ALT_ON = 0x02, 87 AMETA_ALT_ON = 0x02,
79 88
80 /* This mask is used to check whether the left ALT meta key is pressed. */ 89 /** This mask is used to check whether the left ALT meta key is pressed. */
81 AMETA_ALT_LEFT_ON = 0x10, 90 AMETA_ALT_LEFT_ON = 0x10,
82 91
83 /* This mask is used to check whether the right ALT meta key is pressed. */ 92 /** This mask is used to check whether the right ALT meta key is pressed. */
84 AMETA_ALT_RIGHT_ON = 0x20, 93 AMETA_ALT_RIGHT_ON = 0x20,
85 94
86 /* This mask is used to check whether one of the SHIFT meta keys is pressed. */ 95 /** This mask is used to check whether one of the SHIFT meta keys is pressed. */
87 AMETA_SHIFT_ON = 0x01, 96 AMETA_SHIFT_ON = 0x01,
88 97
89 /* This mask is used to check whether the left SHIFT meta key is pressed. */ 98 /** This mask is used to check whether the left SHIFT meta key is pressed. */
90 AMETA_SHIFT_LEFT_ON = 0x40, 99 AMETA_SHIFT_LEFT_ON = 0x40,
91 100
92 /* This mask is used to check whether the right SHIFT meta key is pressed. */ 101 /** This mask is used to check whether the right SHIFT meta key is pressed. */
93 AMETA_SHIFT_RIGHT_ON = 0x80, 102 AMETA_SHIFT_RIGHT_ON = 0x80,
94 103
95 /* This mask is used to check whether the SYM meta key is pressed. */ 104 /** This mask is used to check whether the SYM meta key is pressed. */
96 AMETA_SYM_ON = 0x04, 105 AMETA_SYM_ON = 0x04,
97 106
98 /* This mask is used to check whether the FUNCTION meta key is pressed. */ 107 /** This mask is used to check whether the FUNCTION meta key is pressed. */
99 AMETA_FUNCTION_ON = 0x08, 108 AMETA_FUNCTION_ON = 0x08,
100 109
101 /* This mask is used to check whether one of the CTRL meta keys is pressed. */ 110 /** This mask is used to check whether one of the CTRL meta keys is pressed. */
102 AMETA_CTRL_ON = 0x1000, 111 AMETA_CTRL_ON = 0x1000,
103 112
104 /* This mask is used to check whether the left CTRL meta key is pressed. */ 113 /** This mask is used to check whether the left CTRL meta key is pressed. */
105 AMETA_CTRL_LEFT_ON = 0x2000, 114 AMETA_CTRL_LEFT_ON = 0x2000,
106 115
107 /* This mask is used to check whether the right CTRL meta key is pressed. */ 116 /** This mask is used to check whether the right CTRL meta key is pressed. */
108 AMETA_CTRL_RIGHT_ON = 0x4000, 117 AMETA_CTRL_RIGHT_ON = 0x4000,
109 118
110 /* This mask is used to check whether one of the META meta keys is pressed. */ 119 /** This mask is used to check whether one of the META meta keys is pressed. */
111 AMETA_META_ON = 0x10000, 120 AMETA_META_ON = 0x10000,
112 121
113 /* This mask is used to check whether the left META meta key is pressed. */ 122 /** This mask is used to check whether the left META meta key is pressed. */
114 AMETA_META_LEFT_ON = 0x20000, 123 AMETA_META_LEFT_ON = 0x20000,
115 124
116 /* This mask is used to check whether the right META meta key is pressed. */ 125 /** This mask is used to check whether the right META meta key is pressed. */
117 AMETA_META_RIGHT_ON = 0x40000, 126 AMETA_META_RIGHT_ON = 0x40000,
118 127
119 /* This mask is used to check whether the CAPS LOCK meta key is on. */ 128 /** This mask is used to check whether the CAPS LOCK meta key is on. */
120 AMETA_CAPS_LOCK_ON = 0x100000, 129 AMETA_CAPS_LOCK_ON = 0x100000,
121 130
122 /* This mask is used to check whether the NUM LOCK meta key is on. */ 131 /** This mask is used to check whether the NUM LOCK meta key is on. */
123 AMETA_NUM_LOCK_ON = 0x200000, 132 AMETA_NUM_LOCK_ON = 0x200000,
124 133
125 /* This mask is used to check whether the SCROLL LOCK meta key is on. */ 134 /** This mask is used to check whether the SCROLL LOCK meta key is on. */
126 AMETA_SCROLL_LOCK_ON = 0x400000, 135 AMETA_SCROLL_LOCK_ON = 0x400000,
127}; 136};
128 137
129/* 138struct AInputEvent;
139/**
130 * Input events. 140 * Input events.
131 * 141 *
132 * Input events are opaque structures. Use the provided accessors functions to 142 * Input events are opaque structures. Use the provided accessors functions to
133 * read their properties. 143 * read their properties.
134 */ 144 */
135struct AInputEvent;
136typedef struct AInputEvent AInputEvent; 145typedef struct AInputEvent AInputEvent;
137 146
138/* 147/**
139 * Input event types. 148 * Input event types.
140 */ 149 */
141enum { 150enum {
142 /* Indicates that the input event is a key event. */ 151 /** Indicates that the input event is a key event. */
143 AINPUT_EVENT_TYPE_KEY = 1, 152 AINPUT_EVENT_TYPE_KEY = 1,
144 153
145 /* Indicates that the input event is a motion event. */ 154 /** Indicates that the input event is a motion event. */
146 AINPUT_EVENT_TYPE_MOTION = 2 155 AINPUT_EVENT_TYPE_MOTION = 2
147}; 156};
148 157
149/* 158/**
150 * Key event actions. 159 * Key event actions.
151 */ 160 */
152enum { 161enum {
153 /* The key has been pressed down. */ 162 /** The key has been pressed down. */
154 AKEY_EVENT_ACTION_DOWN = 0, 163 AKEY_EVENT_ACTION_DOWN = 0,
155 164
156 /* The key has been released. */ 165 /** The key has been released. */
157 AKEY_EVENT_ACTION_UP = 1, 166 AKEY_EVENT_ACTION_UP = 1,
158 167
159 /* Multiple duplicate key events have occurred in a row, or a complex string is 168 /**
160 * being delivered. The repeat_count property of the key event contains the number 169 * Multiple duplicate key events have occurred in a row, or a
161 * of times the given key code should be executed. 170 * complex string is being delivered. The repeat_count property
171 * of the key event contains the number of times the given key
172 * code should be executed.
162 */ 173 */
163 AKEY_EVENT_ACTION_MULTIPLE = 2 174 AKEY_EVENT_ACTION_MULTIPLE = 2
164}; 175};
165 176
166/* 177/**
167 * Key event flags. 178 * Key event flags.
168 */ 179 */
169enum { 180enum {
170 /* This mask is set if the device woke because of this key event. */ 181 /** This mask is set if the device woke because of this key event. */
171 AKEY_EVENT_FLAG_WOKE_HERE = 0x1, 182 AKEY_EVENT_FLAG_WOKE_HERE = 0x1,
172 183
173 /* This mask is set if the key event was generated by a software keyboard. */ 184 /** This mask is set if the key event was generated by a software keyboard. */
174 AKEY_EVENT_FLAG_SOFT_KEYBOARD = 0x2, 185 AKEY_EVENT_FLAG_SOFT_KEYBOARD = 0x2,
175 186
176 /* This mask is set if we don't want the key event to cause us to leave touch mode. */ 187 /** This mask is set if we don't want the key event to cause us to leave touch mode. */
177 AKEY_EVENT_FLAG_KEEP_TOUCH_MODE = 0x4, 188 AKEY_EVENT_FLAG_KEEP_TOUCH_MODE = 0x4,
178 189
179 /* This mask is set if an event was known to come from a trusted part 190 /**
180 * of the system. That is, the event is known to come from the user, 191 * This mask is set if an event was known to come from a trusted
181 * and could not have been spoofed by a third party component. */ 192 * part of the system. That is, the event is known to come from
193 * the user, and could not have been spoofed by a third party
194 * component.
195 */
182 AKEY_EVENT_FLAG_FROM_SYSTEM = 0x8, 196 AKEY_EVENT_FLAG_FROM_SYSTEM = 0x8,
183 197
184 /* This mask is used for compatibility, to identify enter keys that are 198 /**
199 * This mask is used for compatibility, to identify enter keys that are
185 * coming from an IME whose enter key has been auto-labelled "next" or 200 * coming from an IME whose enter key has been auto-labelled "next" or
186 * "done". This allows TextView to dispatch these as normal enter keys 201 * "done". This allows TextView to dispatch these as normal enter keys
187 * for old applications, but still do the appropriate action when 202 * for old applications, but still do the appropriate action when
188 * receiving them. */ 203 * receiving them.
204 */
189 AKEY_EVENT_FLAG_EDITOR_ACTION = 0x10, 205 AKEY_EVENT_FLAG_EDITOR_ACTION = 0x10,
190 206
191 /* When associated with up key events, this indicates that the key press 207 /**
208 * When associated with up key events, this indicates that the key press
192 * has been canceled. Typically this is used with virtual touch screen 209 * has been canceled. Typically this is used with virtual touch screen
193 * keys, where the user can slide from the virtual key area on to the 210 * keys, where the user can slide from the virtual key area on to the
194 * display: in that case, the application will receive a canceled up 211 * display: in that case, the application will receive a canceled up
195 * event and should not perform the action normally associated with the 212 * event and should not perform the action normally associated with the
196 * key. Note that for this to work, the application can not perform an 213 * key. Note that for this to work, the application can not perform an
197 * action for a key until it receives an up or the long press timeout has 214 * action for a key until it receives an up or the long press timeout has
198 * expired. */ 215 * expired.
216 */
199 AKEY_EVENT_FLAG_CANCELED = 0x20, 217 AKEY_EVENT_FLAG_CANCELED = 0x20,
200 218
201 /* This key event was generated by a virtual (on-screen) hard key area. 219 /**
220 * This key event was generated by a virtual (on-screen) hard key area.
202 * Typically this is an area of the touchscreen, outside of the regular 221 * Typically this is an area of the touchscreen, outside of the regular
203 * display, dedicated to "hardware" buttons. */ 222 * display, dedicated to "hardware" buttons.
223 */
204 AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY = 0x40, 224 AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY = 0x40,
205 225
206 /* This flag is set for the first key repeat that occurs after the 226 /**
207 * long press timeout. */ 227 * This flag is set for the first key repeat that occurs after the
228 * long press timeout.
229 */
208 AKEY_EVENT_FLAG_LONG_PRESS = 0x80, 230 AKEY_EVENT_FLAG_LONG_PRESS = 0x80,
209 231
210 /* Set when a key event has AKEY_EVENT_FLAG_CANCELED set because a long 232 /**
211 * press action was executed while it was down. */ 233 * Set when a key event has AKEY_EVENT_FLAG_CANCELED set because a long
234 * press action was executed while it was down.
235 */
212 AKEY_EVENT_FLAG_CANCELED_LONG_PRESS = 0x100, 236 AKEY_EVENT_FLAG_CANCELED_LONG_PRESS = 0x100,
213 237
214 /* Set for AKEY_EVENT_ACTION_UP when this event's key code is still being 238 /**
239 * Set for AKEY_EVENT_ACTION_UP when this event's key code is still being
215 * tracked from its initial down. That is, somebody requested that tracking 240 * tracked from its initial down. That is, somebody requested that tracking
216 * started on the key down and a long press has not caused 241 * started on the key down and a long press has not caused
217 * the tracking to be canceled. */ 242 * the tracking to be canceled.
243 */
218 AKEY_EVENT_FLAG_TRACKING = 0x200, 244 AKEY_EVENT_FLAG_TRACKING = 0x200,
219 245
220 /* Set when a key event has been synthesized to implement default behavior 246 /**
247 * Set when a key event has been synthesized to implement default behavior
221 * for an event that the application did not handle. 248 * for an event that the application did not handle.
222 * Fallback key events are generated by unhandled trackball motions 249 * Fallback key events are generated by unhandled trackball motions
223 * (to emulate a directional keypad) and by certain unhandled key presses 250 * (to emulate a directional keypad) and by certain unhandled key presses
224 * that are declared in the key map (such as special function numeric keypad 251 * that are declared in the key map (such as special function numeric keypad
225 * keys when numlock is off). */ 252 * keys when numlock is off).
253 */
226 AKEY_EVENT_FLAG_FALLBACK = 0x400, 254 AKEY_EVENT_FLAG_FALLBACK = 0x400,
227}; 255};
228 256
229/* 257/**
230 * Motion event actions. 258 * Bit shift for the action bits holding the pointer index as
231 */
232
233/* Bit shift for the action bits holding the pointer index as
234 * defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK. 259 * defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK.
235 */ 260 */
236#define AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT 8 261#define AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT 8
237 262
263/** Motion event actions */
238enum { 264enum {
239 /* Bit mask of the parts of the action code that are the action itself. 265 /** Bit mask of the parts of the action code that are the action itself. */
240 */
241 AMOTION_EVENT_ACTION_MASK = 0xff, 266 AMOTION_EVENT_ACTION_MASK = 0xff,
242 267
243 /* Bits in the action code that represent a pointer index, used with 268 /**
269 * Bits in the action code that represent a pointer index, used with
244 * AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP. Shifting 270 * AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP. Shifting
245 * down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer 271 * down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer
246 * index where the data for the pointer going up or down can be found. 272 * index where the data for the pointer going up or down can be found.
247 */ 273 */
248 AMOTION_EVENT_ACTION_POINTER_INDEX_MASK = 0xff00, 274 AMOTION_EVENT_ACTION_POINTER_INDEX_MASK = 0xff00,
249 275
250 /* A pressed gesture has started, the motion contains the initial starting location. 276 /** A pressed gesture has started, the motion contains the initial starting location. */
251 */
252 AMOTION_EVENT_ACTION_DOWN = 0, 277 AMOTION_EVENT_ACTION_DOWN = 0,
253 278
254 /* A pressed gesture has finished, the motion contains the final release location 279 /**
280 * A pressed gesture has finished, the motion contains the final release location
255 * as well as any intermediate points since the last down or move event. 281 * as well as any intermediate points since the last down or move event.
256 */ 282 */
257 AMOTION_EVENT_ACTION_UP = 1, 283 AMOTION_EVENT_ACTION_UP = 1,
258 284
259 /* A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and 285 /**
286 * A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and
260 * AMOTION_EVENT_ACTION_UP). The motion contains the most recent point, as well as 287 * AMOTION_EVENT_ACTION_UP). The motion contains the most recent point, as well as
261 * any intermediate points since the last down or move event. 288 * any intermediate points since the last down or move event.
262 */ 289 */
263 AMOTION_EVENT_ACTION_MOVE = 2, 290 AMOTION_EVENT_ACTION_MOVE = 2,
264 291
265 /* The current gesture has been aborted. 292 /**
293 * The current gesture has been aborted.
266 * You will not receive any more points in it. You should treat this as 294 * You will not receive any more points in it. You should treat this as
267 * an up event, but not perform any action that you normally would. 295 * an up event, but not perform any action that you normally would.
268 */ 296 */
269 AMOTION_EVENT_ACTION_CANCEL = 3, 297 AMOTION_EVENT_ACTION_CANCEL = 3,
270 298
271 /* A movement has happened outside of the normal bounds of the UI element. 299 /**
300 * A movement has happened outside of the normal bounds of the UI element.
272 * This does not provide a full gesture, but only the initial location of the movement/touch. 301 * This does not provide a full gesture, but only the initial location of the movement/touch.
273 */ 302 */
274 AMOTION_EVENT_ACTION_OUTSIDE = 4, 303 AMOTION_EVENT_ACTION_OUTSIDE = 4,
275 304
276 /* A non-primary pointer has gone down. 305 /**
306 * A non-primary pointer has gone down.
277 * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed. 307 * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
278 */ 308 */
279 AMOTION_EVENT_ACTION_POINTER_DOWN = 5, 309 AMOTION_EVENT_ACTION_POINTER_DOWN = 5,
280 310
281 /* A non-primary pointer has gone up. 311 /**
312 * A non-primary pointer has gone up.
282 * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed. 313 * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
283 */ 314 */
284 AMOTION_EVENT_ACTION_POINTER_UP = 6, 315 AMOTION_EVENT_ACTION_POINTER_UP = 6,
285 316
286 /* A change happened but the pointer is not down (unlike AMOTION_EVENT_ACTION_MOVE). 317 /**
318 * A change happened but the pointer is not down (unlike AMOTION_EVENT_ACTION_MOVE).
287 * The motion contains the most recent point, as well as any intermediate points since 319 * The motion contains the most recent point, as well as any intermediate points since
288 * the last hover move event. 320 * the last hover move event.
289 */ 321 */
290 AMOTION_EVENT_ACTION_HOVER_MOVE = 7, 322 AMOTION_EVENT_ACTION_HOVER_MOVE = 7,
291 323
292 /* The motion event contains relative vertical and/or horizontal scroll offsets. 324 /**
325 * The motion event contains relative vertical and/or horizontal scroll offsets.
293 * Use getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL 326 * Use getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL
294 * and AMOTION_EVENT_AXIS_HSCROLL. 327 * and AMOTION_EVENT_AXIS_HSCROLL.
295 * The pointer may or may not be down when this event is dispatched. 328 * The pointer may or may not be down when this event is dispatched.
@@ -298,12 +331,10 @@ enum {
298 */ 331 */
299 AMOTION_EVENT_ACTION_SCROLL = 8, 332 AMOTION_EVENT_ACTION_SCROLL = 8,
300 333
301 /* The pointer is not down but has entered the boundaries of a window or view. 334 /** The pointer is not down but has entered the boundaries of a window or view. */
302 */
303 AMOTION_EVENT_ACTION_HOVER_ENTER = 9, 335 AMOTION_EVENT_ACTION_HOVER_ENTER = 9,
304 336
305 /* The pointer is not down but has exited the boundaries of a window or view. 337 /** The pointer is not down but has exited the boundaries of a window or view. */
306 */
307 AMOTION_EVENT_ACTION_HOVER_EXIT = 10, 338 AMOTION_EVENT_ACTION_HOVER_EXIT = 10,
308 339
309 /* One or more buttons have been pressed. */ 340 /* One or more buttons have been pressed. */
@@ -313,11 +344,12 @@ enum {
313 AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12, 344 AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12,
314}; 345};
315 346
316/* 347/**
317 * Motion event flags. 348 * Motion event flags.
318 */ 349 */
319enum { 350enum {
320 /* This flag indicates that the window that received this motion event is partly 351 /**
352 * This flag indicates that the window that received this motion event is partly
321 * or wholly obscured by another visible window above it. This flag is set to true 353 * or wholly obscured by another visible window above it. This flag is set to true
322 * even if the event did not directly pass through the obscured area. 354 * even if the event did not directly pass through the obscured area.
323 * A security sensitive application can check this flag to identify situations in which 355 * A security sensitive application can check this flag to identify situations in which
@@ -329,173 +361,513 @@ enum {
329 AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED = 0x1, 361 AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED = 0x1,
330}; 362};
331 363
332/* 364/**
333 * Motion event edge touch flags. 365 * Motion event edge touch flags.
334 */ 366 */
335enum { 367enum {
336 /* No edges intersected */ 368 /** No edges intersected. */
337 AMOTION_EVENT_EDGE_FLAG_NONE = 0, 369 AMOTION_EVENT_EDGE_FLAG_NONE = 0,
338 370
339 /* Flag indicating the motion event intersected the top edge of the screen. */ 371 /** Flag indicating the motion event intersected the top edge of the screen. */
340 AMOTION_EVENT_EDGE_FLAG_TOP = 0x01, 372 AMOTION_EVENT_EDGE_FLAG_TOP = 0x01,
341 373
342 /* Flag indicating the motion event intersected the bottom edge of the screen. */ 374 /** Flag indicating the motion event intersected the bottom edge of the screen. */
343 AMOTION_EVENT_EDGE_FLAG_BOTTOM = 0x02, 375 AMOTION_EVENT_EDGE_FLAG_BOTTOM = 0x02,
344 376
345 /* Flag indicating the motion event intersected the left edge of the screen. */ 377 /** Flag indicating the motion event intersected the left edge of the screen. */
346 AMOTION_EVENT_EDGE_FLAG_LEFT = 0x04, 378 AMOTION_EVENT_EDGE_FLAG_LEFT = 0x04,
347 379
348 /* Flag indicating the motion event intersected the right edge of the screen. */ 380 /** Flag indicating the motion event intersected the right edge of the screen. */
349 AMOTION_EVENT_EDGE_FLAG_RIGHT = 0x08 381 AMOTION_EVENT_EDGE_FLAG_RIGHT = 0x08
350}; 382};
351 383
352/* 384/**
353 * Constants that identify each individual axis of a motion event. 385 * Constants that identify each individual axis of a motion event.
354 * Refer to the documentation on the MotionEvent class for descriptions of each axis. 386 * @anchor AMOTION_EVENT_AXIS
355 */ 387 */
356enum { 388enum {
389 /**
390 * Axis constant: X axis of a motion event.
391 *
392 * - For a touch screen, reports the absolute X screen position of the center of
393 * the touch contact area. The units are display pixels.
394 * - For a touch pad, reports the absolute X surface position of the center of the touch
395 * contact area. The units are device-dependent.
396 * - For a mouse, reports the absolute X screen position of the mouse pointer.
397 * The units are display pixels.
398 * - For a trackball, reports the relative horizontal displacement of the trackball.
399 * The value is normalized to a range from -1.0 (left) to 1.0 (right).
400 * - For a joystick, reports the absolute X position of the joystick.
401 * The value is normalized to a range from -1.0 (left) to 1.0 (right).
402 */
357 AMOTION_EVENT_AXIS_X = 0, 403 AMOTION_EVENT_AXIS_X = 0,
404 /**
405 * Axis constant: Y axis of a motion event.
406 *
407 * - For a touch screen, reports the absolute Y screen position of the center of
408 * the touch contact area. The units are display pixels.
409 * - For a touch pad, reports the absolute Y surface position of the center of the touch
410 * contact area. The units are device-dependent.
411 * - For a mouse, reports the absolute Y screen position of the mouse pointer.
412 * The units are display pixels.
413 * - For a trackball, reports the relative vertical displacement of the trackball.
414 * The value is normalized to a range from -1.0 (up) to 1.0 (down).
415 * - For a joystick, reports the absolute Y position of the joystick.
416 * The value is normalized to a range from -1.0 (up or far) to 1.0 (down or near).
417 */
358 AMOTION_EVENT_AXIS_Y = 1, 418 AMOTION_EVENT_AXIS_Y = 1,
419 /**
420 * Axis constant: Pressure axis of a motion event.
421 *
422 * - For a touch screen or touch pad, reports the approximate pressure applied to the surface
423 * by a finger or other tool. The value is normalized to a range from
424 * 0 (no pressure at all) to 1 (normal pressure), although values higher than 1
425 * may be generated depending on the calibration of the input device.
426 * - For a trackball, the value is set to 1 if the trackball button is pressed
427 * or 0 otherwise.
428 * - For a mouse, the value is set to 1 if the primary mouse button is pressed
429 * or 0 otherwise.
430 */
359 AMOTION_EVENT_AXIS_PRESSURE = 2, 431 AMOTION_EVENT_AXIS_PRESSURE = 2,
432 /**
433 * Axis constant: Size axis of a motion event.
434 *
435 * - For a touch screen or touch pad, reports the approximate size of the contact area in
436 * relation to the maximum detectable size for the device. The value is normalized
437 * to a range from 0 (smallest detectable size) to 1 (largest detectable size),
438 * although it is not a linear scale. This value is of limited use.
439 * To obtain calibrated size information, see
440 * {@link AMOTION_EVENT_AXIS_TOUCH_MAJOR} or {@link AMOTION_EVENT_AXIS_TOOL_MAJOR}.
441 */
360 AMOTION_EVENT_AXIS_SIZE = 3, 442 AMOTION_EVENT_AXIS_SIZE = 3,
443 /**
444 * Axis constant: TouchMajor axis of a motion event.
445 *
446 * - For a touch screen, reports the length of the major axis of an ellipse that
447 * represents the touch area at the point of contact.
448 * The units are display pixels.
449 * - For a touch pad, reports the length of the major axis of an ellipse that
450 * represents the touch area at the point of contact.
451 * The units are device-dependent.
452 */
361 AMOTION_EVENT_AXIS_TOUCH_MAJOR = 4, 453 AMOTION_EVENT_AXIS_TOUCH_MAJOR = 4,
454 /**
455 * Axis constant: TouchMinor axis of a motion event.
456 *
457 * - For a touch screen, reports the length of the minor axis of an ellipse that
458 * represents the touch area at the point of contact.
459 * The units are display pixels.
460 * - For a touch pad, reports the length of the minor axis of an ellipse that
461 * represents the touch area at the point of contact.
462 * The units are device-dependent.
463 *
464 * When the touch is circular, the major and minor axis lengths will be equal to one another.
465 */
362 AMOTION_EVENT_AXIS_TOUCH_MINOR = 5, 466 AMOTION_EVENT_AXIS_TOUCH_MINOR = 5,
467 /**
468 * Axis constant: ToolMajor axis of a motion event.
469 *
470 * - For a touch screen, reports the length of the major axis of an ellipse that
471 * represents the size of the approaching finger or tool used to make contact.
472 * - For a touch pad, reports the length of the major axis of an ellipse that
473 * represents the size of the approaching finger or tool used to make contact.
474 * The units are device-dependent.
475 *
476 * When the touch is circular, the major and minor axis lengths will be equal to one another.
477 *
478 * The tool size may be larger than the touch size since the tool may not be fully
479 * in contact with the touch sensor.
480 */
363 AMOTION_EVENT_AXIS_TOOL_MAJOR = 6, 481 AMOTION_EVENT_AXIS_TOOL_MAJOR = 6,
482 /**
483 * Axis constant: ToolMinor axis of a motion event.
484 *
485 * - For a touch screen, reports the length of the minor axis of an ellipse that
486 * represents the size of the approaching finger or tool used to make contact.
487 * - For a touch pad, reports the length of the minor axis of an ellipse that
488 * represents the size of the approaching finger or tool used to make contact.
489 * The units are device-dependent.
490 *
491 * When the touch is circular, the major and minor axis lengths will be equal to one another.
492 *
493 * The tool size may be larger than the touch size since the tool may not be fully
494 * in contact with the touch sensor.
495 */
364 AMOTION_EVENT_AXIS_TOOL_MINOR = 7, 496 AMOTION_EVENT_AXIS_TOOL_MINOR = 7,
497 /**
498 * Axis constant: Orientation axis of a motion event.
499 *
500 * - For a touch screen or touch pad, reports the orientation of the finger
501 * or tool in radians relative to the vertical plane of the device.
502 * An angle of 0 radians indicates that the major axis of contact is oriented
503 * upwards, is perfectly circular or is of unknown orientation. A positive angle
504 * indicates that the major axis of contact is oriented to the right. A negative angle
505 * indicates that the major axis of contact is oriented to the left.
506 * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
507 * (finger pointing fully right).
508 * - For a stylus, the orientation indicates the direction in which the stylus
509 * is pointing in relation to the vertical axis of the current orientation of the screen.
510 * The range is from -PI radians to PI radians, where 0 is pointing up,
511 * -PI/2 radians is pointing left, -PI or PI radians is pointing down, and PI/2 radians
512 * is pointing right. See also {@link AMOTION_EVENT_AXIS_TILT}.
513 */
365 AMOTION_EVENT_AXIS_ORIENTATION = 8, 514 AMOTION_EVENT_AXIS_ORIENTATION = 8,
515 /**
516 * Axis constant: Vertical Scroll axis of a motion event.
517 *
518 * - For a mouse, reports the relative movement of the vertical scroll wheel.
519 * The value is normalized to a range from -1.0 (down) to 1.0 (up).
520 *
521 * This axis should be used to scroll views vertically.
522 */
366 AMOTION_EVENT_AXIS_VSCROLL = 9, 523 AMOTION_EVENT_AXIS_VSCROLL = 9,
524 /**
525 * Axis constant: Horizontal Scroll axis of a motion event.
526 *
527 * - For a mouse, reports the relative movement of the horizontal scroll wheel.
528 * The value is normalized to a range from -1.0 (left) to 1.0 (right).
529 *
530 * This axis should be used to scroll views horizontally.
531 */
367 AMOTION_EVENT_AXIS_HSCROLL = 10, 532 AMOTION_EVENT_AXIS_HSCROLL = 10,
533 /**
534 * Axis constant: Z axis of a motion event.
535 *
536 * - For a joystick, reports the absolute Z position of the joystick.
537 * The value is normalized to a range from -1.0 (high) to 1.0 (low).
538 * <em>On game pads with two analog joysticks, this axis is often reinterpreted
539 * to report the absolute X position of the second joystick instead.</em>
540 */
368 AMOTION_EVENT_AXIS_Z = 11, 541 AMOTION_EVENT_AXIS_Z = 11,
542 /**
543 * Axis constant: X Rotation axis of a motion event.
544 *
545 * - For a joystick, reports the absolute rotation angle about the X axis.
546 * The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise).
547 */
369 AMOTION_EVENT_AXIS_RX = 12, 548 AMOTION_EVENT_AXIS_RX = 12,
549 /**
550 * Axis constant: Y Rotation axis of a motion event.
551 *
552 * - For a joystick, reports the absolute rotation angle about the Y axis.
553 * The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise).
554 */
370 AMOTION_EVENT_AXIS_RY = 13, 555 AMOTION_EVENT_AXIS_RY = 13,
556 /**
557 * Axis constant: Z Rotation axis of a motion event.
558 *
559 * - For a joystick, reports the absolute rotation angle about the Z axis.
560 * The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise).
561 * On game pads with two analog joysticks, this axis is often reinterpreted
562 * to report the absolute Y position of the second joystick instead.
563 */
371 AMOTION_EVENT_AXIS_RZ = 14, 564 AMOTION_EVENT_AXIS_RZ = 14,
565 /**
566 * Axis constant: Hat X axis of a motion event.
567 *
568 * - For a joystick, reports the absolute X position of the directional hat control.
569 * The value is normalized to a range from -1.0 (left) to 1.0 (right).
570 */
372 AMOTION_EVENT_AXIS_HAT_X = 15, 571 AMOTION_EVENT_AXIS_HAT_X = 15,
572 /**
573 * Axis constant: Hat Y axis of a motion event.
574 *
575 * - For a joystick, reports the absolute Y position of the directional hat control.
576 * The value is normalized to a range from -1.0 (up) to 1.0 (down).
577 */
373 AMOTION_EVENT_AXIS_HAT_Y = 16, 578 AMOTION_EVENT_AXIS_HAT_Y = 16,
579 /**
580 * Axis constant: Left Trigger axis of a motion event.
581 *
582 * - For a joystick, reports the absolute position of the left trigger control.
583 * The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed).
584 */
374 AMOTION_EVENT_AXIS_LTRIGGER = 17, 585 AMOTION_EVENT_AXIS_LTRIGGER = 17,
586 /**
587 * Axis constant: Right Trigger axis of a motion event.
588 *
589 * - For a joystick, reports the absolute position of the right trigger control.
590 * The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed).
591 */
375 AMOTION_EVENT_AXIS_RTRIGGER = 18, 592 AMOTION_EVENT_AXIS_RTRIGGER = 18,
593 /**
594 * Axis constant: Throttle axis of a motion event.
595 *
596 * - For a joystick, reports the absolute position of the throttle control.
597 * The value is normalized to a range from 0.0 (fully open) to 1.0 (fully closed).
598 */
376 AMOTION_EVENT_AXIS_THROTTLE = 19, 599 AMOTION_EVENT_AXIS_THROTTLE = 19,
600 /**
601 * Axis constant: Rudder axis of a motion event.
602 *
603 * - For a joystick, reports the absolute position of the rudder control.
604 * The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right).
605 */
377 AMOTION_EVENT_AXIS_RUDDER = 20, 606 AMOTION_EVENT_AXIS_RUDDER = 20,
607 /**
608 * Axis constant: Wheel axis of a motion event.
609 *
610 * - For a joystick, reports the absolute position of the steering wheel control.
611 * The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right).
612 */
378 AMOTION_EVENT_AXIS_WHEEL = 21, 613 AMOTION_EVENT_AXIS_WHEEL = 21,
614 /**
615 * Axis constant: Gas axis of a motion event.
616 *
617 * - For a joystick, reports the absolute position of the gas (accelerator) control.
618 * The value is normalized to a range from 0.0 (no acceleration)
619 * to 1.0 (maximum acceleration).
620 */
379 AMOTION_EVENT_AXIS_GAS = 22, 621 AMOTION_EVENT_AXIS_GAS = 22,
622 /**
623 * Axis constant: Brake axis of a motion event.
624 *
625 * - For a joystick, reports the absolute position of the brake control.
626 * The value is normalized to a range from 0.0 (no braking) to 1.0 (maximum braking).
627 */
380 AMOTION_EVENT_AXIS_BRAKE = 23, 628 AMOTION_EVENT_AXIS_BRAKE = 23,
629 /**
630 * Axis constant: Distance axis of a motion event.
631 *
632 * - For a stylus, reports the distance of the stylus from the screen.
633 * A value of 0.0 indicates direct contact and larger values indicate increasing
634 * distance from the surface.
635 */
381 AMOTION_EVENT_AXIS_DISTANCE = 24, 636 AMOTION_EVENT_AXIS_DISTANCE = 24,
637 /**
638 * Axis constant: Tilt axis of a motion event.
639 *
640 * - For a stylus, reports the tilt angle of the stylus in radians where
641 * 0 radians indicates that the stylus is being held perpendicular to the
642 * surface, and PI/2 radians indicates that the stylus is being held flat
643 * against the surface.
644 */
382 AMOTION_EVENT_AXIS_TILT = 25, 645 AMOTION_EVENT_AXIS_TILT = 25,
646 /**
647 * Axis constant: Generic 1 axis of a motion event.
648 * The interpretation of a generic axis is device-specific.
649 */
383 AMOTION_EVENT_AXIS_GENERIC_1 = 32, 650 AMOTION_EVENT_AXIS_GENERIC_1 = 32,
651 /**
652 * Axis constant: Generic 2 axis of a motion event.
653 * The interpretation of a generic axis is device-specific.
654 */
384 AMOTION_EVENT_AXIS_GENERIC_2 = 33, 655 AMOTION_EVENT_AXIS_GENERIC_2 = 33,
656 /**
657 * Axis constant: Generic 3 axis of a motion event.
658 * The interpretation of a generic axis is device-specific.
659 */
385 AMOTION_EVENT_AXIS_GENERIC_3 = 34, 660 AMOTION_EVENT_AXIS_GENERIC_3 = 34,
661 /**
662 * Axis constant: Generic 4 axis of a motion event.
663 * The interpretation of a generic axis is device-specific.
664 */
386 AMOTION_EVENT_AXIS_GENERIC_4 = 35, 665 AMOTION_EVENT_AXIS_GENERIC_4 = 35,
666 /**
667 * Axis constant: Generic 5 axis of a motion event.
668 * The interpretation of a generic axis is device-specific.
669 */
387 AMOTION_EVENT_AXIS_GENERIC_5 = 36, 670 AMOTION_EVENT_AXIS_GENERIC_5 = 36,
671 /**
672 * Axis constant: Generic 6 axis of a motion event.
673 * The interpretation of a generic axis is device-specific.
674 */
388 AMOTION_EVENT_AXIS_GENERIC_6 = 37, 675 AMOTION_EVENT_AXIS_GENERIC_6 = 37,
676 /**
677 * Axis constant: Generic 7 axis of a motion event.
678 * The interpretation of a generic axis is device-specific.
679 */
389 AMOTION_EVENT_AXIS_GENERIC_7 = 38, 680 AMOTION_EVENT_AXIS_GENERIC_7 = 38,
681 /**
682 * Axis constant: Generic 8 axis of a motion event.
683 * The interpretation of a generic axis is device-specific.
684 */
390 AMOTION_EVENT_AXIS_GENERIC_8 = 39, 685 AMOTION_EVENT_AXIS_GENERIC_8 = 39,
686 /**
687 * Axis constant: Generic 9 axis of a motion event.
688 * The interpretation of a generic axis is device-specific.
689 */
391 AMOTION_EVENT_AXIS_GENERIC_9 = 40, 690 AMOTION_EVENT_AXIS_GENERIC_9 = 40,
691 /**
692 * Axis constant: Generic 10 axis of a motion event.
693 * The interpretation of a generic axis is device-specific.
694 */
392 AMOTION_EVENT_AXIS_GENERIC_10 = 41, 695 AMOTION_EVENT_AXIS_GENERIC_10 = 41,
696 /**
697 * Axis constant: Generic 11 axis of a motion event.
698 * The interpretation of a generic axis is device-specific.
699 */
393 AMOTION_EVENT_AXIS_GENERIC_11 = 42, 700 AMOTION_EVENT_AXIS_GENERIC_11 = 42,
701 /**
702 * Axis constant: Generic 12 axis of a motion event.
703 * The interpretation of a generic axis is device-specific.
704 */
394 AMOTION_EVENT_AXIS_GENERIC_12 = 43, 705 AMOTION_EVENT_AXIS_GENERIC_12 = 43,
706 /**
707 * Axis constant: Generic 13 axis of a motion event.
708 * The interpretation of a generic axis is device-specific.
709 */
395 AMOTION_EVENT_AXIS_GENERIC_13 = 44, 710 AMOTION_EVENT_AXIS_GENERIC_13 = 44,
711 /**
712 * Axis constant: Generic 14 axis of a motion event.
713 * The interpretation of a generic axis is device-specific.
714 */
396 AMOTION_EVENT_AXIS_GENERIC_14 = 45, 715 AMOTION_EVENT_AXIS_GENERIC_14 = 45,
716 /**
717 * Axis constant: Generic 15 axis of a motion event.
718 * The interpretation of a generic axis is device-specific.
719 */
397 AMOTION_EVENT_AXIS_GENERIC_15 = 46, 720 AMOTION_EVENT_AXIS_GENERIC_15 = 46,
721 /**
722 * Axis constant: Generic 16 axis of a motion event.
723 * The interpretation of a generic axis is device-specific.
724 */
398 AMOTION_EVENT_AXIS_GENERIC_16 = 47, 725 AMOTION_EVENT_AXIS_GENERIC_16 = 47,
399 726
400 // NOTE: If you add a new axis here you must also add it to several other files. 727 // NOTE: If you add a new axis here you must also add it to several other files.
401 // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. 728 // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
402}; 729};
403 730
404/* 731/**
405 * Constants that identify buttons that are associated with motion events. 732 * Constants that identify buttons that are associated with motion events.
406 * Refer to the documentation on the MotionEvent class for descriptions of each button. 733 * Refer to the documentation on the MotionEvent class for descriptions of each button.
407 */ 734 */
408enum { 735enum {
736 /** primary */
409 AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0, 737 AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0,
738 /** secondary */
410 AMOTION_EVENT_BUTTON_SECONDARY = 1 << 1, 739 AMOTION_EVENT_BUTTON_SECONDARY = 1 << 1,
740 /** tertiary */
411 AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2, 741 AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,
742 /** back */
412 AMOTION_EVENT_BUTTON_BACK = 1 << 3, 743 AMOTION_EVENT_BUTTON_BACK = 1 << 3,
744 /** forward */
413 AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, 745 AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,
414 AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5, 746 AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5,
415 AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6, 747 AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6,
416}; 748};
417 749
418/* 750/**
419 * Constants that identify tool types. 751 * Constants that identify tool types.
420 * Refer to the documentation on the MotionEvent class for descriptions of each tool type. 752 * Refer to the documentation on the MotionEvent class for descriptions of each tool type.
421 */ 753 */
422enum { 754enum {
755 /** unknown */
423 AMOTION_EVENT_TOOL_TYPE_UNKNOWN = 0, 756 AMOTION_EVENT_TOOL_TYPE_UNKNOWN = 0,
757 /** finger */
424 AMOTION_EVENT_TOOL_TYPE_FINGER = 1, 758 AMOTION_EVENT_TOOL_TYPE_FINGER = 1,
759 /** stylus */
425 AMOTION_EVENT_TOOL_TYPE_STYLUS = 2, 760 AMOTION_EVENT_TOOL_TYPE_STYLUS = 2,
761 /** mouse */
426 AMOTION_EVENT_TOOL_TYPE_MOUSE = 3, 762 AMOTION_EVENT_TOOL_TYPE_MOUSE = 3,
763 /** eraser */
427 AMOTION_EVENT_TOOL_TYPE_ERASER = 4, 764 AMOTION_EVENT_TOOL_TYPE_ERASER = 4,
428}; 765};
429 766
430/* 767/**
431 * Input sources. 768 * Input source masks.
432 * 769 *
433 * Refer to the documentation on android.view.InputDevice for more details about input sources 770 * Refer to the documentation on android.view.InputDevice for more details about input sources
434 * and their correct interpretation. 771 * and their correct interpretation.
435 */ 772 */
436enum { 773enum {
774 /** mask */
437 AINPUT_SOURCE_CLASS_MASK = 0x000000ff, 775 AINPUT_SOURCE_CLASS_MASK = 0x000000ff,
438 776
777 /** none */
439 AINPUT_SOURCE_CLASS_NONE = 0x00000000, 778 AINPUT_SOURCE_CLASS_NONE = 0x00000000,
779 /** button */
440 AINPUT_SOURCE_CLASS_BUTTON = 0x00000001, 780 AINPUT_SOURCE_CLASS_BUTTON = 0x00000001,
781 /** pointer */
441 AINPUT_SOURCE_CLASS_POINTER = 0x00000002, 782 AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
783 /** navigation */
442 AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004, 784 AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
785 /** position */
443 AINPUT_SOURCE_CLASS_POSITION = 0x00000008, 786 AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
787 /** joystick */
444 AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010, 788 AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010,
445}; 789};
446 790
791/**
792 * Input sources.
793 */
447enum { 794enum {
795 /** unknown */
448 AINPUT_SOURCE_UNKNOWN = 0x00000000, 796 AINPUT_SOURCE_UNKNOWN = 0x00000000,
449 797
798 /** keyboard */
450 AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON, 799 AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
800 /** dpad */
451 AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON, 801 AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
802 /** gamepad */
452 AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON, 803 AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON,
804 /** touchscreen */
453 AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER, 805 AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
806 /** mouse */
454 AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER, 807 AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
808 /** stylus */
455 AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER, 809 AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER,
810 /** bluetooth stylus */
456 AINPUT_SOURCE_BLUETOOTH_STYLUS = 0x00008000 | AINPUT_SOURCE_STYLUS, 811 AINPUT_SOURCE_BLUETOOTH_STYLUS = 0x00008000 | AINPUT_SOURCE_STYLUS,
812 /** trackball */
457 AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION, 813 AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
814 /** touchpad */
458 AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION, 815 AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
816 /** navigation */
459 AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE, 817 AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE,
818 /** joystick */
460 AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK, 819 AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
461 820
821 /** any */
462 AINPUT_SOURCE_ANY = 0xffffff00, 822 AINPUT_SOURCE_ANY = 0xffffff00,
463}; 823};
464 824
465/* 825/**
466 * Keyboard types. 826 * Keyboard types.
467 * 827 *
468 * Refer to the documentation on android.view.InputDevice for more details. 828 * Refer to the documentation on android.view.InputDevice for more details.
469 */ 829 */
470enum { 830enum {
831 /** none */
471 AINPUT_KEYBOARD_TYPE_NONE = 0, 832 AINPUT_KEYBOARD_TYPE_NONE = 0,
833 /** non alphabetic */
472 AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC = 1, 834 AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC = 1,
835 /** alphabetic */
473 AINPUT_KEYBOARD_TYPE_ALPHABETIC = 2, 836 AINPUT_KEYBOARD_TYPE_ALPHABETIC = 2,
474}; 837};
475 838
476/* 839/**
477 * Constants used to retrieve information about the range of motion for a particular 840 * Constants used to retrieve information about the range of motion for a particular
478 * coordinate of a motion event. 841 * coordinate of a motion event.
479 * 842 *
480 * Refer to the documentation on android.view.InputDevice for more details about input sources 843 * Refer to the documentation on android.view.InputDevice for more details about input sources
481 * and their correct interpretation. 844 * and their correct interpretation.
482 * 845 *
483 * DEPRECATION NOTICE: These constants are deprecated. Use AMOTION_EVENT_AXIS_* constants instead. 846 * @deprecated These constants are deprecated. Use {@link AMOTION_EVENT_AXIS AMOTION_EVENT_AXIS_*} constants instead.
484 */ 847 */
485enum { 848enum {
849 /** x */
486 AINPUT_MOTION_RANGE_X = AMOTION_EVENT_AXIS_X, 850 AINPUT_MOTION_RANGE_X = AMOTION_EVENT_AXIS_X,
851 /** y */
487 AINPUT_MOTION_RANGE_Y = AMOTION_EVENT_AXIS_Y, 852 AINPUT_MOTION_RANGE_Y = AMOTION_EVENT_AXIS_Y,
853 /** pressure */
488 AINPUT_MOTION_RANGE_PRESSURE = AMOTION_EVENT_AXIS_PRESSURE, 854 AINPUT_MOTION_RANGE_PRESSURE = AMOTION_EVENT_AXIS_PRESSURE,
855 /** size */
489 AINPUT_MOTION_RANGE_SIZE = AMOTION_EVENT_AXIS_SIZE, 856 AINPUT_MOTION_RANGE_SIZE = AMOTION_EVENT_AXIS_SIZE,
857 /** touch major */
490 AINPUT_MOTION_RANGE_TOUCH_MAJOR = AMOTION_EVENT_AXIS_TOUCH_MAJOR, 858 AINPUT_MOTION_RANGE_TOUCH_MAJOR = AMOTION_EVENT_AXIS_TOUCH_MAJOR,
859 /** touch minor */
491 AINPUT_MOTION_RANGE_TOUCH_MINOR = AMOTION_EVENT_AXIS_TOUCH_MINOR, 860 AINPUT_MOTION_RANGE_TOUCH_MINOR = AMOTION_EVENT_AXIS_TOUCH_MINOR,
861 /** tool major */
492 AINPUT_MOTION_RANGE_TOOL_MAJOR = AMOTION_EVENT_AXIS_TOOL_MAJOR, 862 AINPUT_MOTION_RANGE_TOOL_MAJOR = AMOTION_EVENT_AXIS_TOOL_MAJOR,
863 /** tool minor */
493 AINPUT_MOTION_RANGE_TOOL_MINOR = AMOTION_EVENT_AXIS_TOOL_MINOR, 864 AINPUT_MOTION_RANGE_TOOL_MINOR = AMOTION_EVENT_AXIS_TOOL_MINOR,
865 /** orientation */
494 AINPUT_MOTION_RANGE_ORIENTATION = AMOTION_EVENT_AXIS_ORIENTATION, 866 AINPUT_MOTION_RANGE_ORIENTATION = AMOTION_EVENT_AXIS_ORIENTATION,
495} __attribute__ ((deprecated)); 867};
496 868
497 869
498/* 870/**
499 * Input event accessors. 871 * Input event accessors.
500 * 872 *
501 * Note that most functions can only be used on input events that are of a given type. 873 * Note that most functions can only be used on input events that are of a given type.
@@ -504,10 +876,10 @@ enum {
504 876
505/*** Accessors for all input events. ***/ 877/*** Accessors for all input events. ***/
506 878
507/* Get the input event type. */ 879/** Get the input event type. */
508int32_t AInputEvent_getType(const AInputEvent* event); 880int32_t AInputEvent_getType(const AInputEvent* event);
509 881
510/* Get the id for the device that an input event came from. 882/** Get the id for the device that an input event came from.
511 * 883 *
512 * Input events can be generated by multiple different input devices. 884 * Input events can be generated by multiple different input devices.
513 * Use the input device id to obtain information about the input 885 * Use the input device id to obtain information about the input
@@ -519,272 +891,351 @@ int32_t AInputEvent_getType(const AInputEvent* event);
519 */ 891 */
520int32_t AInputEvent_getDeviceId(const AInputEvent* event); 892int32_t AInputEvent_getDeviceId(const AInputEvent* event);
521 893
522/* Get the input event source. */ 894/** Get the input event source. */
523int32_t AInputEvent_getSource(const AInputEvent* event); 895int32_t AInputEvent_getSource(const AInputEvent* event);
524 896
525/*** Accessors for key events only. ***/ 897/*** Accessors for key events only. ***/
526 898
527/* Get the key event action. */ 899/** Get the key event action. */
528int32_t AKeyEvent_getAction(const AInputEvent* key_event); 900int32_t AKeyEvent_getAction(const AInputEvent* key_event);
529 901
530/* Get the key event flags. */ 902/** Get the key event flags. */
531int32_t AKeyEvent_getFlags(const AInputEvent* key_event); 903int32_t AKeyEvent_getFlags(const AInputEvent* key_event);
532 904
533/* Get the key code of the key event. 905/**
534 * This is the physical key that was pressed, not the Unicode character. */ 906 * Get the key code of the key event.
907 * This is the physical key that was pressed, not the Unicode character.
908 */
535int32_t AKeyEvent_getKeyCode(const AInputEvent* key_event); 909int32_t AKeyEvent_getKeyCode(const AInputEvent* key_event);
536 910
537/* Get the hardware key id of this key event. 911/**
538 * These values are not reliable and vary from device to device. */ 912 * Get the hardware key id of this key event.
913 * These values are not reliable and vary from device to device.
914 */
539int32_t AKeyEvent_getScanCode(const AInputEvent* key_event); 915int32_t AKeyEvent_getScanCode(const AInputEvent* key_event);
540 916
541/* Get the meta key state. */ 917/** Get the meta key state. */
542int32_t AKeyEvent_getMetaState(const AInputEvent* key_event); 918int32_t AKeyEvent_getMetaState(const AInputEvent* key_event);
543 919
544/* Get the repeat count of the event. 920/**
921 * Get the repeat count of the event.
545 * For both key up an key down events, this is the number of times the key has 922 * For both key up an key down events, this is the number of times the key has
546 * repeated with the first down starting at 0 and counting up from there. For 923 * repeated with the first down starting at 0 and counting up from there. For
547 * multiple key events, this is the number of down/up pairs that have occurred. */ 924 * multiple key events, this is the number of down/up pairs that have occurred.
925 */
548int32_t AKeyEvent_getRepeatCount(const AInputEvent* key_event); 926int32_t AKeyEvent_getRepeatCount(const AInputEvent* key_event);
549 927
550/* Get the time of the most recent key down event, in the 928/**
929 * Get the time of the most recent key down event, in the
551 * java.lang.System.nanoTime() time base. If this is a down event, 930 * java.lang.System.nanoTime() time base. If this is a down event,
552 * this will be the same as eventTime. 931 * this will be the same as eventTime.
553 * Note that when chording keys, this value is the down time of the most recently 932 * Note that when chording keys, this value is the down time of the most recently
554 * pressed key, which may not be the same physical key of this event. */ 933 * pressed key, which may not be the same physical key of this event.
934 */
555int64_t AKeyEvent_getDownTime(const AInputEvent* key_event); 935int64_t AKeyEvent_getDownTime(const AInputEvent* key_event);
556 936
557/* Get the time this event occurred, in the 937/**
558 * java.lang.System.nanoTime() time base. */ 938 * Get the time this event occurred, in the
939 * java.lang.System.nanoTime() time base.
940 */
559int64_t AKeyEvent_getEventTime(const AInputEvent* key_event); 941int64_t AKeyEvent_getEventTime(const AInputEvent* key_event);
560 942
561/*** Accessors for motion events only. ***/ 943/*** Accessors for motion events only. ***/
562 944
563/* Get the combined motion event action code and pointer index. */ 945/** Get the combined motion event action code and pointer index. */
564int32_t AMotionEvent_getAction(const AInputEvent* motion_event); 946int32_t AMotionEvent_getAction(const AInputEvent* motion_event);
565 947
566/* Get the motion event flags. */ 948/** Get the motion event flags. */
567int32_t AMotionEvent_getFlags(const AInputEvent* motion_event); 949int32_t AMotionEvent_getFlags(const AInputEvent* motion_event);
568 950
569/* Get the state of any meta / modifier keys that were in effect when the 951/**
570 * event was generated. */ 952 * Get the state of any meta / modifier keys that were in effect when the
953 * event was generated.
954 */
571int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event); 955int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);
572 956
573/* Get the button state of all buttons that are pressed. */ 957/** Get the button state of all buttons that are pressed. */
574int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event); 958int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event);
575 959
576/* Get a bitfield indicating which edges, if any, were touched by this motion event. 960/**
961 * Get a bitfield indicating which edges, if any, were touched by this motion event.
577 * For touch events, clients can use this to determine if the user's finger was 962 * For touch events, clients can use this to determine if the user's finger was
578 * touching the edge of the display. */ 963 * touching the edge of the display.
964 */
579int32_t AMotionEvent_getEdgeFlags(const AInputEvent* motion_event); 965int32_t AMotionEvent_getEdgeFlags(const AInputEvent* motion_event);
580 966
581/* Get the time when the user originally pressed down to start a stream of 967/**
582 * position events, in the java.lang.System.nanoTime() time base. */ 968 * Get the time when the user originally pressed down to start a stream of
969 * position events, in the java.lang.System.nanoTime() time base.
970 */
583int64_t AMotionEvent_getDownTime(const AInputEvent* motion_event); 971int64_t AMotionEvent_getDownTime(const AInputEvent* motion_event);
584 972
585/* Get the time when this specific event was generated, 973/**
586 * in the java.lang.System.nanoTime() time base. */ 974 * Get the time when this specific event was generated,
975 * in the java.lang.System.nanoTime() time base.
976 */
587int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event); 977int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event);
588 978
589/* Get the X coordinate offset. 979/**
980 * Get the X coordinate offset.
590 * For touch events on the screen, this is the delta that was added to the raw 981 * For touch events on the screen, this is the delta that was added to the raw
591 * screen coordinates to adjust for the absolute position of the containing windows 982 * screen coordinates to adjust for the absolute position of the containing windows
592 * and views. */ 983 * and views.
984 */
593float AMotionEvent_getXOffset(const AInputEvent* motion_event); 985float AMotionEvent_getXOffset(const AInputEvent* motion_event);
594 986
595/* Get the Y coordinate offset. 987/**
988 * Get the Y coordinate offset.
596 * For touch events on the screen, this is the delta that was added to the raw 989 * For touch events on the screen, this is the delta that was added to the raw
597 * screen coordinates to adjust for the absolute position of the containing windows 990 * screen coordinates to adjust for the absolute position of the containing windows
598 * and views. */ 991 * and views.
992 */
599float AMotionEvent_getYOffset(const AInputEvent* motion_event); 993float AMotionEvent_getYOffset(const AInputEvent* motion_event);
600 994
601/* Get the precision of the X coordinates being reported. 995/**
996 * Get the precision of the X coordinates being reported.
602 * You can multiply this number with an X coordinate sample to find the 997 * You can multiply this number with an X coordinate sample to find the
603 * actual hardware value of the X coordinate. */ 998 * actual hardware value of the X coordinate.
999 */
604float AMotionEvent_getXPrecision(const AInputEvent* motion_event); 1000float AMotionEvent_getXPrecision(const AInputEvent* motion_event);
605 1001
606/* Get the precision of the Y coordinates being reported. 1002/**
1003 * Get the precision of the Y coordinates being reported.
607 * You can multiply this number with a Y coordinate sample to find the 1004 * You can multiply this number with a Y coordinate sample to find the
608 * actual hardware value of the Y coordinate. */ 1005 * actual hardware value of the Y coordinate.
1006 */
609float AMotionEvent_getYPrecision(const AInputEvent* motion_event); 1007float AMotionEvent_getYPrecision(const AInputEvent* motion_event);
610 1008
611/* Get the number of pointers of data contained in this event. 1009/**
612 * Always >= 1. */ 1010 * Get the number of pointers of data contained in this event.
1011 * Always >= 1.
1012 */
613size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event); 1013size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event);
614 1014
615/* Get the pointer identifier associated with a particular pointer 1015/**
1016 * Get the pointer identifier associated with a particular pointer
616 * data index in this event. The identifier tells you the actual pointer 1017 * data index in this event. The identifier tells you the actual pointer
617 * number associated with the data, accounting for individual pointers 1018 * number associated with the data, accounting for individual pointers
618 * going up and down since the start of the current gesture. */ 1019 * going up and down since the start of the current gesture.
1020 */
619int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index); 1021int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index);
620 1022
621/* Get the tool type of a pointer for the given pointer index. 1023/**
1024 * Get the tool type of a pointer for the given pointer index.
622 * The tool type indicates the type of tool used to make contact such as a 1025 * The tool type indicates the type of tool used to make contact such as a
623 * finger or stylus, if known. */ 1026 * finger or stylus, if known.
1027 */
624int32_t AMotionEvent_getToolType(const AInputEvent* motion_event, size_t pointer_index); 1028int32_t AMotionEvent_getToolType(const AInputEvent* motion_event, size_t pointer_index);
625 1029
626/* Get the original raw X coordinate of this event. 1030/**
1031 * Get the original raw X coordinate of this event.
627 * For touch events on the screen, this is the original location of the event 1032 * For touch events on the screen, this is the original location of the event
628 * on the screen, before it had been adjusted for the containing window 1033 * on the screen, before it had been adjusted for the containing window
629 * and views. */ 1034 * and views.
1035 */
630float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index); 1036float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index);
631 1037
632/* Get the original raw X coordinate of this event. 1038/**
1039 * Get the original raw X coordinate of this event.
633 * For touch events on the screen, this is the original location of the event 1040 * For touch events on the screen, this is the original location of the event
634 * on the screen, before it had been adjusted for the containing window 1041 * on the screen, before it had been adjusted for the containing window
635 * and views. */ 1042 * and views.
1043 */
636float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index); 1044float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index);
637 1045
638/* Get the current X coordinate of this event for the given pointer index. 1046/**
1047 * Get the current X coordinate of this event for the given pointer index.
639 * Whole numbers are pixels; the value may have a fraction for input devices 1048 * Whole numbers are pixels; the value may have a fraction for input devices
640 * that are sub-pixel precise. */ 1049 * that are sub-pixel precise.
1050 */
641float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index); 1051float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index);
642 1052
643/* Get the current Y coordinate of this event for the given pointer index. 1053/**
1054 * Get the current Y coordinate of this event for the given pointer index.
644 * Whole numbers are pixels; the value may have a fraction for input devices 1055 * Whole numbers are pixels; the value may have a fraction for input devices
645 * that are sub-pixel precise. */ 1056 * that are sub-pixel precise.
1057 */
646float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index); 1058float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index);
647 1059
648/* Get the current pressure of this event for the given pointer index. 1060/**
1061 * Get the current pressure of this event for the given pointer index.
649 * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), 1062 * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
650 * although values higher than 1 may be generated depending on the calibration of 1063 * although values higher than 1 may be generated depending on the calibration of
651 * the input device. */ 1064 * the input device.
1065 */
652float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index); 1066float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index);
653 1067
654/* Get the current scaled value of the approximate size for the given pointer index. 1068/**
1069 * Get the current scaled value of the approximate size for the given pointer index.
655 * This represents some approximation of the area of the screen being 1070 * This represents some approximation of the area of the screen being
656 * pressed; the actual value in pixels corresponding to the 1071 * pressed; the actual value in pixels corresponding to the
657 * touch is normalized with the device specific range of values 1072 * touch is normalized with the device specific range of values
658 * and scaled to a value between 0 and 1. The value of size can be used to 1073 * and scaled to a value between 0 and 1. The value of size can be used to
659 * determine fat touch events. */ 1074 * determine fat touch events.
1075 */
660float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index); 1076float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index);
661 1077
662/* Get the current length of the major axis of an ellipse that describes the touch area 1078/**
663 * at the point of contact for the given pointer index. */ 1079 * Get the current length of the major axis of an ellipse that describes the touch area
1080 * at the point of contact for the given pointer index.
1081 */
664float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index); 1082float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index);
665 1083
666/* Get the current length of the minor axis of an ellipse that describes the touch area 1084/**
667 * at the point of contact for the given pointer index. */ 1085 * Get the current length of the minor axis of an ellipse that describes the touch area
1086 * at the point of contact for the given pointer index.
1087 */
668float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index); 1088float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index);
669 1089
670/* Get the current length of the major axis of an ellipse that describes the size 1090/**
1091 * Get the current length of the major axis of an ellipse that describes the size
671 * of the approaching tool for the given pointer index. 1092 * of the approaching tool for the given pointer index.
672 * The tool area represents the estimated size of the finger or pen that is 1093 * The tool area represents the estimated size of the finger or pen that is
673 * touching the device independent of its actual touch area at the point of contact. */ 1094 * touching the device independent of its actual touch area at the point of contact.
1095 */
674float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index); 1096float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index);
675 1097
676/* Get the current length of the minor axis of an ellipse that describes the size 1098/**
1099 * Get the current length of the minor axis of an ellipse that describes the size
677 * of the approaching tool for the given pointer index. 1100 * of the approaching tool for the given pointer index.
678 * The tool area represents the estimated size of the finger or pen that is 1101 * The tool area represents the estimated size of the finger or pen that is
679 * touching the device independent of its actual touch area at the point of contact. */ 1102 * touching the device independent of its actual touch area at the point of contact.
1103 */
680float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index); 1104float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index);
681 1105
682/* Get the current orientation of the touch area and tool area in radians clockwise from 1106/**
1107 * Get the current orientation of the touch area and tool area in radians clockwise from
683 * vertical for the given pointer index. 1108 * vertical for the given pointer index.
684 * An angle of 0 degrees indicates that the major axis of contact is oriented 1109 * An angle of 0 degrees indicates that the major axis of contact is oriented
685 * upwards, is perfectly circular or is of unknown orientation. A positive angle 1110 * upwards, is perfectly circular or is of unknown orientation. A positive angle
686 * indicates that the major axis of contact is oriented to the right. A negative angle 1111 * indicates that the major axis of contact is oriented to the right. A negative angle
687 * indicates that the major axis of contact is oriented to the left. 1112 * indicates that the major axis of contact is oriented to the left.
688 * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians 1113 * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
689 * (finger pointing fully right). */ 1114 * (finger pointing fully right).
1115 */
690float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index); 1116float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index);
691 1117
692/* Get the value of the request axis for the given pointer index. */ 1118/** Get the value of the request axis for the given pointer index. */
693float AMotionEvent_getAxisValue(const AInputEvent* motion_event, 1119float AMotionEvent_getAxisValue(const AInputEvent* motion_event,
694 int32_t axis, size_t pointer_index); 1120 int32_t axis, size_t pointer_index);
695 1121
696/* Get the number of historical points in this event. These are movements that 1122/**
1123 * Get the number of historical points in this event. These are movements that
697 * have occurred between this event and the previous event. This only applies 1124 * have occurred between this event and the previous event. This only applies
698 * to AMOTION_EVENT_ACTION_MOVE events -- all other actions will have a size of 0. 1125 * to AMOTION_EVENT_ACTION_MOVE events -- all other actions will have a size of 0.
699 * Historical samples are indexed from oldest to newest. */ 1126 * Historical samples are indexed from oldest to newest.
1127 */
700size_t AMotionEvent_getHistorySize(const AInputEvent* motion_event); 1128size_t AMotionEvent_getHistorySize(const AInputEvent* motion_event);
701 1129
702/* Get the time that a historical movement occurred between this event and 1130/**
703 * the previous event, in the java.lang.System.nanoTime() time base. */ 1131 * Get the time that a historical movement occurred between this event and
1132 * the previous event, in the java.lang.System.nanoTime() time base.
1133 */
704int64_t AMotionEvent_getHistoricalEventTime(const AInputEvent* motion_event, 1134int64_t AMotionEvent_getHistoricalEventTime(const AInputEvent* motion_event,
705 size_t history_index); 1135 size_t history_index);
706 1136
707/* Get the historical raw X coordinate of this event for the given pointer index that 1137/**
1138 * Get the historical raw X coordinate of this event for the given pointer index that
708 * occurred between this event and the previous motion event. 1139 * occurred between this event and the previous motion event.
709 * For touch events on the screen, this is the original location of the event 1140 * For touch events on the screen, this is the original location of the event
710 * on the screen, before it had been adjusted for the containing window 1141 * on the screen, before it had been adjusted for the containing window
711 * and views. 1142 * and views.
712 * Whole numbers are pixels; the value may have a fraction for input devices 1143 * Whole numbers are pixels; the value may have a fraction for input devices
713 * that are sub-pixel precise. */ 1144 * that are sub-pixel precise.
1145 */
714float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t pointer_index, 1146float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t pointer_index,
715 size_t history_index); 1147 size_t history_index);
716 1148
717/* Get the historical raw Y coordinate of this event for the given pointer index that 1149/**
1150 * Get the historical raw Y coordinate of this event for the given pointer index that
718 * occurred between this event and the previous motion event. 1151 * occurred between this event and the previous motion event.
719 * For touch events on the screen, this is the original location of the event 1152 * For touch events on the screen, this is the original location of the event
720 * on the screen, before it had been adjusted for the containing window 1153 * on the screen, before it had been adjusted for the containing window
721 * and views. 1154 * and views.
722 * Whole numbers are pixels; the value may have a fraction for input devices 1155 * Whole numbers are pixels; the value may have a fraction for input devices
723 * that are sub-pixel precise. */ 1156 * that are sub-pixel precise.
1157 */
724float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, size_t pointer_index, 1158float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, size_t pointer_index,
725 size_t history_index); 1159 size_t history_index);
726 1160
727/* Get the historical X coordinate of this event for the given pointer index that 1161/**
1162 * Get the historical X coordinate of this event for the given pointer index that
728 * occurred between this event and the previous motion event. 1163 * occurred between this event and the previous motion event.
729 * Whole numbers are pixels; the value may have a fraction for input devices 1164 * Whole numbers are pixels; the value may have a fraction for input devices
730 * that are sub-pixel precise. */ 1165 * that are sub-pixel precise.
1166 */
731float AMotionEvent_getHistoricalX(const AInputEvent* motion_event, size_t pointer_index, 1167float AMotionEvent_getHistoricalX(const AInputEvent* motion_event, size_t pointer_index,
732 size_t history_index); 1168 size_t history_index);
733 1169
734/* Get the historical Y coordinate of this event for the given pointer index that 1170/**
1171 * Get the historical Y coordinate of this event for the given pointer index that
735 * occurred between this event and the previous motion event. 1172 * occurred between this event and the previous motion event.
736 * Whole numbers are pixels; the value may have a fraction for input devices 1173 * Whole numbers are pixels; the value may have a fraction for input devices
737 * that are sub-pixel precise. */ 1174 * that are sub-pixel precise.
1175 */
738float AMotionEvent_getHistoricalY(const AInputEvent* motion_event, size_t pointer_index, 1176float AMotionEvent_getHistoricalY(const AInputEvent* motion_event, size_t pointer_index,
739 size_t history_index); 1177 size_t history_index);
740 1178
741/* Get the historical pressure of this event for the given pointer index that 1179/**
1180 * Get the historical pressure of this event for the given pointer index that
742 * occurred between this event and the previous motion event. 1181 * occurred between this event and the previous motion event.
743 * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), 1182 * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
744 * although values higher than 1 may be generated depending on the calibration of 1183 * although values higher than 1 may be generated depending on the calibration of
745 * the input device. */ 1184 * the input device.
1185 */
746float AMotionEvent_getHistoricalPressure(const AInputEvent* motion_event, size_t pointer_index, 1186float AMotionEvent_getHistoricalPressure(const AInputEvent* motion_event, size_t pointer_index,
747 size_t history_index); 1187 size_t history_index);
748 1188
749/* Get the current scaled value of the approximate size for the given pointer index that 1189/**
1190 * Get the current scaled value of the approximate size for the given pointer index that
750 * occurred between this event and the previous motion event. 1191 * occurred between this event and the previous motion event.
751 * This represents some approximation of the area of the screen being 1192 * This represents some approximation of the area of the screen being
752 * pressed; the actual value in pixels corresponding to the 1193 * pressed; the actual value in pixels corresponding to the
753 * touch is normalized with the device specific range of values 1194 * touch is normalized with the device specific range of values
754 * and scaled to a value between 0 and 1. The value of size can be used to 1195 * and scaled to a value between 0 and 1. The value of size can be used to
755 * determine fat touch events. */ 1196 * determine fat touch events.
1197 */
756float AMotionEvent_getHistoricalSize(const AInputEvent* motion_event, size_t pointer_index, 1198float AMotionEvent_getHistoricalSize(const AInputEvent* motion_event, size_t pointer_index,
757 size_t history_index); 1199 size_t history_index);
758 1200
759/* Get the historical length of the major axis of an ellipse that describes the touch area 1201/**
1202 * Get the historical length of the major axis of an ellipse that describes the touch area
760 * at the point of contact for the given pointer index that 1203 * at the point of contact for the given pointer index that
761 * occurred between this event and the previous motion event. */ 1204 * occurred between this event and the previous motion event.
1205 */
762float AMotionEvent_getHistoricalTouchMajor(const AInputEvent* motion_event, size_t pointer_index, 1206float AMotionEvent_getHistoricalTouchMajor(const AInputEvent* motion_event, size_t pointer_index,
763 size_t history_index); 1207 size_t history_index);
764 1208
765/* Get the historical length of the minor axis of an ellipse that describes the touch area 1209/**
1210 * Get the historical length of the minor axis of an ellipse that describes the touch area
766 * at the point of contact for the given pointer index that 1211 * at the point of contact for the given pointer index that
767 * occurred between this event and the previous motion event. */ 1212 * occurred between this event and the previous motion event.
1213 */
768float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size_t pointer_index, 1214float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size_t pointer_index,
769 size_t history_index); 1215 size_t history_index);
770 1216
771/* Get the historical length of the major axis of an ellipse that describes the size 1217/**
1218 * Get the historical length of the major axis of an ellipse that describes the size
772 * of the approaching tool for the given pointer index that 1219 * of the approaching tool for the given pointer index that
773 * occurred between this event and the previous motion event. 1220 * occurred between this event and the previous motion event.
774 * The tool area represents the estimated size of the finger or pen that is 1221 * The tool area represents the estimated size of the finger or pen that is
775 * touching the device independent of its actual touch area at the point of contact. */ 1222 * touching the device independent of its actual touch area at the point of contact.
1223 */
776float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_t pointer_index, 1224float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_t pointer_index,
777 size_t history_index); 1225 size_t history_index);
778 1226
779/* Get the historical length of the minor axis of an ellipse that describes the size 1227/**
1228 * Get the historical length of the minor axis of an ellipse that describes the size
780 * of the approaching tool for the given pointer index that 1229 * of the approaching tool for the given pointer index that
781 * occurred between this event and the previous motion event. 1230 * occurred between this event and the previous motion event.
782 * The tool area represents the estimated size of the finger or pen that is 1231 * The tool area represents the estimated size of the finger or pen that is
783 * touching the device independent of its actual touch area at the point of contact. */ 1232 * touching the device independent of its actual touch area at the point of contact.
1233 */
784float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_t pointer_index, 1234float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_t pointer_index,
785 size_t history_index); 1235 size_t history_index);
786 1236
787/* Get the historical orientation of the touch area and tool area in radians clockwise from 1237/**
1238 * Get the historical orientation of the touch area and tool area in radians clockwise from
788 * vertical for the given pointer index that 1239 * vertical for the given pointer index that
789 * occurred between this event and the previous motion event. 1240 * occurred between this event and the previous motion event.
790 * An angle of 0 degrees indicates that the major axis of contact is oriented 1241 * An angle of 0 degrees indicates that the major axis of contact is oriented
@@ -792,51 +1243,54 @@ float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_
792 * indicates that the major axis of contact is oriented to the right. A negative angle 1243 * indicates that the major axis of contact is oriented to the right. A negative angle
793 * indicates that the major axis of contact is oriented to the left. 1244 * indicates that the major axis of contact is oriented to the left.
794 * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians 1245 * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
795 * (finger pointing fully right). */ 1246 * (finger pointing fully right).
1247 */
796float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index, 1248float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index,
797 size_t history_index); 1249 size_t history_index);
798 1250
799/* Get the historical value of the request axis for the given pointer index 1251/**
800 * that occurred between this event and the previous motion event. */ 1252 * Get the historical value of the request axis for the given pointer index
1253 * that occurred between this event and the previous motion event.
1254 */
801float AMotionEvent_getHistoricalAxisValue(const AInputEvent* motion_event, 1255float AMotionEvent_getHistoricalAxisValue(const AInputEvent* motion_event,
802 int32_t axis, size_t pointer_index, size_t history_index); 1256 int32_t axis, size_t pointer_index, size_t history_index);
803 1257
804 1258
805/* 1259struct AInputQueue;
1260/**
806 * Input queue 1261 * Input queue
807 * 1262 *
808 * An input queue is the facility through which you retrieve input 1263 * An input queue is the facility through which you retrieve input
809 * events. 1264 * events.
810 */ 1265 */
811struct AInputQueue;
812typedef struct AInputQueue AInputQueue; 1266typedef struct AInputQueue AInputQueue;
813 1267
814/* 1268/**
815 * Add this input queue to a looper for processing. See 1269 * Add this input queue to a looper for processing. See
816 * ALooper_addFd() for information on the ident, callback, and data params. 1270 * ALooper_addFd() for information on the ident, callback, and data params.
817 */ 1271 */
818void AInputQueue_attachLooper(AInputQueue* queue, ALooper* looper, 1272void AInputQueue_attachLooper(AInputQueue* queue, ALooper* looper,
819 int ident, ALooper_callbackFunc callback, void* data); 1273 int ident, ALooper_callbackFunc callback, void* data);
820 1274
821/* 1275/**
822 * Remove the input queue from the looper it is currently attached to. 1276 * Remove the input queue from the looper it is currently attached to.
823 */ 1277 */
824void AInputQueue_detachLooper(AInputQueue* queue); 1278void AInputQueue_detachLooper(AInputQueue* queue);
825 1279
826/* 1280/**
827 * Returns true if there are one or more events available in the 1281 * Returns true if there are one or more events available in the
828 * input queue. Returns 1 if the queue has events; 0 if 1282 * input queue. Returns 1 if the queue has events; 0 if
829 * it does not have events; and a negative value if there is an error. 1283 * it does not have events; and a negative value if there is an error.
830 */ 1284 */
831int32_t AInputQueue_hasEvents(AInputQueue* queue); 1285int32_t AInputQueue_hasEvents(AInputQueue* queue);
832 1286
833/* 1287/**
834 * Returns the next available event from the queue. Returns a negative 1288 * Returns the next available event from the queue. Returns a negative
835 * value if no events are available or an error has occurred. 1289 * value if no events are available or an error has occurred.
836 */ 1290 */
837int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent); 1291int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent);
838 1292
839/* 1293/**
840 * Sends the key for standard pre-dispatching -- that is, possibly deliver 1294 * Sends the key for standard pre-dispatching -- that is, possibly deliver
841 * it to the current IME to be consumed before the app. Returns 0 if it 1295 * it to the current IME to be consumed before the app. Returns 0 if it
842 * was not pre-dispatched, meaning you can process it right now. If non-zero 1296 * was not pre-dispatched, meaning you can process it right now. If non-zero
@@ -846,7 +1300,7 @@ int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent);
846 */ 1300 */
847int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event); 1301int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event);
848 1302
849/* 1303/**
850 * Report that dispatching has finished with the given event. 1304 * Report that dispatching has finished with the given event.
851 * This must be called after receiving an event with AInputQueue_get_event(). 1305 * This must be called after receiving an event with AInputQueue_get_event().
852 */ 1306 */
@@ -857,3 +1311,5 @@ void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled
857#endif 1311#endif
858 1312
859#endif // _ANDROID_INPUT_H 1313#endif // _ANDROID_INPUT_H
1314
1315/** @} */
diff --git a/include/android/keycodes.h b/include/android/keycodes.h
index de9e7354b..421abe547 100644
--- a/include/android/keycodes.h
+++ b/include/android/keycodes.h
@@ -14,6 +14,15 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Input
19 * @{
20 */
21
22/**
23 * @file keycodes.h
24 */
25
17#ifndef _ANDROID_KEYCODES_H 26#ifndef _ANDROID_KEYCODES_H
18#define _ANDROID_KEYCODES_H 27#define _ANDROID_KEYCODES_H
19 28
@@ -39,278 +48,696 @@
39extern "C" { 48extern "C" {
40#endif 49#endif
41 50
42/* 51/**
43 * Key codes. 52 * Key codes.
44 */ 53 */
45enum { 54enum {
55 /** Unknown key code. */
46 AKEYCODE_UNKNOWN = 0, 56 AKEYCODE_UNKNOWN = 0,
57 /** Soft Left key.
58 * Usually situated below the display on phones and used as a multi-function
59 * feature key for selecting a software defined function shown on the bottom left
60 * of the display. */
47 AKEYCODE_SOFT_LEFT = 1, 61 AKEYCODE_SOFT_LEFT = 1,
62 /** Soft Right key.
63 * Usually situated below the display on phones and used as a multi-function
64 * feature key for selecting a software defined function shown on the bottom right
65 * of the display. */
48 AKEYCODE_SOFT_RIGHT = 2, 66 AKEYCODE_SOFT_RIGHT = 2,
67 /** Home key.
68 * This key is handled by the framework and is never delivered to applications. */
49 AKEYCODE_HOME = 3, 69 AKEYCODE_HOME = 3,
70 /** Back key. */
50 AKEYCODE_BACK = 4, 71 AKEYCODE_BACK = 4,
72 /** Call key. */
51 AKEYCODE_CALL = 5, 73 AKEYCODE_CALL = 5,
74 /** End Call key. */
52 AKEYCODE_ENDCALL = 6, 75 AKEYCODE_ENDCALL = 6,
76 /** '0' key. */
53 AKEYCODE_0 = 7, 77 AKEYCODE_0 = 7,
78 /** '1' key. */
54 AKEYCODE_1 = 8, 79 AKEYCODE_1 = 8,
80 /** '2' key. */
55 AKEYCODE_2 = 9, 81 AKEYCODE_2 = 9,
82 /** '3' key. */
56 AKEYCODE_3 = 10, 83 AKEYCODE_3 = 10,
84 /** '4' key. */
57 AKEYCODE_4 = 11, 85 AKEYCODE_4 = 11,
86 /** '5' key. */
58 AKEYCODE_5 = 12, 87 AKEYCODE_5 = 12,
88 /** '6' key. */
59 AKEYCODE_6 = 13, 89 AKEYCODE_6 = 13,
90 /** '7' key. */
60 AKEYCODE_7 = 14, 91 AKEYCODE_7 = 14,
92 /** '8' key. */
61 AKEYCODE_8 = 15, 93 AKEYCODE_8 = 15,
94 /** '9' key. */
62 AKEYCODE_9 = 16, 95 AKEYCODE_9 = 16,
96 /** '*' key. */
63 AKEYCODE_STAR = 17, 97 AKEYCODE_STAR = 17,
98 /** '#' key. */
64 AKEYCODE_POUND = 18, 99 AKEYCODE_POUND = 18,
100 /** Directional Pad Up key.
101 * May also be synthesized from trackball motions. */
65 AKEYCODE_DPAD_UP = 19, 102 AKEYCODE_DPAD_UP = 19,
103 /** Directional Pad Down key.
104 * May also be synthesized from trackball motions. */
66 AKEYCODE_DPAD_DOWN = 20, 105 AKEYCODE_DPAD_DOWN = 20,
106 /** Directional Pad Left key.
107 * May also be synthesized from trackball motions. */
67 AKEYCODE_DPAD_LEFT = 21, 108 AKEYCODE_DPAD_LEFT = 21,
109 /** Directional Pad Right key.
110 * May also be synthesized from trackball motions. */
68 AKEYCODE_DPAD_RIGHT = 22, 111 AKEYCODE_DPAD_RIGHT = 22,
112 /** Directional Pad Center key.
113 * May also be synthesized from trackball motions. */
69 AKEYCODE_DPAD_CENTER = 23, 114 AKEYCODE_DPAD_CENTER = 23,
115 /** Volume Up key.
116 * Adjusts the speaker volume up. */
70 AKEYCODE_VOLUME_UP = 24, 117 AKEYCODE_VOLUME_UP = 24,
118 /** Volume Down key.
119 * Adjusts the speaker volume down. */
71 AKEYCODE_VOLUME_DOWN = 25, 120 AKEYCODE_VOLUME_DOWN = 25,
121 /** Power key. */
72 AKEYCODE_POWER = 26, 122 AKEYCODE_POWER = 26,
123 /** Camera key.
124 * Used to launch a camera application or take pictures. */
73 AKEYCODE_CAMERA = 27, 125 AKEYCODE_CAMERA = 27,
126 /** Clear key. */
74 AKEYCODE_CLEAR = 28, 127 AKEYCODE_CLEAR = 28,
128 /** 'A' key. */
75 AKEYCODE_A = 29, 129 AKEYCODE_A = 29,
130 /** 'B' key. */
76 AKEYCODE_B = 30, 131 AKEYCODE_B = 30,
132 /** 'C' key. */
77 AKEYCODE_C = 31, 133 AKEYCODE_C = 31,
134 /** 'D' key. */
78 AKEYCODE_D = 32, 135 AKEYCODE_D = 32,
136 /** 'E' key. */
79 AKEYCODE_E = 33, 137 AKEYCODE_E = 33,
138 /** 'F' key. */
80 AKEYCODE_F = 34, 139 AKEYCODE_F = 34,
140 /** 'G' key. */
81 AKEYCODE_G = 35, 141 AKEYCODE_G = 35,
142 /** 'H' key. */
82 AKEYCODE_H = 36, 143 AKEYCODE_H = 36,
144 /** 'I' key. */
83 AKEYCODE_I = 37, 145 AKEYCODE_I = 37,
146 /** 'J' key. */
84 AKEYCODE_J = 38, 147 AKEYCODE_J = 38,
148 /** 'K' key. */
85 AKEYCODE_K = 39, 149 AKEYCODE_K = 39,
150 /** 'L' key. */
86 AKEYCODE_L = 40, 151 AKEYCODE_L = 40,
152 /** 'M' key. */
87 AKEYCODE_M = 41, 153 AKEYCODE_M = 41,
154 /** 'N' key. */
88 AKEYCODE_N = 42, 155 AKEYCODE_N = 42,
156 /** 'O' key. */
89 AKEYCODE_O = 43, 157 AKEYCODE_O = 43,
158 /** 'P' key. */
90 AKEYCODE_P = 44, 159 AKEYCODE_P = 44,
160 /** 'Q' key. */
91 AKEYCODE_Q = 45, 161 AKEYCODE_Q = 45,
162 /** 'R' key. */
92 AKEYCODE_R = 46, 163 AKEYCODE_R = 46,
164 /** 'S' key. */
93 AKEYCODE_S = 47, 165 AKEYCODE_S = 47,
166 /** 'T' key. */
94 AKEYCODE_T = 48, 167 AKEYCODE_T = 48,
168 /** 'U' key. */
95 AKEYCODE_U = 49, 169 AKEYCODE_U = 49,
170 /** 'V' key. */
96 AKEYCODE_V = 50, 171 AKEYCODE_V = 50,
172 /** 'W' key. */
97 AKEYCODE_W = 51, 173 AKEYCODE_W = 51,
174 /** 'X' key. */
98 AKEYCODE_X = 52, 175 AKEYCODE_X = 52,
176 /** 'Y' key. */
99 AKEYCODE_Y = 53, 177 AKEYCODE_Y = 53,
178 /** 'Z' key. */
100 AKEYCODE_Z = 54, 179 AKEYCODE_Z = 54,
180 /** ',' key. */
101 AKEYCODE_COMMA = 55, 181 AKEYCODE_COMMA = 55,
182 /** '.' key. */
102 AKEYCODE_PERIOD = 56, 183 AKEYCODE_PERIOD = 56,
184 /** Left Alt modifier key. */
103 AKEYCODE_ALT_LEFT = 57, 185 AKEYCODE_ALT_LEFT = 57,
186 /** Right Alt modifier key. */
104 AKEYCODE_ALT_RIGHT = 58, 187 AKEYCODE_ALT_RIGHT = 58,
188 /** Left Shift modifier key. */
105 AKEYCODE_SHIFT_LEFT = 59, 189 AKEYCODE_SHIFT_LEFT = 59,
190 /** Right Shift modifier key. */
106 AKEYCODE_SHIFT_RIGHT = 60, 191 AKEYCODE_SHIFT_RIGHT = 60,
192 /** Tab key. */
107 AKEYCODE_TAB = 61, 193 AKEYCODE_TAB = 61,
194 /** Space key. */
108 AKEYCODE_SPACE = 62, 195 AKEYCODE_SPACE = 62,
196 /** Symbol modifier key.
197 * Used to enter alternate symbols. */
109 AKEYCODE_SYM = 63, 198 AKEYCODE_SYM = 63,
199 /** Explorer special function key.
200 * Used to launch a browser application. */
110 AKEYCODE_EXPLORER = 64, 201 AKEYCODE_EXPLORER = 64,
202 /** Envelope special function key.
203 * Used to launch a mail application. */
111 AKEYCODE_ENVELOPE = 65, 204 AKEYCODE_ENVELOPE = 65,
205 /** Enter key. */
112 AKEYCODE_ENTER = 66, 206 AKEYCODE_ENTER = 66,
207 /** Backspace key.
208 * Deletes characters before the insertion point, unlike {@link AKEYCODE_FORWARD_DEL}. */
113 AKEYCODE_DEL = 67, 209 AKEYCODE_DEL = 67,
210 /** '`' (backtick) key. */
114 AKEYCODE_GRAVE = 68, 211 AKEYCODE_GRAVE = 68,
212 /** '-'. */
115 AKEYCODE_MINUS = 69, 213 AKEYCODE_MINUS = 69,
214 /** '=' key. */
116 AKEYCODE_EQUALS = 70, 215 AKEYCODE_EQUALS = 70,
216 /** '[' key. */
117 AKEYCODE_LEFT_BRACKET = 71, 217 AKEYCODE_LEFT_BRACKET = 71,
218 /** ']' key. */
118 AKEYCODE_RIGHT_BRACKET = 72, 219 AKEYCODE_RIGHT_BRACKET = 72,
220 /** '\' key. */
119 AKEYCODE_BACKSLASH = 73, 221 AKEYCODE_BACKSLASH = 73,
222 /** ';' key. */
120 AKEYCODE_SEMICOLON = 74, 223 AKEYCODE_SEMICOLON = 74,
224 /** ''' (apostrophe) key. */
121 AKEYCODE_APOSTROPHE = 75, 225 AKEYCODE_APOSTROPHE = 75,
226 /** '/' key. */
122 AKEYCODE_SLASH = 76, 227 AKEYCODE_SLASH = 76,
228 /** '@' key. */
123 AKEYCODE_AT = 77, 229 AKEYCODE_AT = 77,
230 /** Number modifier key.
231 * Used to enter numeric symbols.
232 * This key is not {@link AKEYCODE_NUM_LOCK}; it is more like {@link AKEYCODE_ALT_LEFT}. */
124 AKEYCODE_NUM = 78, 233 AKEYCODE_NUM = 78,
234 /** Headset Hook key.
235 * Used to hang up calls and stop media. */
125 AKEYCODE_HEADSETHOOK = 79, 236 AKEYCODE_HEADSETHOOK = 79,
126 AKEYCODE_FOCUS = 80, // *Camera* focus 237 /** Camera Focus key.
238 * Used to focus the camera. */
239 AKEYCODE_FOCUS = 80,
240 /** '+' key. */
127 AKEYCODE_PLUS = 81, 241 AKEYCODE_PLUS = 81,
242 /** Menu key. */
128 AKEYCODE_MENU = 82, 243 AKEYCODE_MENU = 82,
244 /** Notification key. */
129 AKEYCODE_NOTIFICATION = 83, 245 AKEYCODE_NOTIFICATION = 83,
246 /** Search key. */
130 AKEYCODE_SEARCH = 84, 247 AKEYCODE_SEARCH = 84,
248 /** Play/Pause media key. */
131 AKEYCODE_MEDIA_PLAY_PAUSE= 85, 249 AKEYCODE_MEDIA_PLAY_PAUSE= 85,
250 /** Stop media key. */
132 AKEYCODE_MEDIA_STOP = 86, 251 AKEYCODE_MEDIA_STOP = 86,
252 /** Play Next media key. */
133 AKEYCODE_MEDIA_NEXT = 87, 253 AKEYCODE_MEDIA_NEXT = 87,
254 /** Play Previous media key. */
134 AKEYCODE_MEDIA_PREVIOUS = 88, 255 AKEYCODE_MEDIA_PREVIOUS = 88,
256 /** Rewind media key. */
135 AKEYCODE_MEDIA_REWIND = 89, 257 AKEYCODE_MEDIA_REWIND = 89,
258 /** Fast Forward media key. */
136 AKEYCODE_MEDIA_FAST_FORWARD = 90, 259 AKEYCODE_MEDIA_FAST_FORWARD = 90,
260 /** Mute key.
261 * Mutes the microphone, unlike {@link AKEYCODE_VOLUME_MUTE}. */
137 AKEYCODE_MUTE = 91, 262 AKEYCODE_MUTE = 91,
263 /** Page Up key. */
138 AKEYCODE_PAGE_UP = 92, 264 AKEYCODE_PAGE_UP = 92,
265 /** Page Down key. */
139 AKEYCODE_PAGE_DOWN = 93, 266 AKEYCODE_PAGE_DOWN = 93,
267 /** Picture Symbols modifier key.
268 * Used to switch symbol sets (Emoji, Kao-moji). */
140 AKEYCODE_PICTSYMBOLS = 94, 269 AKEYCODE_PICTSYMBOLS = 94,
270 /** Switch Charset modifier key.
271 * Used to switch character sets (Kanji, Katakana). */
141 AKEYCODE_SWITCH_CHARSET = 95, 272 AKEYCODE_SWITCH_CHARSET = 95,
273 /** A Button key.
274 * On a game controller, the A button should be either the button labeled A
275 * or the first button on the bottom row of controller buttons. */
142 AKEYCODE_BUTTON_A = 96, 276 AKEYCODE_BUTTON_A = 96,
277 /** B Button key.
278 * On a game controller, the B button should be either the button labeled B
279 * or the second button on the bottom row of controller buttons. */
143 AKEYCODE_BUTTON_B = 97, 280 AKEYCODE_BUTTON_B = 97,
281 /** C Button key.
282 * On a game controller, the C button should be either the button labeled C
283 * or the third button on the bottom row of controller buttons. */
144 AKEYCODE_BUTTON_C = 98, 284 AKEYCODE_BUTTON_C = 98,
285 /** X Button key.
286 * On a game controller, the X button should be either the button labeled X
287 * or the first button on the upper row of controller buttons. */
145 AKEYCODE_BUTTON_X = 99, 288 AKEYCODE_BUTTON_X = 99,
289 /** Y Button key.
290 * On a game controller, the Y button should be either the button labeled Y
291 * or the second button on the upper row of controller buttons. */
146 AKEYCODE_BUTTON_Y = 100, 292 AKEYCODE_BUTTON_Y = 100,
293 /** Z Button key.
294 * On a game controller, the Z button should be either the button labeled Z
295 * or the third button on the upper row of controller buttons. */
147 AKEYCODE_BUTTON_Z = 101, 296 AKEYCODE_BUTTON_Z = 101,
297 /** L1 Button key.
298 * On a game controller, the L1 button should be either the button labeled L1 (or L)
299 * or the top left trigger button. */
148 AKEYCODE_BUTTON_L1 = 102, 300 AKEYCODE_BUTTON_L1 = 102,
301 /** R1 Button key.
302 * On a game controller, the R1 button should be either the button labeled R1 (or R)
303 * or the top right trigger button. */
149 AKEYCODE_BUTTON_R1 = 103, 304 AKEYCODE_BUTTON_R1 = 103,
305 /** L2 Button key.
306 * On a game controller, the L2 button should be either the button labeled L2
307 * or the bottom left trigger button. */
150 AKEYCODE_BUTTON_L2 = 104, 308 AKEYCODE_BUTTON_L2 = 104,
309 /** R2 Button key.
310 * On a game controller, the R2 button should be either the button labeled R2
311 * or the bottom right trigger button. */
151 AKEYCODE_BUTTON_R2 = 105, 312 AKEYCODE_BUTTON_R2 = 105,
313 /** Left Thumb Button key.
314 * On a game controller, the left thumb button indicates that the left (or only)
315 * joystick is pressed. */
152 AKEYCODE_BUTTON_THUMBL = 106, 316 AKEYCODE_BUTTON_THUMBL = 106,
317 /** Right Thumb Button key.
318 * On a game controller, the right thumb button indicates that the right
319 * joystick is pressed. */
153 AKEYCODE_BUTTON_THUMBR = 107, 320 AKEYCODE_BUTTON_THUMBR = 107,
321 /** Start Button key.
322 * On a game controller, the button labeled Start. */
154 AKEYCODE_BUTTON_START = 108, 323 AKEYCODE_BUTTON_START = 108,
324 /** Select Button key.
325 * On a game controller, the button labeled Select. */
155 AKEYCODE_BUTTON_SELECT = 109, 326 AKEYCODE_BUTTON_SELECT = 109,
327 /** Mode Button key.
328 * On a game controller, the button labeled Mode. */
156 AKEYCODE_BUTTON_MODE = 110, 329 AKEYCODE_BUTTON_MODE = 110,
330 /** Escape key. */
157 AKEYCODE_ESCAPE = 111, 331 AKEYCODE_ESCAPE = 111,
332 /** Forward Delete key.
333 * Deletes characters ahead of the insertion point, unlike {@link AKEYCODE_DEL}. */
158 AKEYCODE_FORWARD_DEL = 112, 334 AKEYCODE_FORWARD_DEL = 112,
335 /** Left Control modifier key. */
159 AKEYCODE_CTRL_LEFT = 113, 336 AKEYCODE_CTRL_LEFT = 113,
337 /** Right Control modifier key. */
160 AKEYCODE_CTRL_RIGHT = 114, 338 AKEYCODE_CTRL_RIGHT = 114,
339 /** Caps Lock key. */
161 AKEYCODE_CAPS_LOCK = 115, 340 AKEYCODE_CAPS_LOCK = 115,
341 /** Scroll Lock key. */
162 AKEYCODE_SCROLL_LOCK = 116, 342 AKEYCODE_SCROLL_LOCK = 116,
343 /** Left Meta modifier key. */
163 AKEYCODE_META_LEFT = 117, 344 AKEYCODE_META_LEFT = 117,
345 /** Right Meta modifier key. */
164 AKEYCODE_META_RIGHT = 118, 346 AKEYCODE_META_RIGHT = 118,
347 /** Function modifier key. */
165 AKEYCODE_FUNCTION = 119, 348 AKEYCODE_FUNCTION = 119,
349 /** System Request / Print Screen key. */
166 AKEYCODE_SYSRQ = 120, 350 AKEYCODE_SYSRQ = 120,
351 /** Break / Pause key. */
167 AKEYCODE_BREAK = 121, 352 AKEYCODE_BREAK = 121,
353 /** Home Movement key.
354 * Used for scrolling or moving the cursor around to the start of a line
355 * or to the top of a list. */
168 AKEYCODE_MOVE_HOME = 122, 356 AKEYCODE_MOVE_HOME = 122,
357 /** End Movement key.
358 * Used for scrolling or moving the cursor around to the end of a line
359 * or to the bottom of a list. */
169 AKEYCODE_MOVE_END = 123, 360 AKEYCODE_MOVE_END = 123,
361 /** Insert key.
362 * Toggles insert / overwrite edit mode. */
170 AKEYCODE_INSERT = 124, 363 AKEYCODE_INSERT = 124,
364 /** Forward key.
365 * Navigates forward in the history stack. Complement of {@link AKEYCODE_BACK}. */
171 AKEYCODE_FORWARD = 125, 366 AKEYCODE_FORWARD = 125,
367 /** Play media key. */
172 AKEYCODE_MEDIA_PLAY = 126, 368 AKEYCODE_MEDIA_PLAY = 126,
369 /** Pause media key. */
173 AKEYCODE_MEDIA_PAUSE = 127, 370 AKEYCODE_MEDIA_PAUSE = 127,
371 /** Close media key.
372 * May be used to close a CD tray, for example. */
174 AKEYCODE_MEDIA_CLOSE = 128, 373 AKEYCODE_MEDIA_CLOSE = 128,
374 /** Eject media key.
375 * May be used to eject a CD tray, for example. */
175 AKEYCODE_MEDIA_EJECT = 129, 376 AKEYCODE_MEDIA_EJECT = 129,
377 /** Record media key. */
176 AKEYCODE_MEDIA_RECORD = 130, 378 AKEYCODE_MEDIA_RECORD = 130,
379 /** F1 key. */
177 AKEYCODE_F1 = 131, 380 AKEYCODE_F1 = 131,
381 /** F2 key. */
178 AKEYCODE_F2 = 132, 382 AKEYCODE_F2 = 132,
383 /** F3 key. */
179 AKEYCODE_F3 = 133, 384 AKEYCODE_F3 = 133,
385 /** F4 key. */
180 AKEYCODE_F4 = 134, 386 AKEYCODE_F4 = 134,
387 /** F5 key. */
181 AKEYCODE_F5 = 135, 388 AKEYCODE_F5 = 135,
389 /** F6 key. */
182 AKEYCODE_F6 = 136, 390 AKEYCODE_F6 = 136,
391 /** F7 key. */
183 AKEYCODE_F7 = 137, 392 AKEYCODE_F7 = 137,
393 /** F8 key. */
184 AKEYCODE_F8 = 138, 394 AKEYCODE_F8 = 138,
395 /** F9 key. */
185 AKEYCODE_F9 = 139, 396 AKEYCODE_F9 = 139,
397 /** F10 key. */
186 AKEYCODE_F10 = 140, 398 AKEYCODE_F10 = 140,
399 /** F11 key. */
187 AKEYCODE_F11 = 141, 400 AKEYCODE_F11 = 141,
401 /** F12 key. */
188 AKEYCODE_F12 = 142, 402 AKEYCODE_F12 = 142,
403 /** Num Lock key.
404 * This is the Num Lock key; it is different from {@link AKEYCODE_NUM}.
405 * This key alters the behavior of other keys on the numeric keypad. */
189 AKEYCODE_NUM_LOCK = 143, 406 AKEYCODE_NUM_LOCK = 143,
407 /** Numeric keypad '0' key. */
190 AKEYCODE_NUMPAD_0 = 144, 408 AKEYCODE_NUMPAD_0 = 144,
409 /** Numeric keypad '1' key. */
191 AKEYCODE_NUMPAD_1 = 145, 410 AKEYCODE_NUMPAD_1 = 145,
411 /** Numeric keypad '2' key. */
192 AKEYCODE_NUMPAD_2 = 146, 412 AKEYCODE_NUMPAD_2 = 146,
413 /** Numeric keypad '3' key. */
193 AKEYCODE_NUMPAD_3 = 147, 414 AKEYCODE_NUMPAD_3 = 147,
415 /** Numeric keypad '4' key. */
194 AKEYCODE_NUMPAD_4 = 148, 416 AKEYCODE_NUMPAD_4 = 148,
417 /** Numeric keypad '5' key. */
195 AKEYCODE_NUMPAD_5 = 149, 418 AKEYCODE_NUMPAD_5 = 149,
419 /** Numeric keypad '6' key. */
196 AKEYCODE_NUMPAD_6 = 150, 420 AKEYCODE_NUMPAD_6 = 150,
421 /** Numeric keypad '7' key. */
197 AKEYCODE_NUMPAD_7 = 151, 422 AKEYCODE_NUMPAD_7 = 151,
423 /** Numeric keypad '8' key. */
198 AKEYCODE_NUMPAD_8 = 152, 424 AKEYCODE_NUMPAD_8 = 152,
425 /** Numeric keypad '9' key. */
199 AKEYCODE_NUMPAD_9 = 153, 426 AKEYCODE_NUMPAD_9 = 153,
427 /** Numeric keypad '/' key (for division). */
200 AKEYCODE_NUMPAD_DIVIDE = 154, 428 AKEYCODE_NUMPAD_DIVIDE = 154,
429 /** Numeric keypad '*' key (for multiplication). */
201 AKEYCODE_NUMPAD_MULTIPLY = 155, 430 AKEYCODE_NUMPAD_MULTIPLY = 155,
431 /** Numeric keypad '-' key (for subtraction). */
202 AKEYCODE_NUMPAD_SUBTRACT = 156, 432 AKEYCODE_NUMPAD_SUBTRACT = 156,
433 /** Numeric keypad '+' key (for addition). */
203 AKEYCODE_NUMPAD_ADD = 157, 434 AKEYCODE_NUMPAD_ADD = 157,
435 /** Numeric keypad '.' key (for decimals or digit grouping). */
204 AKEYCODE_NUMPAD_DOT = 158, 436 AKEYCODE_NUMPAD_DOT = 158,
437 /** Numeric keypad ',' key (for decimals or digit grouping). */
205 AKEYCODE_NUMPAD_COMMA = 159, 438 AKEYCODE_NUMPAD_COMMA = 159,
439 /** Numeric keypad Enter key. */
206 AKEYCODE_NUMPAD_ENTER = 160, 440 AKEYCODE_NUMPAD_ENTER = 160,
441 /** Numeric keypad '=' key. */
207 AKEYCODE_NUMPAD_EQUALS = 161, 442 AKEYCODE_NUMPAD_EQUALS = 161,
443 /** Numeric keypad '(' key. */
208 AKEYCODE_NUMPAD_LEFT_PAREN = 162, 444 AKEYCODE_NUMPAD_LEFT_PAREN = 162,
445 /** Numeric keypad ')' key. */
209 AKEYCODE_NUMPAD_RIGHT_PAREN = 163, 446 AKEYCODE_NUMPAD_RIGHT_PAREN = 163,
447 /** Volume Mute key.
448 * Mutes the speaker, unlike {@link AKEYCODE_MUTE}.
449 * This key should normally be implemented as a toggle such that the first press
450 * mutes the speaker and the second press restores the original volume. */
210 AKEYCODE_VOLUME_MUTE = 164, 451 AKEYCODE_VOLUME_MUTE = 164,
452 /** Info key.
453 * Common on TV remotes to show additional information related to what is
454 * currently being viewed. */
211 AKEYCODE_INFO = 165, 455 AKEYCODE_INFO = 165,
456 /** Channel up key.
457 * On TV remotes, increments the television channel. */
212 AKEYCODE_CHANNEL_UP = 166, 458 AKEYCODE_CHANNEL_UP = 166,
459 /** Channel down key.
460 * On TV remotes, decrements the television channel. */
213 AKEYCODE_CHANNEL_DOWN = 167, 461 AKEYCODE_CHANNEL_DOWN = 167,
462 /** Zoom in key. */
214 AKEYCODE_ZOOM_IN = 168, 463 AKEYCODE_ZOOM_IN = 168,
464 /** Zoom out key. */
215 AKEYCODE_ZOOM_OUT = 169, 465 AKEYCODE_ZOOM_OUT = 169,
466 /** TV key.
467 * On TV remotes, switches to viewing live TV. */
216 AKEYCODE_TV = 170, 468 AKEYCODE_TV = 170,
469 /** Window key.
470 * On TV remotes, toggles picture-in-picture mode or other windowing functions. */
217 AKEYCODE_WINDOW = 171, 471 AKEYCODE_WINDOW = 171,
472 /** Guide key.
473 * On TV remotes, shows a programming guide. */
218 AKEYCODE_GUIDE = 172, 474 AKEYCODE_GUIDE = 172,
475 /** DVR key.
476 * On some TV remotes, switches to a DVR mode for recorded shows. */
219 AKEYCODE_DVR = 173, 477 AKEYCODE_DVR = 173,
478 /** Bookmark key.
479 * On some TV remotes, bookmarks content or web pages. */
220 AKEYCODE_BOOKMARK = 174, 480 AKEYCODE_BOOKMARK = 174,
481 /** Toggle captions key.
482 * Switches the mode for closed-captioning text, for example during television shows. */
221 AKEYCODE_CAPTIONS = 175, 483 AKEYCODE_CAPTIONS = 175,
484 /** Settings key.
485 * Starts the system settings activity. */
222 AKEYCODE_SETTINGS = 176, 486 AKEYCODE_SETTINGS = 176,
487 /** TV power key.
488 * On TV remotes, toggles the power on a television screen. */
223 AKEYCODE_TV_POWER = 177, 489 AKEYCODE_TV_POWER = 177,
490 /** TV input key.
491 * On TV remotes, switches the input on a television screen. */
224 AKEYCODE_TV_INPUT = 178, 492 AKEYCODE_TV_INPUT = 178,
493 /** Set-top-box power key.
494 * On TV remotes, toggles the power on an external Set-top-box. */
225 AKEYCODE_STB_POWER = 179, 495 AKEYCODE_STB_POWER = 179,
496 /** Set-top-box input key.
497 * On TV remotes, switches the input mode on an external Set-top-box. */
226 AKEYCODE_STB_INPUT = 180, 498 AKEYCODE_STB_INPUT = 180,
499 /** A/V Receiver power key.
500 * On TV remotes, toggles the power on an external A/V Receiver. */
227 AKEYCODE_AVR_POWER = 181, 501 AKEYCODE_AVR_POWER = 181,
502 /** A/V Receiver input key.
503 * On TV remotes, switches the input mode on an external A/V Receiver. */
228 AKEYCODE_AVR_INPUT = 182, 504 AKEYCODE_AVR_INPUT = 182,
505 /** Red "programmable" key.
506 * On TV remotes, acts as a contextual/programmable key. */
229 AKEYCODE_PROG_RED = 183, 507 AKEYCODE_PROG_RED = 183,
508 /** Green "programmable" key.
509 * On TV remotes, actsas a contextual/programmable key. */
230 AKEYCODE_PROG_GREEN = 184, 510 AKEYCODE_PROG_GREEN = 184,
511 /** Yellow "programmable" key.
512 * On TV remotes, acts as a contextual/programmable key. */
231 AKEYCODE_PROG_YELLOW = 185, 513 AKEYCODE_PROG_YELLOW = 185,
514 /** Blue "programmable" key.
515 * On TV remotes, acts as a contextual/programmable key. */
232 AKEYCODE_PROG_BLUE = 186, 516 AKEYCODE_PROG_BLUE = 186,
517 /** App switch key.
518 * Should bring up the application switcher dialog. */
233 AKEYCODE_APP_SWITCH = 187, 519 AKEYCODE_APP_SWITCH = 187,
520 /** Generic Game Pad Button #1.*/
234 AKEYCODE_BUTTON_1 = 188, 521 AKEYCODE_BUTTON_1 = 188,
522 /** Generic Game Pad Button #2.*/
235 AKEYCODE_BUTTON_2 = 189, 523 AKEYCODE_BUTTON_2 = 189,
524 /** Generic Game Pad Button #3.*/
236 AKEYCODE_BUTTON_3 = 190, 525 AKEYCODE_BUTTON_3 = 190,
526 /** Generic Game Pad Button #4.*/
237 AKEYCODE_BUTTON_4 = 191, 527 AKEYCODE_BUTTON_4 = 191,
528 /** Generic Game Pad Button #5.*/
238 AKEYCODE_BUTTON_5 = 192, 529 AKEYCODE_BUTTON_5 = 192,
530 /** Generic Game Pad Button #6.*/
239 AKEYCODE_BUTTON_6 = 193, 531 AKEYCODE_BUTTON_6 = 193,
532 /** Generic Game Pad Button #7.*/
240 AKEYCODE_BUTTON_7 = 194, 533 AKEYCODE_BUTTON_7 = 194,
534 /** Generic Game Pad Button #8.*/
241 AKEYCODE_BUTTON_8 = 195, 535 AKEYCODE_BUTTON_8 = 195,
536 /** Generic Game Pad Button #9.*/
242 AKEYCODE_BUTTON_9 = 196, 537 AKEYCODE_BUTTON_9 = 196,
538 /** Generic Game Pad Button #10.*/
243 AKEYCODE_BUTTON_10 = 197, 539 AKEYCODE_BUTTON_10 = 197,
540 /** Generic Game Pad Button #11.*/
244 AKEYCODE_BUTTON_11 = 198, 541 AKEYCODE_BUTTON_11 = 198,
542 /** Generic Game Pad Button #12.*/
245 AKEYCODE_BUTTON_12 = 199, 543 AKEYCODE_BUTTON_12 = 199,
544 /** Generic Game Pad Button #13.*/
246 AKEYCODE_BUTTON_13 = 200, 545 AKEYCODE_BUTTON_13 = 200,
546 /** Generic Game Pad Button #14.*/
247 AKEYCODE_BUTTON_14 = 201, 547 AKEYCODE_BUTTON_14 = 201,
548 /** Generic Game Pad Button #15.*/
248 AKEYCODE_BUTTON_15 = 202, 549 AKEYCODE_BUTTON_15 = 202,
550 /** Generic Game Pad Button #16.*/
249 AKEYCODE_BUTTON_16 = 203, 551 AKEYCODE_BUTTON_16 = 203,
552 /** Language Switch key.
553 * Toggles the current input language such as switching between English and Japanese on
554 * a QWERTY keyboard. On some devices, the same function may be performed by
555 * pressing Shift+Spacebar. */
250 AKEYCODE_LANGUAGE_SWITCH = 204, 556 AKEYCODE_LANGUAGE_SWITCH = 204,
557 /** Manner Mode key.
558 * Toggles silent or vibrate mode on and off to make the device behave more politely
559 * in certain settings such as on a crowded train. On some devices, the key may only
560 * operate when long-pressed. */
251 AKEYCODE_MANNER_MODE = 205, 561 AKEYCODE_MANNER_MODE = 205,
562 /** 3D Mode key.
563 * Toggles the display between 2D and 3D mode. */
252 AKEYCODE_3D_MODE = 206, 564 AKEYCODE_3D_MODE = 206,
565 /** Contacts special function key.
566 * Used to launch an address book application. */
253 AKEYCODE_CONTACTS = 207, 567 AKEYCODE_CONTACTS = 207,
568 /** Calendar special function key.
569 * Used to launch a calendar application. */
254 AKEYCODE_CALENDAR = 208, 570 AKEYCODE_CALENDAR = 208,
571 /** Music special function key.
572 * Used to launch a music player application. */
255 AKEYCODE_MUSIC = 209, 573 AKEYCODE_MUSIC = 209,
574 /** Calculator special function key.
575 * Used to launch a calculator application. */
256 AKEYCODE_CALCULATOR = 210, 576 AKEYCODE_CALCULATOR = 210,
577 /** Japanese full-width / half-width key. */
257 AKEYCODE_ZENKAKU_HANKAKU = 211, 578 AKEYCODE_ZENKAKU_HANKAKU = 211,
579 /** Japanese alphanumeric key. */
258 AKEYCODE_EISU = 212, 580 AKEYCODE_EISU = 212,
581 /** Japanese non-conversion key. */
259 AKEYCODE_MUHENKAN = 213, 582 AKEYCODE_MUHENKAN = 213,
583 /** Japanese conversion key. */
260 AKEYCODE_HENKAN = 214, 584 AKEYCODE_HENKAN = 214,
585 /** Japanese katakana / hiragana key. */
261 AKEYCODE_KATAKANA_HIRAGANA = 215, 586 AKEYCODE_KATAKANA_HIRAGANA = 215,
587 /** Japanese Yen key. */
262 AKEYCODE_YEN = 216, 588 AKEYCODE_YEN = 216,
589 /** Japanese Ro key. */
263 AKEYCODE_RO = 217, 590 AKEYCODE_RO = 217,
591 /** Japanese kana key. */
264 AKEYCODE_KANA = 218, 592 AKEYCODE_KANA = 218,
593 /** Assist key.
594 * Launches the global assist activity. Not delivered to applications. */
265 AKEYCODE_ASSIST = 219, 595 AKEYCODE_ASSIST = 219,
596 /** Brightness Down key.
597 * Adjusts the screen brightness down. */
266 AKEYCODE_BRIGHTNESS_DOWN = 220, 598 AKEYCODE_BRIGHTNESS_DOWN = 220,
599 /** Brightness Up key.
600 * Adjusts the screen brightness up. */
267 AKEYCODE_BRIGHTNESS_UP = 221, 601 AKEYCODE_BRIGHTNESS_UP = 221,
602 /** Audio Track key.
603 * Switches the audio tracks. */
268 AKEYCODE_MEDIA_AUDIO_TRACK = 222, 604 AKEYCODE_MEDIA_AUDIO_TRACK = 222,
605 /** Sleep key.
606 * Puts the device to sleep. Behaves somewhat like {@link AKEYCODE_POWER} but it
607 * has no effect if the device is already asleep. */
269 AKEYCODE_SLEEP = 223, 608 AKEYCODE_SLEEP = 223,
609 /** Wakeup key.
610 * Wakes up the device. Behaves somewhat like {@link AKEYCODE_POWER} but it
611 * has no effect if the device is already awake. */
270 AKEYCODE_WAKEUP = 224, 612 AKEYCODE_WAKEUP = 224,
613 /** Pairing key.
614 * Initiates peripheral pairing mode. Useful for pairing remote control
615 * devices or game controllers, especially if no other input mode is
616 * available. */
271 AKEYCODE_PAIRING = 225, 617 AKEYCODE_PAIRING = 225,
618 /** Media Top Menu key.
619 * Goes to the top of media menu. */
272 AKEYCODE_MEDIA_TOP_MENU = 226, 620 AKEYCODE_MEDIA_TOP_MENU = 226,
621 /** '11' key. */
273 AKEYCODE_11 = 227, 622 AKEYCODE_11 = 227,
623 /** '12' key. */
274 AKEYCODE_12 = 228, 624 AKEYCODE_12 = 228,
625 /** Last Channel key.
626 * Goes to the last viewed channel. */
275 AKEYCODE_LAST_CHANNEL = 229, 627 AKEYCODE_LAST_CHANNEL = 229,
628 /** TV data service key.
629 * Displays data services like weather, sports. */
276 AKEYCODE_TV_DATA_SERVICE = 230, 630 AKEYCODE_TV_DATA_SERVICE = 230,
631 /** Voice Assist key.
632 * Launches the global voice assist activity. Not delivered to applications. */
277 AKEYCODE_VOICE_ASSIST = 231, 633 AKEYCODE_VOICE_ASSIST = 231,
634 /** Radio key.
635 * Toggles TV service / Radio service. */
278 AKEYCODE_TV_RADIO_SERVICE = 232, 636 AKEYCODE_TV_RADIO_SERVICE = 232,
637 /** Teletext key.
638 * Displays Teletext service. */
279 AKEYCODE_TV_TELETEXT = 233, 639 AKEYCODE_TV_TELETEXT = 233,
640 /** Number entry key.
641 * Initiates to enter multi-digit channel nubmber when each digit key is assigned
642 * for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC
643 * User Control Code. */
280 AKEYCODE_TV_NUMBER_ENTRY = 234, 644 AKEYCODE_TV_NUMBER_ENTRY = 234,
645 /** Analog Terrestrial key.
646 * Switches to analog terrestrial broadcast service. */
281 AKEYCODE_TV_TERRESTRIAL_ANALOG = 235, 647 AKEYCODE_TV_TERRESTRIAL_ANALOG = 235,
648 /** Digital Terrestrial key.
649 * Switches to digital terrestrial broadcast service. */
282 AKEYCODE_TV_TERRESTRIAL_DIGITAL = 236, 650 AKEYCODE_TV_TERRESTRIAL_DIGITAL = 236,
651 /** Satellite key.
652 * Switches to digital satellite broadcast service. */
283 AKEYCODE_TV_SATELLITE = 237, 653 AKEYCODE_TV_SATELLITE = 237,
654 /** BS key.
655 * Switches to BS digital satellite broadcasting service available in Japan. */
284 AKEYCODE_TV_SATELLITE_BS = 238, 656 AKEYCODE_TV_SATELLITE_BS = 238,
657 /** CS key.
658 * Switches to CS digital satellite broadcasting service available in Japan. */
285 AKEYCODE_TV_SATELLITE_CS = 239, 659 AKEYCODE_TV_SATELLITE_CS = 239,
660 /** BS/CS key.
661 * Toggles between BS and CS digital satellite services. */
286 AKEYCODE_TV_SATELLITE_SERVICE = 240, 662 AKEYCODE_TV_SATELLITE_SERVICE = 240,
663 /** Toggle Network key.
664 * Toggles selecting broacast services. */
287 AKEYCODE_TV_NETWORK = 241, 665 AKEYCODE_TV_NETWORK = 241,
666 /** Antenna/Cable key.
667 * Toggles broadcast input source between antenna and cable. */
288 AKEYCODE_TV_ANTENNA_CABLE = 242, 668 AKEYCODE_TV_ANTENNA_CABLE = 242,
669 /** HDMI #1 key.
670 * Switches to HDMI input #1. */
289 AKEYCODE_TV_INPUT_HDMI_1 = 243, 671 AKEYCODE_TV_INPUT_HDMI_1 = 243,
672 /** HDMI #2 key.
673 * Switches to HDMI input #2. */
290 AKEYCODE_TV_INPUT_HDMI_2 = 244, 674 AKEYCODE_TV_INPUT_HDMI_2 = 244,
675 /** HDMI #3 key.
676 * Switches to HDMI input #3. */
291 AKEYCODE_TV_INPUT_HDMI_3 = 245, 677 AKEYCODE_TV_INPUT_HDMI_3 = 245,
678 /** HDMI #4 key.
679 * Switches to HDMI input #4. */
292 AKEYCODE_TV_INPUT_HDMI_4 = 246, 680 AKEYCODE_TV_INPUT_HDMI_4 = 246,
681 /** Composite #1 key.
682 * Switches to composite video input #1. */
293 AKEYCODE_TV_INPUT_COMPOSITE_1 = 247, 683 AKEYCODE_TV_INPUT_COMPOSITE_1 = 247,
684 /** Composite #2 key.
685 * Switches to composite video input #2. */
294 AKEYCODE_TV_INPUT_COMPOSITE_2 = 248, 686 AKEYCODE_TV_INPUT_COMPOSITE_2 = 248,
687 /** Component #1 key.
688 * Switches to component video input #1. */
295 AKEYCODE_TV_INPUT_COMPONENT_1 = 249, 689 AKEYCODE_TV_INPUT_COMPONENT_1 = 249,
690 /** Component #2 key.
691 * Switches to component video input #2. */
296 AKEYCODE_TV_INPUT_COMPONENT_2 = 250, 692 AKEYCODE_TV_INPUT_COMPONENT_2 = 250,
693 /** VGA #1 key.
694 * Switches to VGA (analog RGB) input #1. */
297 AKEYCODE_TV_INPUT_VGA_1 = 251, 695 AKEYCODE_TV_INPUT_VGA_1 = 251,
696 /** Audio description key.
697 * Toggles audio description off / on. */
298 AKEYCODE_TV_AUDIO_DESCRIPTION = 252, 698 AKEYCODE_TV_AUDIO_DESCRIPTION = 252,
699 /** Audio description mixing volume up key.
700 * Louden audio description volume as compared with normal audio volume. */
299 AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253, 701 AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253,
702 /** Audio description mixing volume down key.
703 * Lessen audio description volume as compared with normal audio volume. */
300 AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254, 704 AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254,
705 /** Zoom mode key.
706 * Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.) */
301 AKEYCODE_TV_ZOOM_MODE = 255, 707 AKEYCODE_TV_ZOOM_MODE = 255,
708 /** Contents menu key.
709 * Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control
710 * Code */
302 AKEYCODE_TV_CONTENTS_MENU = 256, 711 AKEYCODE_TV_CONTENTS_MENU = 256,
712 /** Media context menu key.
713 * Goes to the context menu of media contents. Corresponds to Media Context-sensitive
714 * Menu (0x11) of CEC User Control Code. */
303 AKEYCODE_TV_MEDIA_CONTEXT_MENU = 257, 715 AKEYCODE_TV_MEDIA_CONTEXT_MENU = 257,
716 /** Timer programming key.
717 * Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of
718 * CEC User Control Code. */
304 AKEYCODE_TV_TIMER_PROGRAMMING = 258, 719 AKEYCODE_TV_TIMER_PROGRAMMING = 258,
720 /** Help key. */
305 AKEYCODE_HELP = 259, 721 AKEYCODE_HELP = 259,
306 AKEYCODE_NAVIGATE_PREVIOUS = 260, 722 AKEYCODE_NAVIGATE_PREVIOUS = 260,
307 AKEYCODE_NAVIGATE_NEXT = 261, 723 AKEYCODE_NAVIGATE_NEXT = 261,
308 AKEYCODE_NAVIGATE_IN = 262, 724 AKEYCODE_NAVIGATE_IN = 262,
309 AKEYCODE_NAVIGATE_OUT = 263, 725 AKEYCODE_NAVIGATE_OUT = 263,
726 /** Primary stem key for Wear
727 * Main power/reset button on watch. */
728 AKEYCODE_STEM_PRIMARY = 264,
729 /** Generic stem key 1 for Wear */
730 AKEYCODE_STEM_1 = 265,
731 /** Generic stem key 2 for Wear */
732 AKEYCODE_STEM_2 = 266,
733 /** Generic stem key 3 for Wear */
734 AKEYCODE_STEM_3 = 267,
310 AKEYCODE_MEDIA_SKIP_FORWARD = 272, 735 AKEYCODE_MEDIA_SKIP_FORWARD = 272,
311 AKEYCODE_MEDIA_SKIP_BACKWARD = 273, 736 AKEYCODE_MEDIA_SKIP_BACKWARD = 273,
312 AKEYCODE_MEDIA_STEP_FORWARD = 274, 737 AKEYCODE_MEDIA_STEP_FORWARD = 274,
313 AKEYCODE_MEDIA_STEP_BACKWARD = 275 738 AKEYCODE_MEDIA_STEP_BACKWARD = 275,
739 /** Put device to sleep unless a wakelock is held. */
740 AKEYCODE_SOFT_SLEEP = 276
314 741
315 // NOTE: If you add a new keycode here you must also add it to several other files. 742 // NOTE: If you add a new keycode here you must also add it to several other files.
316 // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. 743 // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
@@ -321,3 +748,5 @@ enum {
321#endif 748#endif
322 749
323#endif // _ANDROID_KEYCODES_H 750#endif // _ANDROID_KEYCODES_H
751
752/** @} */
diff --git a/include/android/looper.h b/include/android/looper.h
index 74c0383be..718f70304 100644
--- a/include/android/looper.h
+++ b/include/android/looper.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Looper
19 * @{
20 */
21
22/**
23 * @file looper.h
24 */
17 25
18#ifndef ANDROID_LOOPER_H 26#ifndef ANDROID_LOOPER_H
19#define ANDROID_LOOPER_H 27#define ANDROID_LOOPER_H
@@ -22,6 +30,7 @@
22extern "C" { 30extern "C" {
23#endif 31#endif
24 32
33struct ALooper;
25/** 34/**
26 * ALooper 35 * ALooper
27 * 36 *
@@ -35,7 +44,6 @@ extern "C" {
35 * 44 *
36 * A thread can have only one ALooper associated with it. 45 * A thread can have only one ALooper associated with it.
37 */ 46 */
38struct ALooper;
39typedef struct ALooper ALooper; 47typedef struct ALooper ALooper;
40 48
41/** 49/**
@@ -44,13 +52,14 @@ typedef struct ALooper ALooper;
44 */ 52 */
45ALooper* ALooper_forThread(); 53ALooper* ALooper_forThread();
46 54
55/** Option for for ALooper_prepare(). */
47enum { 56enum {
48 /** 57 /**
49 * Option for ALooper_prepare: this looper will accept calls to 58 * This looper will accept calls to ALooper_addFd() that do not
50 * ALooper_addFd() that do not have a callback (that is provide NULL 59 * have a callback (that is provide NULL for the callback). In
51 * for the callback). In this case the caller of ALooper_pollOnce() 60 * this case the caller of ALooper_pollOnce() or ALooper_pollAll()
52 * or ALooper_pollAll() MUST check the return from these functions to 61 * MUST check the return from these functions to discover when
53 * discover when data is available on such fds and process it. 62 * data is available on such fds and process it.
54 */ 63 */
55 ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1<<0 64 ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1<<0
56}; 65};
@@ -64,9 +73,9 @@ enum {
64 */ 73 */
65ALooper* ALooper_prepare(int opts); 74ALooper* ALooper_prepare(int opts);
66 75
76/** Result from ALooper_pollOnce() and ALooper_pollAll(). */
67enum { 77enum {
68 /** 78 /**
69 * Result from ALooper_pollOnce() and ALooper_pollAll():
70 * The poll was awoken using wake() before the timeout expired 79 * The poll was awoken using wake() before the timeout expired
71 * and no callbacks were executed and no other file descriptors were ready. 80 * and no callbacks were executed and no other file descriptors were ready.
72 */ 81 */
@@ -176,10 +185,12 @@ typedef int (*ALooper_callbackFunc)(int fd, int events, void* data);
176 * 185 *
177 * Returns ALOOPER_POLL_ERROR if an error occurred. 186 * Returns ALOOPER_POLL_ERROR if an error occurred.
178 * 187 *
179 * Returns a value >= 0 containing an identifier if its file descriptor has data 188 * Returns a value >= 0 containing an identifier (the same identifier
180 * and it has no callback function (requiring the caller here to handle it). 189 * `ident` passed to ALooper_addFd()) if its file descriptor has data
181 * In this (and only this) case outFd, outEvents and outData will contain the poll 190 * and it has no callback function (requiring the caller here to
182 * events and data associated with the fd, otherwise they will be set to NULL. 191 * handle it). In this (and only this) case outFd, outEvents and
192 * outData will contain the poll events and data associated with the
193 * fd, otherwise they will be set to NULL.
183 * 194 *
184 * This method does not return until it has finished invoking the appropriate callbacks 195 * This method does not return until it has finished invoking the appropriate callbacks
185 * for all file descriptors that were signalled. 196 * for all file descriptors that were signalled.
@@ -254,3 +265,5 @@ int ALooper_removeFd(ALooper* looper, int fd);
254#endif 265#endif
255 266
256#endif // ANDROID_LOOPER_H 267#endif // ANDROID_LOOPER_H
268
269/** @} */
diff --git a/include/android/native_activity.h b/include/android/native_activity.h
index bc70f8816..d3d99cf7a 100644
--- a/include/android/native_activity.h
+++ b/include/android/native_activity.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup NativeActivity Native Activity
19 * @{
20 */
21
22/**
23 * @file native_activity.h
24 */
17 25
18#ifndef ANDROID_NATIVE_ACTIVITY_H 26#ifndef ANDROID_NATIVE_ACTIVITY_H
19#define ANDROID_NATIVE_ACTIVITY_H 27#define ANDROID_NATIVE_ACTIVITY_H
@@ -31,6 +39,9 @@
31extern "C" { 39extern "C" {
32#endif 40#endif
33 41
42/**
43 * {@link ANativeActivityCallbacks}
44 */
34struct ANativeActivityCallbacks; 45struct ANativeActivityCallbacks;
35 46
36/** 47/**
@@ -75,17 +86,17 @@ typedef struct ANativeActivity {
75 * Path to this application's internal data directory. 86 * Path to this application's internal data directory.
76 */ 87 */
77 const char* internalDataPath; 88 const char* internalDataPath;
78 89
79 /** 90 /**
80 * Path to this application's external (removable/mountable) data directory. 91 * Path to this application's external (removable/mountable) data directory.
81 */ 92 */
82 const char* externalDataPath; 93 const char* externalDataPath;
83 94
84 /** 95 /**
85 * The platform's SDK version code. 96 * The platform's SDK version code.
86 */ 97 */
87 int32_t sdkVersion; 98 int32_t sdkVersion;
88 99
89 /** 100 /**
90 * This is the native instance of the application. It is not used by 101 * This is the native instance of the application. It is not used by
91 * the framework, but can be set by the application to its own instance 102 * the framework, but can be set by the application to its own instance
@@ -119,13 +130,13 @@ typedef struct ANativeActivityCallbacks {
119 * for more information. 130 * for more information.
120 */ 131 */
121 void (*onStart)(ANativeActivity* activity); 132 void (*onStart)(ANativeActivity* activity);
122 133
123 /** 134 /**
124 * NativeActivity has resumed. See Java documentation for Activity.onResume() 135 * NativeActivity has resumed. See Java documentation for Activity.onResume()
125 * for more information. 136 * for more information.
126 */ 137 */
127 void (*onResume)(ANativeActivity* activity); 138 void (*onResume)(ANativeActivity* activity);
128 139
129 /** 140 /**
130 * Framework is asking NativeActivity to save its current instance state. 141 * Framework is asking NativeActivity to save its current instance state.
131 * See Java documentation for Activity.onSaveInstanceState() for more 142 * See Java documentation for Activity.onSaveInstanceState() for more
@@ -136,19 +147,19 @@ typedef struct ANativeActivityCallbacks {
136 * entities (pointers to memory, file descriptors, etc). 147 * entities (pointers to memory, file descriptors, etc).
137 */ 148 */
138 void* (*onSaveInstanceState)(ANativeActivity* activity, size_t* outSize); 149 void* (*onSaveInstanceState)(ANativeActivity* activity, size_t* outSize);
139 150
140 /** 151 /**
141 * NativeActivity has paused. See Java documentation for Activity.onPause() 152 * NativeActivity has paused. See Java documentation for Activity.onPause()
142 * for more information. 153 * for more information.
143 */ 154 */
144 void (*onPause)(ANativeActivity* activity); 155 void (*onPause)(ANativeActivity* activity);
145 156
146 /** 157 /**
147 * NativeActivity has stopped. See Java documentation for Activity.onStop() 158 * NativeActivity has stopped. See Java documentation for Activity.onStop()
148 * for more information. 159 * for more information.
149 */ 160 */
150 void (*onStop)(ANativeActivity* activity); 161 void (*onStop)(ANativeActivity* activity);
151 162
152 /** 163 /**
153 * NativeActivity is being destroyed. See Java documentation for Activity.onDestroy() 164 * NativeActivity is being destroyed. See Java documentation for Activity.onDestroy()
154 * for more information. 165 * for more information.
@@ -160,7 +171,7 @@ typedef struct ANativeActivityCallbacks {
160 * for example, to pause a game when it loses input focus. 171 * for example, to pause a game when it loses input focus.
161 */ 172 */
162 void (*onWindowFocusChanged)(ANativeActivity* activity, int hasFocus); 173 void (*onWindowFocusChanged)(ANativeActivity* activity, int hasFocus);
163 174
164 /** 175 /**
165 * The drawing window for this native activity has been created. You 176 * The drawing window for this native activity has been created. You
166 * can use the given native window object to start drawing. 177 * can use the given native window object to start drawing.
@@ -191,13 +202,13 @@ typedef struct ANativeActivityCallbacks {
191 * returning from here. 202 * returning from here.
192 */ 203 */
193 void (*onNativeWindowDestroyed)(ANativeActivity* activity, ANativeWindow* window); 204 void (*onNativeWindowDestroyed)(ANativeActivity* activity, ANativeWindow* window);
194 205
195 /** 206 /**
196 * The input queue for this native activity's window has been created. 207 * The input queue for this native activity's window has been created.
197 * You can use the given input queue to start retrieving input events. 208 * You can use the given input queue to start retrieving input events.
198 */ 209 */
199 void (*onInputQueueCreated)(ANativeActivity* activity, AInputQueue* queue); 210 void (*onInputQueueCreated)(ANativeActivity* activity, AInputQueue* queue);
200 211
201 /** 212 /**
202 * The input queue for this native activity's window is being destroyed. 213 * The input queue for this native activity's window is being destroyed.
203 * You should no longer try to reference this object upon returning from this 214 * You should no longer try to reference this object upon returning from this
@@ -273,7 +284,17 @@ void ANativeActivity_setWindowFlags(ANativeActivity* activity,
273 * API for documentation. 284 * API for documentation.
274 */ 285 */
275enum { 286enum {
287 /**
288 * Implicit request to show the input window, not as the result
289 * of a direct request by the user.
290 */
276 ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = 0x0001, 291 ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = 0x0001,
292
293 /**
294 * The user has forced the input method open (such as by
295 * long-pressing menu) so it should not be closed until they
296 * explicitly do so.
297 */
277 ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002, 298 ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002,
278}; 299};
279 300
@@ -290,7 +311,15 @@ void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);
290 * API for documentation. 311 * API for documentation.
291 */ 312 */
292enum { 313enum {
314 /**
315 * The soft input window should only be hidden if it was not
316 * explicitly shown by the user.
317 */
293 ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 0x0001, 318 ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 0x0001,
319 /**
320 * The soft input window should normally be hidden, unless it was
321 * originally shown with {@link ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED}.
322 */
294 ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002, 323 ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
295}; 324};
296 325
@@ -308,3 +337,4 @@ void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
308 337
309#endif // ANDROID_NATIVE_ACTIVITY_H 338#endif // ANDROID_NATIVE_ACTIVITY_H
310 339
340/** @} */
diff --git a/include/android/native_window.h b/include/android/native_window.h
index 2f4f2d33b..cf07f1afa 100644
--- a/include/android/native_window.h
+++ b/include/android/native_window.h
@@ -14,6 +14,15 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup NativeActivity Native Activity
19 * @{
20 */
21
22/**
23 * @file native_window.h
24 */
25
17#ifndef ANDROID_NATIVE_WINDOW_H 26#ifndef ANDROID_NATIVE_WINDOW_H
18#define ANDROID_NATIVE_WINDOW_H 27#define ANDROID_NATIVE_WINDOW_H
19 28
@@ -23,18 +32,31 @@
23extern "C" { 32extern "C" {
24#endif 33#endif
25 34
26/* 35/**
27 * Pixel formats that a window can use. 36 * Pixel formats that a window can use.
28 */ 37 */
29enum { 38enum {
39 /** Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. **/
30 WINDOW_FORMAT_RGBA_8888 = 1, 40 WINDOW_FORMAT_RGBA_8888 = 1,
41 /** Red: 8 bits, Green: 8 bits, Blue: 8 bits, Unused: 8 bits. **/
31 WINDOW_FORMAT_RGBX_8888 = 2, 42 WINDOW_FORMAT_RGBX_8888 = 2,
43 /** Red: 5 bits, Green: 6 bits, Blue: 5 bits. **/
32 WINDOW_FORMAT_RGB_565 = 4, 44 WINDOW_FORMAT_RGB_565 = 4,
33}; 45};
34 46
35struct ANativeWindow; 47struct ANativeWindow;
48/**
49 * {@link ANativeWindow} is opaque type that provides access to a native window.
50 *
51 * A pointer can be obtained using ANativeWindow_fromSurface().
52 */
36typedef struct ANativeWindow ANativeWindow; 53typedef struct ANativeWindow ANativeWindow;
37 54
55/**
56 * {@link ANativeWindow} is a struct that represents a windows buffer.
57 *
58 * A pointer can be obtained using ANativeWindow_lock().
59 */
38typedef struct ANativeWindow_Buffer { 60typedef struct ANativeWindow_Buffer {
39 // The number of pixels that are show horizontally. 61 // The number of pixels that are show horizontally.
40 int32_t width; 62 int32_t width;
@@ -51,7 +73,7 @@ typedef struct ANativeWindow_Buffer {
51 73
52 // The actual bits. 74 // The actual bits.
53 void* bits; 75 void* bits;
54 76
55 // Do not touch. 77 // Do not touch.
56 uint32_t reserved[6]; 78 uint32_t reserved[6];
57} ANativeWindow_Buffer; 79} ANativeWindow_Buffer;
@@ -67,25 +89,25 @@ void ANativeWindow_acquire(ANativeWindow* window);
67 */ 89 */
68void ANativeWindow_release(ANativeWindow* window); 90void ANativeWindow_release(ANativeWindow* window);
69 91
70/* 92/**
71 * Return the current width in pixels of the window surface. Returns a 93 * Return the current width in pixels of the window surface. Returns a
72 * negative value on error. 94 * negative value on error.
73 */ 95 */
74int32_t ANativeWindow_getWidth(ANativeWindow* window); 96int32_t ANativeWindow_getWidth(ANativeWindow* window);
75 97
76/* 98/**
77 * Return the current height in pixels of the window surface. Returns a 99 * Return the current height in pixels of the window surface. Returns a
78 * negative value on error. 100 * negative value on error.
79 */ 101 */
80int32_t ANativeWindow_getHeight(ANativeWindow* window); 102int32_t ANativeWindow_getHeight(ANativeWindow* window);
81 103
82/* 104/**
83 * Return the current pixel format of the window surface. Returns a 105 * Return the current pixel format of the window surface. Returns a
84 * negative value on error. 106 * negative value on error.
85 */ 107 */
86int32_t ANativeWindow_getFormat(ANativeWindow* window); 108int32_t ANativeWindow_getFormat(ANativeWindow* window);
87 109
88/* 110/**
89 * Change the format and size of the window buffers. 111 * Change the format and size of the window buffers.
90 * 112 *
91 * The width and height control the number of pixels in the buffers, not the 113 * The width and height control the number of pixels in the buffers, not the
@@ -124,3 +146,5 @@ int32_t ANativeWindow_unlockAndPost(ANativeWindow* window);
124#endif 146#endif
125 147
126#endif // ANDROID_NATIVE_WINDOW_H 148#endif // ANDROID_NATIVE_WINDOW_H
149
150/** @} */
diff --git a/include/android/native_window_jni.h b/include/android/native_window_jni.h
index b9e72efb7..60a36c3f2 100644
--- a/include/android/native_window_jni.h
+++ b/include/android/native_window_jni.h
@@ -14,6 +14,15 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup NativeActivity Native Activity
19 * @{
20 */
21
22/**
23 * @file native_window_jni.h
24 */
25
17#ifndef ANDROID_NATIVE_WINDOW_JNI_H 26#ifndef ANDROID_NATIVE_WINDOW_JNI_H
18#define ANDROID_NATIVE_WINDOW_JNI_H 27#define ANDROID_NATIVE_WINDOW_JNI_H
19 28
@@ -38,3 +47,5 @@ ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
38#endif 47#endif
39 48
40#endif // ANDROID_NATIVE_WINDOW_H 49#endif // ANDROID_NATIVE_WINDOW_H
50
51/** @} */
diff --git a/include/android/obb.h b/include/android/obb.h
index 65e9b2aa1..4c6d9d7ba 100644
--- a/include/android/obb.h
+++ b/include/android/obb.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Storage
19 * @{
20 */
21
22/**
23 * @file obb.h
24 */
17 25
18#ifndef ANDROID_OBB_H 26#ifndef ANDROID_OBB_H
19#define ANDROID_OBB_H 27#define ANDROID_OBB_H
@@ -25,9 +33,12 @@ extern "C" {
25#endif 33#endif
26 34
27struct AObbInfo; 35struct AObbInfo;
36/** {@link AObbInfo} is an opaque type representing information for obb storage. */
28typedef struct AObbInfo AObbInfo; 37typedef struct AObbInfo AObbInfo;
29 38
39/** Flag for an obb file, returned by AObbInfo_getFlags(). */
30enum { 40enum {
41 /** overlay */
31 AOBBINFO_OVERLAY = 0x0001, 42 AOBBINFO_OVERLAY = 0x0001,
32}; 43};
33 44
@@ -61,3 +72,5 @@ int32_t AObbInfo_getFlags(AObbInfo* obbInfo);
61#endif 72#endif
62 73
63#endif // ANDROID_OBB_H 74#endif // ANDROID_OBB_H
75
76/** @} */
diff --git a/include/android/rect.h b/include/android/rect.h
index bcd42a99e..80741c044 100644
--- a/include/android/rect.h
+++ b/include/android/rect.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup NativeActivity Native Activity
19 * @{
20 */
21
22/**
23 * @file rect.h
24 */
17 25
18#ifndef ANDROID_RECT_H 26#ifndef ANDROID_RECT_H
19#define ANDROID_RECT_H 27#define ANDROID_RECT_H
@@ -24,13 +32,24 @@
24extern "C" { 32extern "C" {
25#endif 33#endif
26 34
35/**
36 * {@link ARect} is a struct that represents a rectangular window area.
37 *
38 * It is used with {@link
39 * ANativeActivityCallbacks::onContentRectChanged} event callback and
40 * ANativeWindow_lock() function.
41 */
27typedef struct ARect { 42typedef struct ARect {
28#ifdef __cplusplus 43#ifdef __cplusplus
29 typedef int32_t value_type; 44 typedef int32_t value_type;
30#endif 45#endif
46 /** left position */
31 int32_t left; 47 int32_t left;
48 /** top position */
32 int32_t top; 49 int32_t top;
50 /** left position */
33 int32_t right; 51 int32_t right;
52 /** bottom position */
34 int32_t bottom; 53 int32_t bottom;
35} ARect; 54} ARect;
36 55
@@ -39,3 +58,5 @@ typedef struct ARect {
39#endif 58#endif
40 59
41#endif // ANDROID_RECT_H 60#endif // ANDROID_RECT_H
61
62/** @} */
diff --git a/include/android/sensor.h b/include/android/sensor.h
index 3816957bb..9472ad6ee 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Sensor
19 * @{
20 */
21
22/**
23 * @file sensor.h
24 */
17 25
18#ifndef ANDROID_SENSOR_H 26#ifndef ANDROID_SENSOR_H
19#define ANDROID_SENSOR_H 27#define ANDROID_SENSOR_H
@@ -34,7 +42,7 @@
34 * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES 42 * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
35 */ 43 */
36 44
37/* 45/**
38 * Structures and functions to receive and process sensor events in 46 * Structures and functions to receive and process sensor events in
39 * native code. 47 * native code.
40 * 48 *
@@ -53,14 +61,13 @@ extern "C" {
53 * Sensor types. 61 * Sensor types.
54 * (keep in sync with hardware/sensors.h) 62 * (keep in sync with hardware/sensors.h)
55 */ 63 */
56
57enum { 64enum {
58 /** 65 /**
59 * {@link ASENSOR_TYPE_ACCELEROMETER} 66 * {@link ASENSOR_TYPE_ACCELEROMETER}
60 * reporting-mode: continuous 67 * reporting-mode: continuous
61 * 68 *
62 * All values are in SI units (m/s^2) and measure the acceleration of the 69 * All values are in SI units (m/s^2) and measure the acceleration of the
63 * device including the force of gravity. 70 * device minus the force of gravity.
64 */ 71 */
65 ASENSOR_TYPE_ACCELEROMETER = 1, 72 ASENSOR_TYPE_ACCELEROMETER = 1,
66 /** 73 /**
@@ -107,24 +114,33 @@ enum {
107 ASENSOR_TYPE_LINEAR_ACCELERATION = 10 114 ASENSOR_TYPE_LINEAR_ACCELERATION = 10
108}; 115};
109 116
110/* 117/**
111 * Sensor accuracy measure 118 * Sensor accuracy measure.
112 */ 119 */
113enum { 120enum {
121 /** no contact */
114 ASENSOR_STATUS_NO_CONTACT = -1, 122 ASENSOR_STATUS_NO_CONTACT = -1,
123 /** unreliable */
115 ASENSOR_STATUS_UNRELIABLE = 0, 124 ASENSOR_STATUS_UNRELIABLE = 0,
125 /** low accuracy */
116 ASENSOR_STATUS_ACCURACY_LOW = 1, 126 ASENSOR_STATUS_ACCURACY_LOW = 1,
127 /** medium accuracy */
117 ASENSOR_STATUS_ACCURACY_MEDIUM = 2, 128 ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
129 /** high accuracy */
118 ASENSOR_STATUS_ACCURACY_HIGH = 3 130 ASENSOR_STATUS_ACCURACY_HIGH = 3
119}; 131};
120 132
121/* 133/**
122 * Sensor Reporting Modes. 134 * Sensor Reporting Modes.
123 */ 135 */
124enum { 136enum {
137 /** continuous reporting */
125 AREPORTING_MODE_CONTINUOUS = 0, 138 AREPORTING_MODE_CONTINUOUS = 0,
139 /** reporting on change */
126 AREPORTING_MODE_ON_CHANGE = 1, 140 AREPORTING_MODE_ON_CHANGE = 1,
141 /** on shot reporting */
127 AREPORTING_MODE_ONE_SHOT = 2, 142 AREPORTING_MODE_ONE_SHOT = 2,
143 /** special trigger reporting */
128 AREPORTING_MODE_SPECIAL_TRIGGER = 3 144 AREPORTING_MODE_SPECIAL_TRIGGER = 3
129}; 145};
130 146
@@ -132,14 +148,14 @@ enum {
132 * A few useful constants 148 * A few useful constants
133 */ 149 */
134 150
135/* Earth's gravity in m/s^2 */ 151/** Earth's gravity in m/s^2 */
136#define ASENSOR_STANDARD_GRAVITY (9.80665f) 152#define ASENSOR_STANDARD_GRAVITY (9.80665f)
137/* Maximum magnetic field on Earth's surface in uT */ 153/** Maximum magnetic field on Earth's surface in uT */
138#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX (60.0f) 154#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX (60.0f)
139/* Minimum magnetic field on Earth's surface in uT*/ 155/** Minimum magnetic field on Earth's surface in uT*/
140#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN (30.0f) 156#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN (30.0f)
141 157
142/* 158/**
143 * A sensor event. 159 * A sensor event.
144 */ 160 */
145 161
@@ -225,19 +241,82 @@ typedef struct ASensorEvent {
225} ASensorEvent; 241} ASensorEvent;
226 242
227struct ASensorManager; 243struct ASensorManager;
244/**
245 * {@link ASensorManager} is an opaque type to manage sensors and
246 * events queues.
247 *
248 * {@link ASensorManager} is a singleton that can be obtained using
249 * ASensorManager_getInstance().
250 *
251 * This file provides a set of functions that uses {@link
252 * ASensorManager} to access and list hardware sensors, and
253 * create and destroy event queues:
254 * - ASensorManager_getSensorList()
255 * - ASensorManager_getDefaultSensor()
256 * - ASensorManager_getDefaultSensorEx()
257 * - ASensorManager_createEventQueue()
258 * - ASensorManager_destroyEventQueue()
259 */
228typedef struct ASensorManager ASensorManager; 260typedef struct ASensorManager ASensorManager;
229 261
262
230struct ASensorEventQueue; 263struct ASensorEventQueue;
264/**
265 * {@link ASensorEventQueue} is an opaque type that provides access to
266 * {@link ASensorEvent} from hardware sensors.
267 *
268 * A new {@link ASensorEventQueue} can be obtained using ASensorManager_createEventQueue().
269 *
270 * This file provides a set of functions to enable and disable
271 * sensors, check and get events, and set event rates on a {@link
272 * ASensorEventQueue}.
273 * - ASensorEventQueue_enableSensor()
274 * - ASensorEventQueue_disableSensor()
275 * - ASensorEventQueue_hasEvents()
276 * - ASensorEventQueue_getEvents()
277 * - ASensorEventQueue_setEventRate()
278 */
231typedef struct ASensorEventQueue ASensorEventQueue; 279typedef struct ASensorEventQueue ASensorEventQueue;
232 280
233struct ASensor; 281struct ASensor;
282/**
283 * {@link ASensor} is an opaque type that provides information about
284 * an hardware sensors.
285 *
286 * A {@link ASensor} pointer can be obtained using
287 * ASensorManager_getDefaultSensor(),
288 * ASensorManager_getDefaultSensorEx() or from a {@link ASensorList}.
289 *
290 * This file provides a set of functions to access properties of a
291 * {@link ASensor}:
292 * - ASensor_getName()
293 * - ASensor_getVendor()
294 * - ASensor_getType()
295 * - ASensor_getResolution()
296 * - ASensor_getMinDelay()
297 * - ASensor_getFifoMaxEventCount()
298 * - ASensor_getFifoReservedEventCount()
299 * - ASensor_getStringType()
300 * - ASensor_getReportingMode()
301 * - ASensor_isWakeUpSensor()
302 */
234typedef struct ASensor ASensor; 303typedef struct ASensor ASensor;
304/**
305 * {@link ASensorRef} is a type for constant pointers to {@link ASensor}.
306 *
307 * This is used to define entry in {@link ASensorList} arrays.
308 */
235typedef ASensor const* ASensorRef; 309typedef ASensor const* ASensorRef;
310/**
311 * {@link ASensorList} is an array of reference to {@link ASensor}.
312 *
313 * A {@link ASensorList} can be initialized using ASensorManager_getSensorList().
314 */
236typedef ASensorRef const* ASensorList; 315typedef ASensorRef const* ASensorList;
237 316
238/*****************************************************************************/ 317/*****************************************************************************/
239 318
240/* 319/**
241 * Get a reference to the sensor manager. ASensorManager is a singleton 320 * Get a reference to the sensor manager. ASensorManager is a singleton
242 * per package as different packages may have access to different sensors. 321 * per package as different packages may have access to different sensors.
243 * 322 *
@@ -261,31 +340,35 @@ __attribute__ ((deprecated)) ASensorManager* ASensorManager_getInstance();
261 */ 340 */
262ASensorManager* ASensorManager_getInstanceForPackage(const char* packageName); 341ASensorManager* ASensorManager_getInstanceForPackage(const char* packageName);
263 342
264/* 343/**
265 * Returns the list of available sensors. 344 * Returns the list of available sensors.
266 */ 345 */
267int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list); 346int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
268 347
269/* 348/**
270 * Returns the default sensor for the given type, or NULL if no sensor 349 * Returns the default sensor for the given type, or NULL if no sensor
271 * of that type exists. 350 * of that type exists.
272 */ 351 */
273ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type); 352ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
274 353
275/* 354/**
276 * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor 355 * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor
277 * of this type and wakeUp properties exists. 356 * of this type and wakeUp properties exists.
278 */ 357 */
279ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type, 358ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type,
280 bool wakeUp); 359 bool wakeUp);
281 360
282/* 361/**
283 * Creates a new sensor event queue and associate it with a looper. 362 * Creates a new sensor event queue and associate it with a looper.
363 *
364 * "ident" is a identifier for the events that will be returned when
365 * calling ALooper_pollOnce(). The identifier must be >= 0, or
366 * ALOOPER_POLL_CALLBACK if providing a non-NULL callback.
284 */ 367 */
285ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager, 368ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
286 ALooper* looper, int ident, ALooper_callbackFunc callback, void* data); 369 ALooper* looper, int ident, ALooper_callbackFunc callback, void* data);
287 370
288/* 371/**
289 * Destroys the event queue and free all resources associated to it. 372 * Destroys the event queue and free all resources associated to it.
290 */ 373 */
291int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue); 374int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue);
@@ -293,17 +376,17 @@ int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue*
293 376
294/*****************************************************************************/ 377/*****************************************************************************/
295 378
296/* 379/**
297 * Enable the selected sensor. Returns a negative error code on failure. 380 * Enable the selected sensor. Returns a negative error code on failure.
298 */ 381 */
299int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor); 382int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor);
300 383
301/* 384/**
302 * Disable the selected sensor. Returns a negative error code on failure. 385 * Disable the selected sensor. Returns a negative error code on failure.
303 */ 386 */
304int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor); 387int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor);
305 388
306/* 389/**
307 * Sets the delivery rate of events in microseconds for the given sensor. 390 * Sets the delivery rate of events in microseconds for the given sensor.
308 * Note that this is a hint only, generally event will arrive at a higher 391 * Note that this is a hint only, generally event will arrive at a higher
309 * rate. It is an error to set a rate inferior to the value returned by 392 * rate. It is an error to set a rate inferior to the value returned by
@@ -312,14 +395,14 @@ int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sen
312 */ 395 */
313int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec); 396int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec);
314 397
315/* 398/**
316 * Returns true if there are one or more events available in the 399 * Returns true if there are one or more events available in the
317 * sensor queue. Returns 1 if the queue has events; 0 if 400 * sensor queue. Returns 1 if the queue has events; 0 if
318 * it does not have events; and a negative value if there is an error. 401 * it does not have events; and a negative value if there is an error.
319 */ 402 */
320int ASensorEventQueue_hasEvents(ASensorEventQueue* queue); 403int ASensorEventQueue_hasEvents(ASensorEventQueue* queue);
321 404
322/* 405/**
323 * Returns the next available events from the queue. Returns a negative 406 * Returns the next available events from the queue. Returns a negative
324 * value if no events are available or an error has occurred, otherwise 407 * value if no events are available or an error has occurred, otherwise
325 * the number of events returned. 408 * the number of events returned.
@@ -338,55 +421,55 @@ ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue,
338 421
339/*****************************************************************************/ 422/*****************************************************************************/
340 423
341/* 424/**
342 * Returns this sensor's name (non localized) 425 * Returns this sensor's name (non localized)
343 */ 426 */
344const char* ASensor_getName(ASensor const* sensor); 427const char* ASensor_getName(ASensor const* sensor);
345 428
346/* 429/**
347 * Returns this sensor's vendor's name (non localized) 430 * Returns this sensor's vendor's name (non localized)
348 */ 431 */
349const char* ASensor_getVendor(ASensor const* sensor); 432const char* ASensor_getVendor(ASensor const* sensor);
350 433
351/* 434/**
352 * Return this sensor's type 435 * Return this sensor's type
353 */ 436 */
354int ASensor_getType(ASensor const* sensor); 437int ASensor_getType(ASensor const* sensor);
355 438
356/* 439/**
357 * Returns this sensors's resolution 440 * Returns this sensors's resolution
358 */ 441 */
359float ASensor_getResolution(ASensor const* sensor); 442float ASensor_getResolution(ASensor const* sensor);
360 443
361/* 444/**
362 * Returns the minimum delay allowed between events in microseconds. 445 * Returns the minimum delay allowed between events in microseconds.
363 * A value of zero means that this sensor doesn't report events at a 446 * A value of zero means that this sensor doesn't report events at a
364 * constant rate, but rather only when a new data is available. 447 * constant rate, but rather only when a new data is available.
365 */ 448 */
366int ASensor_getMinDelay(ASensor const* sensor); 449int ASensor_getMinDelay(ASensor const* sensor);
367 450
368/* 451/**
369 * Returns the maximum size of batches for this sensor. Batches will often be 452 * Returns the maximum size of batches for this sensor. Batches will often be
370 * smaller, as the hardware fifo might be used for other sensors. 453 * smaller, as the hardware fifo might be used for other sensors.
371 */ 454 */
372int ASensor_getFifoMaxEventCount(ASensor const* sensor); 455int ASensor_getFifoMaxEventCount(ASensor const* sensor);
373 456
374/* 457/**
375 * Returns the hardware batch fifo size reserved to this sensor. 458 * Returns the hardware batch fifo size reserved to this sensor.
376 */ 459 */
377int ASensor_getFifoReservedEventCount(ASensor const* sensor); 460int ASensor_getFifoReservedEventCount(ASensor const* sensor);
378 461
379/* 462/**
380 * Returns this sensor's string type. 463 * Returns this sensor's string type.
381 */ 464 */
382const char* ASensor_getStringType(ASensor const* sensor); 465const char* ASensor_getStringType(ASensor const* sensor);
383 466
384/* 467/**
385 * Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants. 468 * Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants.
386 */ 469 */
387int ASensor_getReportingMode(ASensor const* sensor); 470int ASensor_getReportingMode(ASensor const* sensor);
388 471
389/* 472/**
390 * Returns true if this is a wake up sensor, false otherwise. 473 * Returns true if this is a wake up sensor, false otherwise.
391 */ 474 */
392bool ASensor_isWakeUpSensor(ASensor const* sensor); 475bool ASensor_isWakeUpSensor(ASensor const* sensor);
@@ -396,3 +479,5 @@ bool ASensor_isWakeUpSensor(ASensor const* sensor);
396#endif 479#endif
397 480
398#endif // ANDROID_SENSOR_H 481#endif // ANDROID_SENSOR_H
482
483/** @} */
diff --git a/include/android/storage_manager.h b/include/android/storage_manager.h
index bad249133..7f2ee08d6 100644
--- a/include/android/storage_manager.h
+++ b/include/android/storage_manager.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup Storage
19 * @{
20 */
21
22/**
23 * @file storage_manager.h
24 */
17 25
18#ifndef ANDROID_STORAGE_MANAGER_H 26#ifndef ANDROID_STORAGE_MANAGER_H
19#define ANDROID_STORAGE_MANAGER_H 27#define ANDROID_STORAGE_MANAGER_H
@@ -25,55 +33,62 @@ extern "C" {
25#endif 33#endif
26 34
27struct AStorageManager; 35struct AStorageManager;
36/**
37 * {@link AStorageManager} manages application OBB storage, a pointer
38 * can be obtained with AStorageManager_new().
39 */
28typedef struct AStorageManager AStorageManager; 40typedef struct AStorageManager AStorageManager;
29 41
42/**
43 * The different states of a OBB storage passed to AStorageManager_obbCallbackFunc().
44 */
30enum { 45enum {
31 /* 46 /**
32 * The OBB container is now mounted and ready for use. Can be returned 47 * The OBB container is now mounted and ready for use. Can be returned
33 * as the status for callbacks made during asynchronous OBB actions. 48 * as the status for callbacks made during asynchronous OBB actions.
34 */ 49 */
35 AOBB_STATE_MOUNTED = 1, 50 AOBB_STATE_MOUNTED = 1,
36 51
37 /* 52 /**
38 * The OBB container is now unmounted and not usable. Can be returned 53 * The OBB container is now unmounted and not usable. Can be returned
39 * as the status for callbacks made during asynchronous OBB actions. 54 * as the status for callbacks made during asynchronous OBB actions.
40 */ 55 */
41 AOBB_STATE_UNMOUNTED = 2, 56 AOBB_STATE_UNMOUNTED = 2,
42 57
43 /* 58 /**
44 * There was an internal system error encountered while trying to 59 * There was an internal system error encountered while trying to
45 * mount the OBB. Can be returned as the status for callbacks made 60 * mount the OBB. Can be returned as the status for callbacks made
46 * during asynchronous OBB actions. 61 * during asynchronous OBB actions.
47 */ 62 */
48 AOBB_STATE_ERROR_INTERNAL = 20, 63 AOBB_STATE_ERROR_INTERNAL = 20,
49 64
50 /* 65 /**
51 * The OBB could not be mounted by the system. Can be returned as the 66 * The OBB could not be mounted by the system. Can be returned as the
52 * status for callbacks made during asynchronous OBB actions. 67 * status for callbacks made during asynchronous OBB actions.
53 */ 68 */
54 AOBB_STATE_ERROR_COULD_NOT_MOUNT = 21, 69 AOBB_STATE_ERROR_COULD_NOT_MOUNT = 21,
55 70
56 /* 71 /**
57 * The OBB could not be unmounted. This most likely indicates that a 72 * The OBB could not be unmounted. This most likely indicates that a
58 * file is in use on the OBB. Can be returned as the status for 73 * file is in use on the OBB. Can be returned as the status for
59 * callbacks made during asynchronous OBB actions. 74 * callbacks made during asynchronous OBB actions.
60 */ 75 */
61 AOBB_STATE_ERROR_COULD_NOT_UNMOUNT = 22, 76 AOBB_STATE_ERROR_COULD_NOT_UNMOUNT = 22,
62 77
63 /* 78 /**
64 * A call was made to unmount the OBB when it was not mounted. Can be 79 * A call was made to unmount the OBB when it was not mounted. Can be
65 * returned as the status for callbacks made during asynchronous OBB 80 * returned as the status for callbacks made during asynchronous OBB
66 * actions. 81 * actions.
67 */ 82 */
68 AOBB_STATE_ERROR_NOT_MOUNTED = 23, 83 AOBB_STATE_ERROR_NOT_MOUNTED = 23,
69 84
70 /* 85 /**
71 * The OBB has already been mounted. Can be returned as the status for 86 * The OBB has already been mounted. Can be returned as the status for
72 * callbacks made during asynchronous OBB actions. 87 * callbacks made during asynchronous OBB actions.
73 */ 88 */
74 AOBB_STATE_ERROR_ALREADY_MOUNTED = 24, 89 AOBB_STATE_ERROR_ALREADY_MOUNTED = 24,
75 90
76 /* 91 /**
77 * The current application does not have permission to use this OBB. 92 * The current application does not have permission to use this OBB.
78 * This could be because the OBB indicates it's owned by a different 93 * This could be because the OBB indicates it's owned by a different
79 * package. Can be returned as the status for callbacks made during 94 * package. Can be returned as the status for callbacks made during
@@ -94,6 +109,16 @@ void AStorageManager_delete(AStorageManager* mgr);
94 109
95/** 110/**
96 * Callback function for asynchronous calls made on OBB files. 111 * Callback function for asynchronous calls made on OBB files.
112 *
113 * "state" is one of the following constants:
114 * - {@link AOBB_STATE_MOUNTED}
115 * - {@link AOBB_STATE_UNMOUNTED}
116 * - {@link AOBB_STATE_ERROR_INTERNAL}
117 * - {@link AOBB_STATE_ERROR_COULD_NOT_MOUNT}
118 * - {@link AOBB_STATE_ERROR_COULD_NOT_UNMOUNT}
119 * - {@link AOBB_STATE_ERROR_NOT_MOUNTED}
120 * - {@link AOBB_STATE_ERROR_ALREADY_MOUNTED}
121 * - {@link AOBB_STATE_ERROR_PERMISSION_DENIED}
97 */ 122 */
98typedef void (*AStorageManager_obbCallbackFunc)(const char* filename, const int32_t state, void* data); 123typedef void (*AStorageManager_obbCallbackFunc)(const char* filename, const int32_t state, void* data);
99 124
@@ -125,3 +150,5 @@ const char* AStorageManager_getMountedObbPath(AStorageManager* mgr, const char*
125#endif 150#endif
126 151
127#endif // ANDROID_STORAGE_MANAGER_H 152#endif // ANDROID_STORAGE_MANAGER_H
153
154/** @} */
diff --git a/include/android/window.h b/include/android/window.h
index 2ab192b74..436bf3a83 100644
--- a/include/android/window.h
+++ b/include/android/window.h
@@ -14,6 +14,14 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17/**
18 * @addtogroup NativeActivity Native Activity
19 * @{
20 */
21
22/**
23 * @file window.h
24 */
17 25
18#ifndef ANDROID_WINDOW_H 26#ifndef ANDROID_WINDOW_H
19#define ANDROID_WINDOW_H 27#define ANDROID_WINDOW_H
@@ -26,28 +34,184 @@ extern "C" {
26 * Window flags, as per the Java API at android.view.WindowManager.LayoutParams. 34 * Window flags, as per the Java API at android.view.WindowManager.LayoutParams.
27 */ 35 */
28enum { 36enum {
37 /**
38 * As long as this window is visible to the user, allow the lock
39 * screen to activate while the screen is on. This can be used
40 * independently, or in combination with {@link
41 * AWINDOW_FLAG_KEEP_SCREEN_ON} and/or {@link
42 * AWINDOW_FLAG_SHOW_WHEN_LOCKED}
43 */
29 AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001, 44 AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001,
45 /** Everything behind this window will be dimmed. */
30 AWINDOW_FLAG_DIM_BEHIND = 0x00000002, 46 AWINDOW_FLAG_DIM_BEHIND = 0x00000002,
47 /**
48 * Blur everything behind this window.
49 * @deprecated Blurring is no longer supported.
50 */
31 AWINDOW_FLAG_BLUR_BEHIND = 0x00000004, 51 AWINDOW_FLAG_BLUR_BEHIND = 0x00000004,
52 /**
53 * This window won't ever get key input focus, so the
54 * user can not send key or other button events to it. Those will
55 * instead go to whatever focusable window is behind it. This flag
56 * will also enable {@link AWINDOW_FLAG_NOT_TOUCH_MODAL} whether or not that
57 * is explicitly set.
58 *
59 * Setting this flag also implies that the window will not need to
60 * interact with
61 * a soft input method, so it will be Z-ordered and positioned
62 * independently of any active input method (typically this means it
63 * gets Z-ordered on top of the input method, so it can use the full
64 * screen for its content and cover the input method if needed. You
65 * can use {@link AWINDOW_FLAG_ALT_FOCUSABLE_IM} to modify this behavior.
66 */
32 AWINDOW_FLAG_NOT_FOCUSABLE = 0x00000008, 67 AWINDOW_FLAG_NOT_FOCUSABLE = 0x00000008,
68 /** this window can never receive touch events. */
33 AWINDOW_FLAG_NOT_TOUCHABLE = 0x00000010, 69 AWINDOW_FLAG_NOT_TOUCHABLE = 0x00000010,
70 /**
71 * Even when this window is focusable (its
72 * {@link AWINDOW_FLAG_NOT_FOCUSABLE} is not set), allow any pointer events
73 * outside of the window to be sent to the windows behind it. Otherwise
74 * it will consume all pointer events itself, regardless of whether they
75 * are inside of the window.
76 */
34 AWINDOW_FLAG_NOT_TOUCH_MODAL = 0x00000020, 77 AWINDOW_FLAG_NOT_TOUCH_MODAL = 0x00000020,
78 /**
79 * When set, if the device is asleep when the touch
80 * screen is pressed, you will receive this first touch event. Usually
81 * the first touch event is consumed by the system since the user can
82 * not see what they are pressing on.
83 *
84 * @deprecated This flag has no effect.
85 */
35 AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040, 86 AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040,
87 /**
88 * As long as this window is visible to the user, keep
89 * the device's screen turned on and bright.
90 */
36 AWINDOW_FLAG_KEEP_SCREEN_ON = 0x00000080, 91 AWINDOW_FLAG_KEEP_SCREEN_ON = 0x00000080,
92 /**
93 * Place the window within the entire screen, ignoring
94 * decorations around the border (such as the status bar). The
95 * window must correctly position its contents to take the screen
96 * decoration into account.
97 */
37 AWINDOW_FLAG_LAYOUT_IN_SCREEN = 0x00000100, 98 AWINDOW_FLAG_LAYOUT_IN_SCREEN = 0x00000100,
99 /** allow window to extend outside of the screen. */
38 AWINDOW_FLAG_LAYOUT_NO_LIMITS = 0x00000200, 100 AWINDOW_FLAG_LAYOUT_NO_LIMITS = 0x00000200,
101 /**
102 * Hide all screen decorations (such as the status
103 * bar) while this window is displayed. This allows the window to
104 * use the entire display space for itself -- the status bar will
105 * be hidden when an app window with this flag set is on the top
106 * layer. A fullscreen window will ignore a value of {@link
107 * AWINDOW_SOFT_INPUT_ADJUST_RESIZE}; the window will stay
108 * fullscreen and will not resize.
109 */
39 AWINDOW_FLAG_FULLSCREEN = 0x00000400, 110 AWINDOW_FLAG_FULLSCREEN = 0x00000400,
111 /**
112 * Override {@link AWINDOW_FLAG_FULLSCREEN} and force the
113 * screen decorations (such as the status bar) to be shown.
114 */
40 AWINDOW_FLAG_FORCE_NOT_FULLSCREEN = 0x00000800, 115 AWINDOW_FLAG_FORCE_NOT_FULLSCREEN = 0x00000800,
116 /**
117 * Turn on dithering when compositing this window to
118 * the screen.
119 * @deprecated This flag is no longer used.
120 */
41 AWINDOW_FLAG_DITHER = 0x00001000, 121 AWINDOW_FLAG_DITHER = 0x00001000,
122 /**
123 * Treat the content of the window as secure, preventing
124 * it from appearing in screenshots or from being viewed on non-secure
125 * displays.
126 */
42 AWINDOW_FLAG_SECURE = 0x00002000, 127 AWINDOW_FLAG_SECURE = 0x00002000,
128 /**
129 * A special mode where the layout parameters are used
130 * to perform scaling of the surface when it is composited to the
131 * screen.
132 */
43 AWINDOW_FLAG_SCALED = 0x00004000, 133 AWINDOW_FLAG_SCALED = 0x00004000,
134 /**
135 * Intended for windows that will often be used when the user is
136 * holding the screen against their face, it will aggressively
137 * filter the event stream to prevent unintended presses in this
138 * situation that may not be desired for a particular window, when
139 * such an event stream is detected, the application will receive
140 * a {@link AMOTION_EVENT_ACTION_CANCEL} to indicate this so
141 * applications can handle this accordingly by taking no action on
142 * the event until the finger is released.
143 */
44 AWINDOW_FLAG_IGNORE_CHEEK_PRESSES = 0x00008000, 144 AWINDOW_FLAG_IGNORE_CHEEK_PRESSES = 0x00008000,
145 /**
146 * A special option only for use in combination with
147 * {@link AWINDOW_FLAG_LAYOUT_IN_SCREEN}. When requesting layout in the
148 * screen your window may appear on top of or behind screen decorations
149 * such as the status bar. By also including this flag, the window
150 * manager will report the inset rectangle needed to ensure your
151 * content is not covered by screen decorations.
152 */
45 AWINDOW_FLAG_LAYOUT_INSET_DECOR = 0x00010000, 153 AWINDOW_FLAG_LAYOUT_INSET_DECOR = 0x00010000,
154 /**
155 * Invert the state of {@link AWINDOW_FLAG_NOT_FOCUSABLE} with
156 * respect to how this window interacts with the current method.
157 * That is, if FLAG_NOT_FOCUSABLE is set and this flag is set,
158 * then the window will behave as if it needs to interact with the
159 * input method and thus be placed behind/away from it; if {@link
160 * AWINDOW_FLAG_NOT_FOCUSABLE} is not set and this flag is set,
161 * then the window will behave as if it doesn't need to interact
162 * with the input method and can be placed to use more space and
163 * cover the input method.
164 */
46 AWINDOW_FLAG_ALT_FOCUSABLE_IM = 0x00020000, 165 AWINDOW_FLAG_ALT_FOCUSABLE_IM = 0x00020000,
166 /**
167 * If you have set {@link AWINDOW_FLAG_NOT_TOUCH_MODAL}, you
168 * can set this flag to receive a single special MotionEvent with
169 * the action
170 * {@link AMOTION_EVENT_ACTION_OUTSIDE} for
171 * touches that occur outside of your window. Note that you will not
172 * receive the full down/move/up gesture, only the location of the
173 * first down as an {@link AMOTION_EVENT_ACTION_OUTSIDE}.
174 */
47 AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000, 175 AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000,
176 /**
177 * Special flag to let windows be shown when the screen
178 * is locked. This will let application windows take precedence over
179 * key guard or any other lock screens. Can be used with
180 * {@link AWINDOW_FLAG_KEEP_SCREEN_ON} to turn screen on and display windows
181 * directly before showing the key guard window. Can be used with
182 * {@link AWINDOW_FLAG_DISMISS_KEYGUARD} to automatically fully dismisss
183 * non-secure keyguards. This flag only applies to the top-most
184 * full-screen window.
185 */
48 AWINDOW_FLAG_SHOW_WHEN_LOCKED = 0x00080000, 186 AWINDOW_FLAG_SHOW_WHEN_LOCKED = 0x00080000,
187 /**
188 * Ask that the system wallpaper be shown behind
189 * your window. The window surface must be translucent to be able
190 * to actually see the wallpaper behind it; this flag just ensures
191 * that the wallpaper surface will be there if this window actually
192 * has translucent regions.
193 */
49 AWINDOW_FLAG_SHOW_WALLPAPER = 0x00100000, 194 AWINDOW_FLAG_SHOW_WALLPAPER = 0x00100000,
195 /**
196 * When set as a window is being added or made
197 * visible, once the window has been shown then the system will
198 * poke the power manager's user activity (as if the user had woken
199 * up the device) to turn the screen on.
200 */
50 AWINDOW_FLAG_TURN_SCREEN_ON = 0x00200000, 201 AWINDOW_FLAG_TURN_SCREEN_ON = 0x00200000,
202 /**
203 * When set the window will cause the keyguard to
204 * be dismissed, only if it is not a secure lock keyguard. Because such
205 * a keyguard is not needed for security, it will never re-appear if
206 * the user navigates to another window (in contrast to
207 * {@link AWINDOW_FLAG_SHOW_WHEN_LOCKED}, which will only temporarily
208 * hide both secure and non-secure keyguards but ensure they reappear
209 * when the user moves to another UI that doesn't hide them).
210 * If the keyguard is currently active and is secure (requires an
211 * unlock pattern) than the user will still need to confirm it before
212 * seeing this window, unless {@link AWINDOW_FLAG_SHOW_WHEN_LOCKED} has
213 * also been set.
214 */
51 AWINDOW_FLAG_DISMISS_KEYGUARD = 0x00400000, 215 AWINDOW_FLAG_DISMISS_KEYGUARD = 0x00400000,
52}; 216};
53 217
@@ -56,3 +220,5 @@ enum {
56#endif 220#endif
57 221
58#endif // ANDROID_WINDOW_H 222#endif // ANDROID_WINDOW_H
223
224/** @} */
diff --git a/include/batteryservice/BatteryService.h b/include/batteryservice/BatteryService.h
index cf19add55..9a8e2f701 100644
--- a/include/batteryservice/BatteryService.h
+++ b/include/batteryservice/BatteryService.h
@@ -57,6 +57,7 @@ struct BatteryProperties {
57 bool chargerAcOnline; 57 bool chargerAcOnline;
58 bool chargerUsbOnline; 58 bool chargerUsbOnline;
59 bool chargerWirelessOnline; 59 bool chargerWirelessOnline;
60 int maxChargingCurrent;
60 int batteryStatus; 61 int batteryStatus;
61 int batteryHealth; 62 int batteryHealth;
62 bool batteryPresent; 63 bool batteryPresent;
diff --git a/include/gui/SensorManager.h b/include/gui/SensorManager.h
index 37960673c..0cff46c07 100644
--- a/include/gui/SensorManager.h
+++ b/include/gui/SensorManager.h
@@ -51,57 +51,7 @@ class SensorManager :
51 public ASensorManager 51 public ASensorManager
52{ 52{
53public: 53public:
54 static SensorManager& getInstanceForPackage(const String16& packageName) { 54 static SensorManager& getInstanceForPackage(const String16& packageName);
55 Mutex::Autolock _l(sLock);
56
57 SensorManager* sensorManager;
58 std::map<String16, SensorManager*>::iterator iterator =
59 sPackageInstances.find(packageName);
60
61 if (iterator != sPackageInstances.end()) {
62 sensorManager = iterator->second;
63 } else {
64 String16 opPackageName = packageName;
65
66 // It is possible that the calling code has no access to the package name.
67 // In this case we will get the packages for the calling UID and pick the
68 // first one for attributing the app op. This will work correctly for
69 // runtime permissions as for legacy apps we will toggle the app op for
70 // all packages in the UID. The caveat is that the operation may be attributed
71 // to the wrong package and stats based on app ops may be slightly off.
72 if (opPackageName.size() <= 0) {
73 sp<IBinder> binder = defaultServiceManager()->getService(String16("permission"));
74 if (binder != 0) {
75 const uid_t uid = IPCThreadState::self()->getCallingUid();
76 Vector<String16> packages;
77 interface_cast<IPermissionController>(binder)->getPackagesForUid(uid, packages);
78 if (!packages.isEmpty()) {
79 opPackageName = packages[0];
80 } else {
81 ALOGE("No packages for calling UID");
82 }
83 } else {
84 ALOGE("Cannot get permission service");
85 }
86 }
87
88 sensorManager = new SensorManager(opPackageName);
89
90 // If we had no package name, we looked it up from the UID and the sensor
91 // manager instance we created should also be mapped to the empty package
92 // name, to avoid looking up the packages for a UID and get the same result.
93 if (packageName.size() <= 0) {
94 sPackageInstances.insert(std::make_pair(String16(), sensorManager));
95 }
96
97 // Stash the per package sensor manager.
98 sPackageInstances.insert(std::make_pair(opPackageName, sensorManager));
99 }
100
101 return *sensorManager;
102 }
103
104 SensorManager(const String16& opPackageName);
105 ~SensorManager(); 55 ~SensorManager();
106 56
107 ssize_t getSensorList(Sensor const* const** list) const; 57 ssize_t getSensorList(Sensor const* const** list) const;
@@ -113,6 +63,7 @@ private:
113 // DeathRecipient interface 63 // DeathRecipient interface
114 void sensorManagerDied(); 64 void sensorManagerDied();
115 65
66 SensorManager(const String16& opPackageName);
116 status_t assertStateLocked() const; 67 status_t assertStateLocked() const;
117 68
118private: 69private:
diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h
index a7a93297f..f0a6238e9 100644
--- a/include/input/InputEventLabels.h
+++ b/include/input/InputEventLabels.h
@@ -303,10 +303,15 @@ static const InputEventLabel KEYCODES[] = {
303 DEFINE_KEYCODE(NAVIGATE_NEXT), 303 DEFINE_KEYCODE(NAVIGATE_NEXT),
304 DEFINE_KEYCODE(NAVIGATE_IN), 304 DEFINE_KEYCODE(NAVIGATE_IN),
305 DEFINE_KEYCODE(NAVIGATE_OUT), 305 DEFINE_KEYCODE(NAVIGATE_OUT),
306 DEFINE_KEYCODE(STEM_PRIMARY),
307 DEFINE_KEYCODE(STEM_1),
308 DEFINE_KEYCODE(STEM_2),
309 DEFINE_KEYCODE(STEM_3),
306 DEFINE_KEYCODE(MEDIA_SKIP_FORWARD), 310 DEFINE_KEYCODE(MEDIA_SKIP_FORWARD),
307 DEFINE_KEYCODE(MEDIA_SKIP_BACKWARD), 311 DEFINE_KEYCODE(MEDIA_SKIP_BACKWARD),
308 DEFINE_KEYCODE(MEDIA_STEP_FORWARD), 312 DEFINE_KEYCODE(MEDIA_STEP_FORWARD),
309 DEFINE_KEYCODE(MEDIA_STEP_BACKWARD), 313 DEFINE_KEYCODE(MEDIA_STEP_BACKWARD),
314 DEFINE_KEYCODE(SOFT_SLEEP),
310 315
311 { NULL, 0 } 316 { NULL, 0 }
312}; 317};
diff --git a/include/ui/DisplayInfo.h b/include/ui/DisplayInfo.h
index 799944f3e..ad73ee72f 100644
--- a/include/ui/DisplayInfo.h
+++ b/include/ui/DisplayInfo.h
@@ -36,6 +36,7 @@ struct DisplayInfo {
36 bool secure; 36 bool secure;
37 nsecs_t appVsyncOffset; 37 nsecs_t appVsyncOffset;
38 nsecs_t presentationDeadline; 38 nsecs_t presentationDeadline;
39 int colorTransform;
39}; 40};
40 41
41/* Display orientations as defined in Surface.java and ISurfaceComposer.h. */ 42/* Display orientations as defined in Surface.java and ISurfaceComposer.h. */
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 016d3c54b..821ab6cb9 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -350,10 +350,6 @@ ProcessState::ProcessState()
350 , mThreadPoolSeq(1) 350 , mThreadPoolSeq(1)
351{ 351{
352 if (mDriverFD >= 0) { 352 if (mDriverFD >= 0) {
353 // XXX Ideally, there should be a specific define for whether we
354 // have mmap (or whether we could possibly have the kernel module
355 // availabla).
356#if !defined(HAVE_WIN32_IPC)
357 // mmap the binder, providing a chunk of virtual address space to receive transactions. 353 // mmap the binder, providing a chunk of virtual address space to receive transactions.
358 mVMStart = mmap(0, BINDER_VM_SIZE, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, mDriverFD, 0); 354 mVMStart = mmap(0, BINDER_VM_SIZE, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, mDriverFD, 0);
359 if (mVMStart == MAP_FAILED) { 355 if (mVMStart == MAP_FAILED) {
@@ -362,9 +358,6 @@ ProcessState::ProcessState()
362 close(mDriverFD); 358 close(mDriverFD);
363 mDriverFD = -1; 359 mDriverFD = -1;
364 } 360 }
365#else
366 mDriverFD = -1;
367#endif
368 } 361 }
369 362
370 LOG_ALWAYS_FATAL_IF(mDriverFD < 0, "Binder driver could not be opened. Terminating."); 363 LOG_ALWAYS_FATAL_IF(mDriverFD < 0, "Binder driver could not be opened. Terminating.");
diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp
index d7a78850d..8bdbc22ec 100644
--- a/libs/gui/IGraphicBufferProducer.cpp
+++ b/libs/gui/IGraphicBufferProducer.cpp
@@ -348,7 +348,7 @@ status_t BnGraphicBufferProducer::onTransact(
348 uint32_t height = data.readUint32(); 348 uint32_t height = data.readUint32();
349 PixelFormat format = static_cast<PixelFormat>(data.readInt32()); 349 PixelFormat format = static_cast<PixelFormat>(data.readInt32());
350 uint32_t usage = data.readUint32(); 350 uint32_t usage = data.readUint32();
351 int buf; 351 int buf = 0;
352 sp<Fence> fence; 352 sp<Fence> fence;
353 int result = dequeueBuffer(&buf, &fence, async, width, height, 353 int result = dequeueBuffer(&buf, &fence, async, width, height,
354 format, usage); 354 format, usage);
@@ -389,7 +389,7 @@ status_t BnGraphicBufferProducer::onTransact(
389 CHECK_INTERFACE(IGraphicBufferProducer, data, reply); 389 CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
390 sp<GraphicBuffer> buffer = new GraphicBuffer(); 390 sp<GraphicBuffer> buffer = new GraphicBuffer();
391 data.read(*buffer.get()); 391 data.read(*buffer.get());
392 int slot; 392 int slot = 0;
393 int result = attachBuffer(&slot, buffer); 393 int result = attachBuffer(&slot, buffer);
394 reply->writeInt32(slot); 394 reply->writeInt32(slot);
395 reply->writeInt32(result); 395 reply->writeInt32(result);
@@ -416,7 +416,7 @@ status_t BnGraphicBufferProducer::onTransact(
416 } 416 }
417 case QUERY: { 417 case QUERY: {
418 CHECK_INTERFACE(IGraphicBufferProducer, data, reply); 418 CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
419 int value; 419 int value = 0;
420 int what = data.readInt32(); 420 int what = data.readInt32();
421 int res = query(what, &value); 421 int res = query(what, &value);
422 reply->writeInt32(value); 422 reply->writeInt32(value);
diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp
index 2545eec33..4b3603ee1 100644
--- a/libs/gui/Sensor.cpp
+++ b/libs/gui/Sensor.cpp
@@ -223,6 +223,10 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion)
223 } 223 }
224 if (halVersion > SENSORS_DEVICE_API_VERSION_1_0 && hwSensor->requiredPermission) { 224 if (halVersion > SENSORS_DEVICE_API_VERSION_1_0 && hwSensor->requiredPermission) {
225 mRequiredPermission = hwSensor->requiredPermission; 225 mRequiredPermission = hwSensor->requiredPermission;
226 if (!strcmp(mRequiredPermission, SENSOR_PERMISSION_BODY_SENSORS)) {
227 AppOpsManager appOps;
228 mRequiredAppOp = appOps.permissionToOpCode(String16(SENSOR_PERMISSION_BODY_SENSORS));
229 }
226 } 230 }
227 231
228 if (halVersion >= SENSORS_DEVICE_API_VERSION_1_3) { 232 if (halVersion >= SENSORS_DEVICE_API_VERSION_1_3) {
diff --git a/libs/gui/SensorManager.cpp b/libs/gui/SensorManager.cpp
index dd3778137..33608b5bd 100644
--- a/libs/gui/SensorManager.cpp
+++ b/libs/gui/SensorManager.cpp
@@ -36,6 +36,58 @@
36namespace android { 36namespace android {
37// ---------------------------------------------------------------------------- 37// ----------------------------------------------------------------------------
38 38
39android::Mutex android::SensorManager::sLock;
40std::map<String16, SensorManager*> android::SensorManager::sPackageInstances;
41
42SensorManager& SensorManager::getInstanceForPackage(const String16& packageName) {
43 Mutex::Autolock _l(sLock);
44 SensorManager* sensorManager;
45 std::map<String16, SensorManager*>::iterator iterator =
46 sPackageInstances.find(packageName);
47
48 if (iterator != sPackageInstances.end()) {
49 sensorManager = iterator->second;
50 } else {
51 String16 opPackageName = packageName;
52
53 // It is possible that the calling code has no access to the package name.
54 // In this case we will get the packages for the calling UID and pick the
55 // first one for attributing the app op. This will work correctly for
56 // runtime permissions as for legacy apps we will toggle the app op for
57 // all packages in the UID. The caveat is that the operation may be attributed
58 // to the wrong package and stats based on app ops may be slightly off.
59 if (opPackageName.size() <= 0) {
60 sp<IBinder> binder = defaultServiceManager()->getService(String16("permission"));
61 if (binder != 0) {
62 const uid_t uid = IPCThreadState::self()->getCallingUid();
63 Vector<String16> packages;
64 interface_cast<IPermissionController>(binder)->getPackagesForUid(uid, packages);
65 if (!packages.isEmpty()) {
66 opPackageName = packages[0];
67 } else {
68 ALOGE("No packages for calling UID");
69 }
70 } else {
71 ALOGE("Cannot get permission service");
72 }
73 }
74
75 sensorManager = new SensorManager(opPackageName);
76
77 // If we had no package name, we looked it up from the UID and the sensor
78 // manager instance we created should also be mapped to the empty package
79 // name, to avoid looking up the packages for a UID and get the same result.
80 if (packageName.size() <= 0) {
81 sPackageInstances.insert(std::make_pair(String16(), sensorManager));
82 }
83
84 // Stash the per package sensor manager.
85 sPackageInstances.insert(std::make_pair(opPackageName, sensorManager));
86 }
87
88 return *sensorManager;
89}
90
39SensorManager::SensorManager(const String16& opPackageName) 91SensorManager::SensorManager(const String16& opPackageName)
40 : mSensorList(0), mOpPackageName(opPackageName) 92 : mSensorList(0), mOpPackageName(opPackageName)
41{ 93{
@@ -58,13 +110,23 @@ void SensorManager::sensorManagerDied()
58} 110}
59 111
60status_t SensorManager::assertStateLocked() const { 112status_t SensorManager::assertStateLocked() const {
113 bool initSensorManager = false;
61 if (mSensorServer == NULL) { 114 if (mSensorServer == NULL) {
62 // try for one second 115 initSensorManager = true;
116 } else {
117 // Ping binder to check if sensorservice is alive.
118 status_t err = IInterface::asBinder(mSensorServer)->pingBinder();
119 if (err != NO_ERROR) {
120 initSensorManager = true;
121 }
122 }
123 if (initSensorManager) {
124 // try for 300 seconds (60*5(getService() tries for 5 seconds)) before giving up ...
63 const String16 name("sensorservice"); 125 const String16 name("sensorservice");
64 for (int i=0 ; i<4 ; i++) { 126 for (int i = 0; i < 60; i++) {
65 status_t err = getService(name, &mSensorServer); 127 status_t err = getService(name, &mSensorServer);
66 if (err == NAME_NOT_FOUND) { 128 if (err == NAME_NOT_FOUND) {
67 usleep(250000); 129 sleep(1);
68 continue; 130 continue;
69 } 131 }
70 if (err != NO_ERROR) { 132 if (err != NO_ERROR) {
@@ -83,6 +145,8 @@ status_t SensorManager::assertStateLocked() const {
83 DeathObserver(SensorManager& mgr) : mSensorManger(mgr) { } 145 DeathObserver(SensorManager& mgr) : mSensorManger(mgr) { }
84 }; 146 };
85 147
148 LOG_ALWAYS_FATAL_IF(mSensorServer.get() == NULL, "getService(SensorService) NULL");
149
86 mDeathObserver = new DeathObserver(*const_cast<SensorManager *>(this)); 150 mDeathObserver = new DeathObserver(*const_cast<SensorManager *>(this));
87 IInterface::asBinder(mSensorServer)->linkToDeath(mDeathObserver); 151 IInterface::asBinder(mSensorServer)->linkToDeath(mDeathObserver);
88 152
@@ -90,6 +154,8 @@ status_t SensorManager::assertStateLocked() const {
90 size_t count = mSensors.size(); 154 size_t count = mSensors.size();
91 mSensorList = 155 mSensorList =
92 static_cast<Sensor const**>(malloc(count * sizeof(Sensor*))); 156 static_cast<Sensor const**>(malloc(count * sizeof(Sensor*)));
157 LOG_ALWAYS_FATAL_IF(mSensorList == NULL, "mSensorList NULL");
158
93 for (size_t i=0 ; i<count ; i++) { 159 for (size_t i=0 ; i<count ; i++) {
94 mSensorList[i] = mSensors.array() + i; 160 mSensorList[i] = mSensors.array() + i;
95 } 161 }
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp
index 472585b88..2dff4e091 100644
--- a/libs/input/InputTransport.cpp
+++ b/libs/input/InputTransport.cpp
@@ -51,6 +51,10 @@ static const nsecs_t RESAMPLE_LATENCY = 5 * NANOS_PER_MS;
51// Minimum time difference between consecutive samples before attempting to resample. 51// Minimum time difference between consecutive samples before attempting to resample.
52static const nsecs_t RESAMPLE_MIN_DELTA = 2 * NANOS_PER_MS; 52static const nsecs_t RESAMPLE_MIN_DELTA = 2 * NANOS_PER_MS;
53 53
54// Maximum time difference between consecutive samples before attempting to resample
55// by extrapolation.
56static const nsecs_t RESAMPLE_MAX_DELTA = 20 * NANOS_PER_MS;
57
54// Maximum time to predict forward from the last known state, to avoid predicting too 58// Maximum time to predict forward from the last known state, to avoid predicting too
55// far into the future. This time is further bounded by 50% of the last time delta. 59// far into the future. This time is further bounded by 50% of the last time delta.
56static const nsecs_t RESAMPLE_MAX_PREDICTION = 8 * NANOS_PER_MS; 60static const nsecs_t RESAMPLE_MAX_PREDICTION = 8 * NANOS_PER_MS;
@@ -725,7 +729,7 @@ void InputConsumer::resampleTouchState(nsecs_t sampleTime, MotionEvent* event,
725 nsecs_t delta = future.eventTime - current->eventTime; 729 nsecs_t delta = future.eventTime - current->eventTime;
726 if (delta < RESAMPLE_MIN_DELTA) { 730 if (delta < RESAMPLE_MIN_DELTA) {
727#if DEBUG_RESAMPLING 731#if DEBUG_RESAMPLING
728 ALOGD("Not resampled, delta time is %lld ns.", delta); 732 ALOGD("Not resampled, delta time is too small: %lld ns.", delta);
729#endif 733#endif
730 return; 734 return;
731 } 735 }
@@ -737,7 +741,12 @@ void InputConsumer::resampleTouchState(nsecs_t sampleTime, MotionEvent* event,
737 nsecs_t delta = current->eventTime - other->eventTime; 741 nsecs_t delta = current->eventTime - other->eventTime;
738 if (delta < RESAMPLE_MIN_DELTA) { 742 if (delta < RESAMPLE_MIN_DELTA) {
739#if DEBUG_RESAMPLING 743#if DEBUG_RESAMPLING
740 ALOGD("Not resampled, delta time is %lld ns.", delta); 744 ALOGD("Not resampled, delta time is too small: %lld ns.", delta);
745#endif
746 return;
747 } else if (delta > RESAMPLE_MAX_DELTA) {
748#if DEBUG_RESAMPLING
749 ALOGD("Not resampled, delta time is too large: %lld ns.", delta);
741#endif 750#endif
742 return; 751 return;
743 } 752 }
diff --git a/services/batteryservice/BatteryProperties.cpp b/services/batteryservice/BatteryProperties.cpp
index ab636a9f8..f13d6e8b4 100644
--- a/services/batteryservice/BatteryProperties.cpp
+++ b/services/batteryservice/BatteryProperties.cpp
@@ -33,6 +33,7 @@ status_t BatteryProperties::readFromParcel(Parcel* p) {
33 chargerAcOnline = p->readInt32() == 1 ? true : false; 33 chargerAcOnline = p->readInt32() == 1 ? true : false;
34 chargerUsbOnline = p->readInt32() == 1 ? true : false; 34 chargerUsbOnline = p->readInt32() == 1 ? true : false;
35 chargerWirelessOnline = p->readInt32() == 1 ? true : false; 35 chargerWirelessOnline = p->readInt32() == 1 ? true : false;
36 maxChargingCurrent = p->readInt32();
36 batteryStatus = p->readInt32(); 37 batteryStatus = p->readInt32();
37 batteryHealth = p->readInt32(); 38 batteryHealth = p->readInt32();
38 batteryPresent = p->readInt32() == 1 ? true : false; 39 batteryPresent = p->readInt32() == 1 ? true : false;
@@ -47,6 +48,7 @@ status_t BatteryProperties::writeToParcel(Parcel* p) const {
47 p->writeInt32(chargerAcOnline ? 1 : 0); 48 p->writeInt32(chargerAcOnline ? 1 : 0);
48 p->writeInt32(chargerUsbOnline ? 1 : 0); 49 p->writeInt32(chargerUsbOnline ? 1 : 0);
49 p->writeInt32(chargerWirelessOnline ? 1 : 0); 50 p->writeInt32(chargerWirelessOnline ? 1 : 0);
51 p->writeInt32(maxChargingCurrent);
50 p->writeInt32(batteryStatus); 52 p->writeInt32(batteryStatus);
51 p->writeInt32(batteryHealth); 53 p->writeInt32(batteryHealth);
52 p->writeInt32(batteryPresent ? 1 : 0); 54 p->writeInt32(batteryPresent ? 1 : 0);
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index bd74b026e..36095bf1e 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -4699,7 +4699,7 @@ void TouchInputMapper::cookPointerData() {
4699 bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate; 4699 bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate;
4700 top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate; 4700 top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate;
4701 orientation -= M_PI_2; 4701 orientation -= M_PI_2;
4702 if (orientation < mOrientedRanges.orientation.min) { 4702 if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) {
4703 orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); 4703 orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
4704 } 4704 }
4705 break; 4705 break;
@@ -4711,7 +4711,7 @@ void TouchInputMapper::cookPointerData() {
4711 bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate; 4711 bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate;
4712 top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate; 4712 top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate;
4713 orientation -= M_PI; 4713 orientation -= M_PI;
4714 if (orientation < mOrientedRanges.orientation.min) { 4714 if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) {
4715 orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); 4715 orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
4716 } 4716 }
4717 break; 4717 break;
@@ -4723,7 +4723,7 @@ void TouchInputMapper::cookPointerData() {
4723 bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate; 4723 bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
4724 top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate; 4724 top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
4725 orientation += M_PI_2; 4725 orientation += M_PI_2;
4726 if (orientation > mOrientedRanges.orientation.max) { 4726 if (mOrientedRanges.haveOrientation && orientation > mOrientedRanges.orientation.max) {
4727 orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); 4727 orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
4728 } 4728 }
4729 break; 4729 break;
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 320899045..d37fcb2b8 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -336,10 +336,20 @@ static const uint32_t DISPLAY_ATTRIBUTES[] = {
336 HWC_DISPLAY_HEIGHT, 336 HWC_DISPLAY_HEIGHT,
337 HWC_DISPLAY_DPI_X, 337 HWC_DISPLAY_DPI_X,
338 HWC_DISPLAY_DPI_Y, 338 HWC_DISPLAY_DPI_Y,
339 HWC_DISPLAY_COLOR_TRANSFORM,
339 HWC_DISPLAY_NO_ATTRIBUTE, 340 HWC_DISPLAY_NO_ATTRIBUTE,
340}; 341};
341#define NUM_DISPLAY_ATTRIBUTES (sizeof(DISPLAY_ATTRIBUTES) / sizeof(DISPLAY_ATTRIBUTES)[0]) 342#define NUM_DISPLAY_ATTRIBUTES (sizeof(DISPLAY_ATTRIBUTES) / sizeof(DISPLAY_ATTRIBUTES)[0])
342 343
344static const uint32_t PRE_HWC15_DISPLAY_ATTRIBUTES[] = {
345 HWC_DISPLAY_VSYNC_PERIOD,
346 HWC_DISPLAY_WIDTH,
347 HWC_DISPLAY_HEIGHT,
348 HWC_DISPLAY_DPI_X,
349 HWC_DISPLAY_DPI_Y,
350 HWC_DISPLAY_NO_ATTRIBUTE,
351};
352
343status_t HWComposer::queryDisplayProperties(int disp) { 353status_t HWComposer::queryDisplayProperties(int disp) {
344 354
345 LOG_ALWAYS_FATAL_IF(!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)); 355 LOG_ALWAYS_FATAL_IF(!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1));
@@ -362,6 +372,12 @@ status_t HWComposer::queryDisplayProperties(int disp) {
362 for (size_t c = 0; c < numConfigs; ++c) { 372 for (size_t c = 0; c < numConfigs; ++c) {
363 err = mHwc->getDisplayAttributes(mHwc, disp, configs[c], 373 err = mHwc->getDisplayAttributes(mHwc, disp, configs[c],
364 DISPLAY_ATTRIBUTES, values); 374 DISPLAY_ATTRIBUTES, values);
375 // If this is a pre-1.5 HWC, it may not know about color transform, so
376 // try again with a smaller set of attributes
377 if (err != NO_ERROR) {
378 err = mHwc->getDisplayAttributes(mHwc, disp, configs[c],
379 PRE_HWC15_DISPLAY_ATTRIBUTES, values);
380 }
365 if (err != NO_ERROR) { 381 if (err != NO_ERROR) {
366 // we can't get this display's info. turn it off. 382 // we can't get this display's info. turn it off.
367 mDisplayData[disp].connected = false; 383 mDisplayData[disp].connected = false;
@@ -386,6 +402,9 @@ status_t HWComposer::queryDisplayProperties(int disp) {
386 case HWC_DISPLAY_DPI_Y: 402 case HWC_DISPLAY_DPI_Y:
387 config.ydpi = values[i] / 1000.0f; 403 config.ydpi = values[i] / 1000.0f;
388 break; 404 break;
405 case HWC_DISPLAY_COLOR_TRANSFORM:
406 config.colorTransform = values[i];
407 break;
389 default: 408 default:
390 ALOG_ASSERT(false, "unknown display attribute[%zu] %#x", 409 ALOG_ASSERT(false, "unknown display attribute[%zu] %#x",
391 i, DISPLAY_ATTRIBUTES[i]); 410 i, DISPLAY_ATTRIBUTES[i]);
@@ -1147,9 +1166,11 @@ void HWComposer::dump(String8& result) const {
1147 result.appendFormat(" Display[%zd] configurations (* current):\n", i); 1166 result.appendFormat(" Display[%zd] configurations (* current):\n", i);
1148 for (size_t c = 0; c < disp.configs.size(); ++c) { 1167 for (size_t c = 0; c < disp.configs.size(); ++c) {
1149 const DisplayConfig& config(disp.configs[c]); 1168 const DisplayConfig& config(disp.configs[c]);
1150 result.appendFormat(" %s%zd: %ux%u, xdpi=%f, ydpi=%f, refresh=%" PRId64 "\n", 1169 result.appendFormat(" %s%zd: %ux%u, xdpi=%f, ydpi=%f"
1151 c == disp.currentConfig ? "* " : "", c, config.width, config.height, 1170 ", refresh=%" PRId64 ", colorTransform=%d\n",
1152 config.xdpi, config.ydpi, config.refresh); 1171 c == disp.currentConfig ? "* " : "", c,
1172 config.width, config.height, config.xdpi, config.ydpi,
1173 config.refresh, config.colorTransform);
1153 } 1174 }
1154 1175
1155 if (disp.list) { 1176 if (disp.list) {
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index cc98b4c20..5e0b3d85e 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -257,6 +257,7 @@ public:
257 float xdpi; 257 float xdpi;
258 float ydpi; 258 float ydpi;
259 nsecs_t refresh; 259 nsecs_t refresh;
260 int colorTransform;
260 }; 261 };
261 262
262 // Query display parameters. Pass in a display index (e.g. 263 // Query display parameters. Pass in a display index (e.g.
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index de0f921e2..fdc36505c 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -163,6 +163,9 @@ SurfaceFlinger::SurfaceFlinger()
163 property_get("ro.bq.gpu_to_cpu_unsupported", value, "0"); 163 property_get("ro.bq.gpu_to_cpu_unsupported", value, "0");
164 mGpuToCpuSupported = !atoi(value); 164 mGpuToCpuSupported = !atoi(value);
165 165
166 property_get("debug.sf.drop_missed_frames", value, "0");
167 mDropMissedFrames = atoi(value);
168
166 property_get("debug.sf.showupdates", value, "0"); 169 property_get("debug.sf.showupdates", value, "0");
167 mDebugRegion = atoi(value); 170 mDebugRegion = atoi(value);
168 171
@@ -442,6 +445,15 @@ void SurfaceFlinger::init() {
442 mEGLDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); 445 mEGLDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
443 eglInitialize(mEGLDisplay, NULL, NULL); 446 eglInitialize(mEGLDisplay, NULL, NULL);
444 447
448 // start the EventThread
449 sp<VSyncSource> vsyncSrc = new DispSyncSource(&mPrimaryDispSync,
450 vsyncPhaseOffsetNs, true, "app");
451 mEventThread = new EventThread(vsyncSrc);
452 sp<VSyncSource> sfVsyncSrc = new DispSyncSource(&mPrimaryDispSync,
453 sfVsyncPhaseOffsetNs, true, "sf");
454 mSFEventThread = new EventThread(sfVsyncSrc);
455 mEventQueue.setEventThread(mSFEventThread);
456
445 // Initialize the H/W composer object. There may or may not be an 457 // Initialize the H/W composer object. There may or may not be an
446 // actual hardware composer underneath. 458 // actual hardware composer underneath.
447 mHwc = new HWComposer(this, 459 mHwc = new HWComposer(this,
@@ -493,15 +505,6 @@ void SurfaceFlinger::init() {
493 // (which may happens before we render something) 505 // (which may happens before we render something)
494 getDefaultDisplayDevice()->makeCurrent(mEGLDisplay, mEGLContext); 506 getDefaultDisplayDevice()->makeCurrent(mEGLDisplay, mEGLContext);
495 507
496 // start the EventThread
497 sp<VSyncSource> vsyncSrc = new DispSyncSource(&mPrimaryDispSync,
498 vsyncPhaseOffsetNs, true, "app");
499 mEventThread = new EventThread(vsyncSrc);
500 sp<VSyncSource> sfVsyncSrc = new DispSyncSource(&mPrimaryDispSync,
501 sfVsyncPhaseOffsetNs, true, "sf");
502 mSFEventThread = new EventThread(sfVsyncSrc);
503 mEventQueue.setEventThread(mSFEventThread);
504
505 mEventControlThread = new EventControlThread(this); 508 mEventControlThread = new EventControlThread(this);
506 mEventControlThread->run("EventControl", PRIORITY_URGENT_DISPLAY); 509 mEventControlThread->run("EventControl", PRIORITY_URGENT_DISPLAY);
507 510
@@ -629,6 +632,7 @@ status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
629 info.ydpi = ydpi; 632 info.ydpi = ydpi;
630 info.fps = float(1e9 / hwConfig.refresh); 633 info.fps = float(1e9 / hwConfig.refresh);
631 info.appVsyncOffset = VSYNC_EVENT_PHASE_OFFSET_NS; 634 info.appVsyncOffset = VSYNC_EVENT_PHASE_OFFSET_NS;
635 info.colorTransform = hwConfig.colorTransform;
632 636
633 // This is how far in advance a buffer must be queued for 637 // This is how far in advance a buffer must be queued for
634 // presentation at a given time. If you want a buffer to appear 638 // presentation at a given time. If you want a buffer to appear
@@ -919,12 +923,31 @@ bool SurfaceFlinger::handleMessageInvalidate() {
919 923
920void SurfaceFlinger::handleMessageRefresh() { 924void SurfaceFlinger::handleMessageRefresh() {
921 ATRACE_CALL(); 925 ATRACE_CALL();
922 preComposition(); 926
923 rebuildLayerStacks(); 927 static nsecs_t previousExpectedPresent = 0;
924 setUpHWComposer(); 928 nsecs_t expectedPresent = mPrimaryDispSync.computeNextRefresh(0);
925 doDebugFlashRegions(); 929 static bool previousFrameMissed = false;
926 doComposition(); 930 bool frameMissed = (expectedPresent == previousExpectedPresent);
927 postComposition(); 931 if (frameMissed != previousFrameMissed) {
932 ATRACE_INT("FrameMissed", static_cast<int>(frameMissed));
933 }
934 previousFrameMissed = frameMissed;
935
936 if (CC_UNLIKELY(mDropMissedFrames && frameMissed)) {
937 // Latch buffers, but don't send anything to HWC, then signal another
938 // wakeup for the next vsync
939 preComposition();
940 repaintEverything();
941 } else {
942 preComposition();
943 rebuildLayerStacks();
944 setUpHWComposer();
945 doDebugFlashRegions();
946 doComposition();
947 postComposition();
948 }
949
950 previousExpectedPresent = mPrimaryDispSync.computeNextRefresh(0);
928} 951}
929 952
930void SurfaceFlinger::doDebugFlashRegions() 953void SurfaceFlinger::doDebugFlashRegions()
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 3759a9240..b3baadd46 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -445,6 +445,7 @@ private:
445 RenderEngine* mRenderEngine; 445 RenderEngine* mRenderEngine;
446 nsecs_t mBootTime; 446 nsecs_t mBootTime;
447 bool mGpuToCpuSupported; 447 bool mGpuToCpuSupported;
448 bool mDropMissedFrames;
448 sp<EventThread> mEventThread; 449 sp<EventThread> mEventThread;
449 sp<EventThread> mSFEventThread; 450 sp<EventThread> mSFEventThread;
450 sp<EventControlThread> mEventControlThread; 451 sp<EventControlThread> mEventControlThread;
diff --git a/services/surfaceflinger/surfaceflinger.rc b/services/surfaceflinger/surfaceflinger.rc
index 718b6b65f..59a43e219 100644
--- a/services/surfaceflinger/surfaceflinger.rc
+++ b/services/surfaceflinger/surfaceflinger.rc
@@ -3,3 +3,4 @@ service surfaceflinger /system/bin/surfaceflinger
3 user system 3 user system
4 group graphics drmrpc 4 group graphics drmrpc
5 onrestart restart zygote 5 onrestart restart zygote
6 writepid /dev/cpuset/system-background/tasks