1page.title=Native Activity 2page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css"> 3@jd:body 4<!-- Generated by Doxygen 1.8.6 --> 5</div><!-- top --> 6<div class="header"> 7 <div class="summary"> 8<a href="#files">Files</a> | 9<a href="#nested-classes">Data Structures</a> | 10<a href="#typedef-members">Typedefs</a> | 11<a href="#enum-members">Enumerations</a> | 12<a href="#func-members">Functions</a> | 13<a href="#var-members">Variables</a> </div> 14 <div class="headertitle"> 15<div class="title">Native Activity</div> </div> 16</div><!--header--> 17<div class="contents"> 18<table class="memberdecls"> 19<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a> 20Files</h2></td></tr> 21<tr class="memitem:native__activity_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="native__activity_8h.html">native_activity.h</a></td></tr> 22<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 23<tr class="memitem:native__window_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="native__window_8h.html">native_window.h</a></td></tr> 24<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 25<tr class="memitem:native__window__jni_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="native__window__jni_8h.html">native_window_jni.h</a></td></tr> 26<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 27<tr class="memitem:rect_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="rect_8h.html">rect.h</a></td></tr> 28<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 29<tr class="memitem:window_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="window_8h.html">window.h</a></td></tr> 30<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 31</table><table class="memberdecls"> 32<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> 33Data Structures</h2></td></tr> 34<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a></td></tr> 35<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 36<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a></td></tr> 37<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 38<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a></td></tr> 39<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 40<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_rect.html">ARect</a></td></tr> 41<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> 42</table><table class="memberdecls"> 43<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> 44Typedefs</h2></td></tr> 45<tr class="memitem:ga8abd07923f37feb1ce724d139cc2609d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_native_activity.html">ANativeActivity</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga8abd07923f37feb1ce724d139cc2609d">ANativeActivity</a></td></tr> 46<tr class="separator:ga8abd07923f37feb1ce724d139cc2609d"><td class="memSeparator" colspan="2"> </td></tr> 47<tr class="memitem:ga28dca784e5ee939427135c72c0151c38"><td class="memItemLeft" align="right" valign="top">typedef struct <br class="typebreak"/> 48<a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga28dca784e5ee939427135c72c0151c38">ANativeActivityCallbacks</a></td></tr> 49<tr class="separator:ga28dca784e5ee939427135c72c0151c38"><td class="memSeparator" colspan="2"> </td></tr> 50<tr class="memitem:ga569a53bcac3fcedb0189b7c412ebcb22"><td class="memItemLeft" align="right" valign="top">typedef void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, void *savedState, size_t savedStateSize)</td></tr> 51<tr class="separator:ga569a53bcac3fcedb0189b7c412ebcb22"><td class="memSeparator" colspan="2"> </td></tr> 52<tr class="memitem:ga66956d540c2e3709e12156d195e64726"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a></td></tr> 53<tr class="separator:ga66956d540c2e3709e12156d195e64726"><td class="memSeparator" colspan="2"> </td></tr> 54<tr class="memitem:gad0983ca473ce36293baf5e51a14c3357"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gad0983ca473ce36293baf5e51a14c3357">ANativeWindow_Buffer</a></td></tr> 55<tr class="separator:gad0983ca473ce36293baf5e51a14c3357"><td class="memSeparator" colspan="2"> </td></tr> 56<tr class="memitem:gaa984a498f0e146ac57c6022a323423cf"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_a_rect.html">ARect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaa984a498f0e146ac57c6022a323423cf">ARect</a></td></tr> 57<tr class="separator:gaa984a498f0e146ac57c6022a323423cf"><td class="memSeparator" colspan="2"> </td></tr> 58</table><table class="memberdecls"> 59<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a> 60Enumerations</h2></td></tr> 61<tr class="memitem:ga39fca1837c5ce7715cbf571669660c13"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a9b7250ac0e5a626a81b176462a9df7c9">ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT</a> = 0x0001, 62<a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5">ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED</a> = 0x0002 63 }</td></tr> 64<tr class="separator:ga39fca1837c5ce7715cbf571669660c13"><td class="memSeparator" colspan="2"> </td></tr> 65<tr class="memitem:gaaf8fd5f0e57d456151c951e0f3715fc4"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a642e76508cc737bbc1df149756c2a807">ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY</a> = 0x0001, 66<a class="el" href="group___native_activity.html#ggaaf8fd5f0e57d456151c951e0f3715fc4a0f4cbb55fa4c29b963b7b37d13352e6f">ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS</a> = 0x0002 67 }</td></tr> 68<tr class="separator:gaaf8fd5f0e57d456151c951e0f3715fc4"><td class="memSeparator" colspan="2"> </td></tr> 69<tr class="memitem:ga94798fdadfbf49a7c658ace669a1d310"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01">WINDOW_FORMAT_RGBA_8888</a> = 1, 70<a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30">WINDOW_FORMAT_RGBX_8888</a> = 2, 71<a class="el" href="group___native_activity.html#gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259">WINDOW_FORMAT_RGB_565</a> = 4 72 }</td></tr> 73<tr class="separator:ga94798fdadfbf49a7c658ace669a1d310"><td class="memSeparator" colspan="2"> </td></tr> 74<tr class="memitem:gaf715e26dfffd1f8de1c18449e2770cff"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/> 75  <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa67363c129036872bc9dd29557e807508">AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON</a> = 0x00000001, 76<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6155e77ae4e12cc56fb3f6f55f56bf6f">AWINDOW_FLAG_DIM_BEHIND</a> = 0x00000002, 77<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7">AWINDOW_FLAG_BLUR_BEHIND</a> = 0x00000004, 78<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> = 0x00000008, 79<br/> 80  <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae9f1278ffa6fe9c12c2305d4f4de1450">AWINDOW_FLAG_NOT_TOUCHABLE</a> = 0x00000010, 81<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">AWINDOW_FLAG_NOT_TOUCH_MODAL</a> = 0x00000020, 82<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773">AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING</a> = 0x00000040, 83<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">AWINDOW_FLAG_KEEP_SCREEN_ON</a> = 0x00000080, 84<br/> 85  <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a">AWINDOW_FLAG_LAYOUT_IN_SCREEN</a> = 0x00000100, 86<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffade9722581a203ee0db25d42f4d2bd389">AWINDOW_FLAG_LAYOUT_NO_LIMITS</a> = 0x00000200, 87<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71">AWINDOW_FLAG_FULLSCREEN</a> = 0x00000400, 88<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa4c21235db629d3937f87ffe98cd6fe5d">AWINDOW_FLAG_FORCE_NOT_FULLSCREEN</a> = 0x00000800, 89<br/> 90  <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d">AWINDOW_FLAG_DITHER</a> = 0x00001000, 91<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa8ff70709a588a05781d7cb178b526cc0">AWINDOW_FLAG_SECURE</a> = 0x00002000, 92<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa80316264eeae9681a56c1a2297bf465a">AWINDOW_FLAG_SCALED</a> = 0x00004000, 93<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaa2fe4ee2307bb814a37a043de6d7d326">AWINDOW_FLAG_IGNORE_CHEEK_PRESSES</a> = 0x00008000, 94<br/> 95  <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa97b8542941bfe613bcf92357be89b563">AWINDOW_FLAG_LAYOUT_INSET_DECOR</a> = 0x00010000, 96<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659">AWINDOW_FLAG_ALT_FOCUSABLE_IM</a> = 0x00020000, 97<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa35229f75b3309bafdd828cbbf27d05b6">AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH</a> = 0x00040000, 98<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a> = 0x00080000, 99<br/> 100  <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa952ae6ceebe94d3f0d666454548b8824">AWINDOW_FLAG_SHOW_WALLPAPER</a> = 0x00100000, 101<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffac4deee26ac742bbd0bb4c44fda140a01">AWINDOW_FLAG_TURN_SCREEN_ON</a> = 0x00200000, 102<a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a">AWINDOW_FLAG_DISMISS_KEYGUARD</a> = 0x00400000 103<br/> 104 }</td></tr> 105<tr class="separator:gaf715e26dfffd1f8de1c18449e2770cff"><td class="memSeparator" colspan="2"> </td></tr> 106</table><table class="memberdecls"> 107<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> 108Functions</h2></td></tr> 109<tr class="memitem:ga4d872ae54a239704c06a0517e23cc0ad"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga4d872ae54a239704c06a0517e23cc0ad">ANativeActivity_finish</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity)</td></tr> 110<tr class="separator:ga4d872ae54a239704c06a0517e23cc0ad"><td class="memSeparator" colspan="2"> </td></tr> 111<tr class="memitem:gaec8b12decdf2b9841344e75c4c038c5a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaec8b12decdf2b9841344e75c4c038c5a">ANativeActivity_setWindowFormat</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, int32_t format)</td></tr> 112<tr class="separator:gaec8b12decdf2b9841344e75c4c038c5a"><td class="memSeparator" colspan="2"> </td></tr> 113<tr class="memitem:gaa1d091ca4a99b0ce570bab1c8c06f297"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaa1d091ca4a99b0ce570bab1c8c06f297">ANativeActivity_setWindowFlags</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t addFlags, uint32_t removeFlags)</td></tr> 114<tr class="separator:gaa1d091ca4a99b0ce570bab1c8c06f297"><td class="memSeparator" colspan="2"> </td></tr> 115<tr class="memitem:ga14eaeb6190f266369023b04d8ab9dba7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga14eaeb6190f266369023b04d8ab9dba7">ANativeActivity_showSoftInput</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t flags)</td></tr> 116<tr class="separator:ga14eaeb6190f266369023b04d8ab9dba7"><td class="memSeparator" colspan="2"> </td></tr> 117<tr class="memitem:gaf673d6efea7ce517ef46ff2551b25944"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gaf673d6efea7ce517ef46ff2551b25944">ANativeActivity_hideSoftInput</a> (<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, uint32_t flags)</td></tr> 118<tr class="separator:gaf673d6efea7ce517ef46ff2551b25944"><td class="memSeparator" colspan="2"> </td></tr> 119<tr class="memitem:ga533876b57909243b238927344a6592db"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">ANativeWindow_acquire</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr> 120<tr class="separator:ga533876b57909243b238927344a6592db"><td class="memSeparator" colspan="2"> </td></tr> 121<tr class="memitem:gae944e98865b902bd924663785d7b0258"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">ANativeWindow_release</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr> 122<tr class="separator:gae944e98865b902bd924663785d7b0258"><td class="memSeparator" colspan="2"> </td></tr> 123<tr class="memitem:ga186f0040c5cb405a63d93889bb9a4ff1"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga186f0040c5cb405a63d93889bb9a4ff1">ANativeWindow_getWidth</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr> 124<tr class="separator:ga186f0040c5cb405a63d93889bb9a4ff1"><td class="memSeparator" colspan="2"> </td></tr> 125<tr class="memitem:ga463ba99f6dee3edc1167a54e1ff7de15"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga463ba99f6dee3edc1167a54e1ff7de15">ANativeWindow_getHeight</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr> 126<tr class="separator:ga463ba99f6dee3edc1167a54e1ff7de15"><td class="memSeparator" colspan="2"> </td></tr> 127<tr class="memitem:ga9e3a492a8300146b30d864f0ab22bb2e"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga9e3a492a8300146b30d864f0ab22bb2e">ANativeWindow_getFormat</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr> 128<tr class="separator:ga9e3a492a8300146b30d864f0ab22bb2e"><td class="memSeparator" colspan="2"> </td></tr> 129<tr class="memitem:ga7b0652533998d61e1a3b542485889113"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga7b0652533998d61e1a3b542485889113">ANativeWindow_setBuffersGeometry</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window, int32_t width, int32_t height, int32_t format)</td></tr> 130<tr class="separator:ga7b0652533998d61e1a3b542485889113"><td class="memSeparator" colspan="2"> </td></tr> 131<tr class="memitem:ga0b0e3b7d442dee83e1a1b42e5b0caee6"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window, <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a> *outBuffer, <a class="el" href="struct_a_rect.html">ARect</a> *inOutDirtyBounds)</td></tr> 132<tr class="separator:ga0b0e3b7d442dee83e1a1b42e5b0caee6"><td class="memSeparator" colspan="2"> </td></tr> 133<tr class="memitem:ga4dc9b687ead9034fbc11bf2d90f203f9"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga4dc9b687ead9034fbc11bf2d90f203f9">ANativeWindow_unlockAndPost</a> (<a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> *window)</td></tr> 134<tr class="separator:ga4dc9b687ead9034fbc11bf2d90f203f9"><td class="memSeparator" colspan="2"> </td></tr> 135<tr class="memitem:ga774d0a87ec496b3940fcddccbc31fd9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">ANativeWindow_fromSurface</a> (JNIEnv *env, jobject surface)</td></tr> 136<tr class="separator:ga774d0a87ec496b3940fcddccbc31fd9d"><td class="memSeparator" colspan="2"> </td></tr> 137</table><table class="memberdecls"> 138<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> 139Variables</h2></td></tr> 140<tr class="memitem:ga02791d0d490839055169f39fdc905c5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___native_activity.html#ga02791d0d490839055169f39fdc905c5e">ANativeActivity_onCreate</a></td></tr> 141<tr class="separator:ga02791d0d490839055169f39fdc905c5e"><td class="memSeparator" colspan="2"> </td></tr> 142</table> 143<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> 144<h2 class="groupheader">Typedef Documentation</h2> 145<a class="anchor" id="ga8abd07923f37feb1ce724d139cc2609d"></a> 146<div class="memitem"> 147<div class="memproto"> 148 <table class="memname"> 149 <tr> 150 <td class="memname">typedef struct <a class="el" href="struct_a_native_activity.html">ANativeActivity</a> <a class="el" href="struct_a_native_activity.html">ANativeActivity</a></td> 151 </tr> 152 </table> 153</div><div class="memdoc"> 154<p>This structure defines the native side of an android.app.NativeActivity. It is created by the framework, and handed to the application's native code as it is being launched. </p> 155 156</div> 157</div> 158<a class="anchor" id="ga569a53bcac3fcedb0189b7c412ebcb22"></a> 159<div class="memitem"> 160<div class="memproto"> 161 <table class="memname"> 162 <tr> 163 <td class="memname">typedef void ANativeActivity_createFunc(<a class="el" href="struct_a_native_activity.html">ANativeActivity</a> *activity, void *savedState, size_t savedStateSize)</td> 164 </tr> 165 </table> 166</div><div class="memdoc"> 167<p>This is the function that must be in the native code to instantiate the application's native activity. It is called with the activity instance (see above); if the code is being instantiated from a previously saved instance, the savedState will be non-NULL and point to the saved data. You must make any copy of this data you need – it will be released after you return from this function. </p> 168 169</div> 170</div> 171<a class="anchor" id="ga28dca784e5ee939427135c72c0151c38"></a> 172<div class="memitem"> 173<div class="memproto"> 174 <table class="memname"> 175 <tr> 176 <td class="memname">typedef struct <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a> <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a></td> 177 </tr> 178 </table> 179</div><div class="memdoc"> 180<p>These are the callbacks the framework makes into a native application. All of these callbacks happen on the main thread of the application. By default, all callbacks are NULL; set to a pointer to your own function to have it called. </p> 181 182</div> 183</div> 184<a class="anchor" id="ga66956d540c2e3709e12156d195e64726"></a> 185<div class="memitem"> 186<div class="memproto"> 187 <table class="memname"> 188 <tr> 189 <td class="memname">typedef struct <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> <a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a></td> 190 </tr> 191 </table> 192</div><div class="memdoc"> 193<p><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> is opaque type that provides access to a native window.</p> 194<p>A pointer can be obtained using <a class="el" href="group___native_activity.html#ga774d0a87ec496b3940fcddccbc31fd9d">ANativeWindow_fromSurface()</a>. </p> 195 196</div> 197</div> 198<a class="anchor" id="gad0983ca473ce36293baf5e51a14c3357"></a> 199<div class="memitem"> 200<div class="memproto"> 201 <table class="memname"> 202 <tr> 203 <td class="memname">typedef struct <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a> <a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a></td> 204 </tr> 205 </table> 206</div><div class="memdoc"> 207<p><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> is a struct that represents a windows buffer.</p> 208<p>A pointer can be obtained using <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock()</a>. </p> 209 210</div> 211</div> 212<a class="anchor" id="gaa984a498f0e146ac57c6022a323423cf"></a> 213<div class="memitem"> 214<div class="memproto"> 215 <table class="memname"> 216 <tr> 217 <td class="memname">typedef struct <a class="el" href="struct_a_rect.html">ARect</a> <a class="el" href="struct_a_rect.html">ARect</a></td> 218 </tr> 219 </table> 220</div><div class="memdoc"> 221<p><a class="el" href="struct_a_rect.html">ARect</a> is a struct that represents a rectangular window area.</p> 222<p>It is used with <a class="el" href="struct_a_native_activity_callbacks.html#a61d30a43b3c77b6047afe951706f6a1e">ANativeActivityCallbacks::onContentRectChanged</a> event callback and <a class="el" href="group___native_activity.html#ga0b0e3b7d442dee83e1a1b42e5b0caee6">ANativeWindow_lock()</a> function. </p> 223 224</div> 225</div> 226<h2 class="groupheader">Enumeration Type Documentation</h2> 227<a class="anchor" id="ga39fca1837c5ce7715cbf571669660c13"></a> 228<div class="memitem"> 229<div class="memproto"> 230 <table class="memname"> 231 <tr> 232 <td class="memname">anonymous enum</td> 233 </tr> 234 </table> 235</div><div class="memdoc"> 236<p>Flags for ANativeActivity_showSoftInput; see the Java InputMethodManager API for documentation. </p> 237<table class="fieldtable"> 238<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga39fca1837c5ce7715cbf571669660c13a9b7250ac0e5a626a81b176462a9df7c9"></a>ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT</em> </td><td class="fielddoc"> 239<p>Implicit request to show the input window, not as the result of a direct request by the user. </p> 240</td></tr> 241<tr><td class="fieldname"><em><a class="anchor" id="gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5"></a>ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED</em> </td><td class="fielddoc"> 242<p>The user has forced the input method open (such as by long-pressing menu) so it should not be closed until they explicitly do so. </p> 243</td></tr> 244</table> 245 246</div> 247</div> 248<a class="anchor" id="gaaf8fd5f0e57d456151c951e0f3715fc4"></a> 249<div class="memitem"> 250<div class="memproto"> 251 <table class="memname"> 252 <tr> 253 <td class="memname">anonymous enum</td> 254 </tr> 255 </table> 256</div><div class="memdoc"> 257<p>Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager API for documentation. </p> 258<table class="fieldtable"> 259<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaaf8fd5f0e57d456151c951e0f3715fc4a642e76508cc737bbc1df149756c2a807"></a>ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY</em> </td><td class="fielddoc"> 260<p>The soft input window should only be hidden if it was not explicitly shown by the user. </p> 261</td></tr> 262<tr><td class="fieldname"><em><a class="anchor" id="ggaaf8fd5f0e57d456151c951e0f3715fc4a0f4cbb55fa4c29b963b7b37d13352e6f"></a>ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS</em> </td><td class="fielddoc"> 263<p>The soft input window should normally be hidden, unless it was originally shown with <a class="el" href="group___native_activity.html#gga39fca1837c5ce7715cbf571669660c13a324062ac78fab16b40e8de1b1ae173b5">ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED</a>. </p> 264</td></tr> 265</table> 266 267</div> 268</div> 269<a class="anchor" id="ga94798fdadfbf49a7c658ace669a1d310"></a> 270<div class="memitem"> 271<div class="memproto"> 272 <table class="memname"> 273 <tr> 274 <td class="memname">anonymous enum</td> 275 </tr> 276 </table> 277</div><div class="memdoc"> 278<p>Pixel formats that a window can use. </p> 279<table class="fieldtable"> 280<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga94798fdadfbf49a7c658ace669a1d310a6a165383340acce0b32c555dd2ac2c01"></a>WINDOW_FORMAT_RGBA_8888</em> </td><td class="fielddoc"> 281<p>Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. </p> 282</td></tr> 283<tr><td class="fieldname"><em><a class="anchor" id="gga94798fdadfbf49a7c658ace669a1d310a5f83a97ccf64fc1554c220476e8aaf30"></a>WINDOW_FORMAT_RGBX_8888</em> </td><td class="fielddoc"> 284<p>Red: 8 bits, Green: 8 bits, Blue: 8 bits, Unused: 8 bits. </p> 285</td></tr> 286<tr><td class="fieldname"><em><a class="anchor" id="gga94798fdadfbf49a7c658ace669a1d310ab26fa9c38f169263b611a8b757bb0259"></a>WINDOW_FORMAT_RGB_565</em> </td><td class="fielddoc"> 287<p>Red: 5 bits, Green: 6 bits, Blue: 5 bits. </p> 288</td></tr> 289</table> 290 291</div> 292</div> 293<a class="anchor" id="gaf715e26dfffd1f8de1c18449e2770cff"></a> 294<div class="memitem"> 295<div class="memproto"> 296 <table class="memname"> 297 <tr> 298 <td class="memname">anonymous enum</td> 299 </tr> 300 </table> 301</div><div class="memdoc"> 302<p>Window flags, as per the Java API at android.view.WindowManager.LayoutParams. </p> 303<table class="fieldtable"> 304<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa67363c129036872bc9dd29557e807508"></a>AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON</em> </td><td class="fielddoc"> 305<p>As long as this window is visible to the user, allow the lock screen to activate while the screen is on. This can be used independently, or in combination with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">AWINDOW_FLAG_KEEP_SCREEN_ON</a> and/or <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a> </p> 306</td></tr> 307<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa6155e77ae4e12cc56fb3f6f55f56bf6f"></a>AWINDOW_FLAG_DIM_BEHIND</em> </td><td class="fielddoc"> 308<p>Everything behind this window will be dimmed. </p> 309</td></tr> 310<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa0377f46a626d411ace179c1c27d0a3f7"></a>AWINDOW_FLAG_BLUR_BEHIND</em> </td><td class="fielddoc"> 311<p>Blur everything behind this window. </p> 312<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>Blurring is no longer supported. </dd></dl> 313</td></tr> 314<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f"></a>AWINDOW_FLAG_NOT_FOCUSABLE</em> </td><td class="fielddoc"> 315<p>This window won't ever get key input focus, so the user can not send key or other button events to it. Those will instead go to whatever focusable window is behind it. This flag will also enable <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">AWINDOW_FLAG_NOT_TOUCH_MODAL</a> whether or not that is explicitly set.</p> 316<p>Setting this flag also implies that the window will not need to interact with a soft input method, so it will be Z-ordered and positioned independently of any active input method (typically this means it gets Z-ordered on top of the input method, so it can use the full screen for its content and cover the input method if needed. You can use <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659">AWINDOW_FLAG_ALT_FOCUSABLE_IM</a> to modify this behavior. </p> 317</td></tr> 318<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffae9f1278ffa6fe9c12c2305d4f4de1450"></a>AWINDOW_FLAG_NOT_TOUCHABLE</em> </td><td class="fielddoc"> 319<p>this window can never receive touch events. </p> 320</td></tr> 321<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09"></a>AWINDOW_FLAG_NOT_TOUCH_MODAL</em> </td><td class="fielddoc"> 322<p>Even when this window is focusable (its <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> is not set), allow any pointer events outside of the window to be sent to the windows behind it. Otherwise it will consume all pointer events itself, regardless of whether they are inside of the window. </p> 323</td></tr> 324<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa5574a513645e6e7cb4d6a9f4a043d773"></a>AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING</em> </td><td class="fielddoc"> 325<p>When set, if the device is asleep when the touch screen is pressed, you will receive this first touch event. Usually the first touch event is consumed by the system since the user can not see what they are pressing on.</p> 326<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000005">Deprecated:</a></b></dt><dd>This flag has no effect. </dd></dl> 327</td></tr> 328<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8"></a>AWINDOW_FLAG_KEEP_SCREEN_ON</em> </td><td class="fielddoc"> 329<p>As long as this window is visible to the user, keep the device's screen turned on and bright. </p> 330</td></tr> 331<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a"></a>AWINDOW_FLAG_LAYOUT_IN_SCREEN</em> </td><td class="fielddoc"> 332<p>Place the window within the entire screen, ignoring decorations around the border (such as the status bar). The window must correctly position its contents to take the screen decoration into account. </p> 333</td></tr> 334<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffade9722581a203ee0db25d42f4d2bd389"></a>AWINDOW_FLAG_LAYOUT_NO_LIMITS</em> </td><td class="fielddoc"> 335<p>allow window to extend outside of the screen. </p> 336</td></tr> 337<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71"></a>AWINDOW_FLAG_FULLSCREEN</em> </td><td class="fielddoc"> 338<p>Hide all screen decorations (such as the status bar) while this window is displayed. This allows the window to use the entire display space for itself – the status bar will be hidden when an app window with this flag set is on the top layer. A fullscreen window will ignore a value of <a class="el" href="">AWINDOW_SOFT_INPUT_ADJUST_RESIZE</a>; the window will stay fullscreen and will not resize. </p> 339</td></tr> 340<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa4c21235db629d3937f87ffe98cd6fe5d"></a>AWINDOW_FLAG_FORCE_NOT_FULLSCREEN</em> </td><td class="fielddoc"> 341<p>Override <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaca1f1d91313d7c32bb7982d8a5abcd71">AWINDOW_FLAG_FULLSCREEN</a> and force the screen decorations (such as the status bar) to be shown. </p> 342</td></tr> 343<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffae73488b436aaea163ba2f7051bf93d9d"></a>AWINDOW_FLAG_DITHER</em> </td><td class="fielddoc"> 344<p>Turn on dithering when compositing this window to the screen. </p> 345<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>This flag is no longer used. </dd></dl> 346</td></tr> 347<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa8ff70709a588a05781d7cb178b526cc0"></a>AWINDOW_FLAG_SECURE</em> </td><td class="fielddoc"> 348<p>Treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays. </p> 349</td></tr> 350<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa80316264eeae9681a56c1a2297bf465a"></a>AWINDOW_FLAG_SCALED</em> </td><td class="fielddoc"> 351<p>A special mode where the layout parameters are used to perform scaling of the surface when it is composited to the screen. </p> 352</td></tr> 353<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffaa2fe4ee2307bb814a37a043de6d7d326"></a>AWINDOW_FLAG_IGNORE_CHEEK_PRESSES</em> </td><td class="fielddoc"> 354<p>Intended for windows that will often be used when the user is holding the screen against their face, it will aggressively filter the event stream to prevent unintended presses in this situation that may not be desired for a particular window, when such an event stream is detected, the application will receive a <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a3952b960f5eb8c4f55b42741e286b74e">AMOTION_EVENT_ACTION_CANCEL</a> to indicate this so applications can handle this accordingly by taking no action on the event until the finger is released. </p> 355</td></tr> 356<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa97b8542941bfe613bcf92357be89b563"></a>AWINDOW_FLAG_LAYOUT_INSET_DECOR</em> </td><td class="fielddoc"> 357<p>A special option only for use in combination with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa6978968d7e0dc1a0e12f58ad395a959a">AWINDOW_FLAG_LAYOUT_IN_SCREEN</a>. When requesting layout in the screen your window may appear on top of or behind screen decorations such as the status bar. By also including this flag, the window manager will report the inset rectangle needed to ensure your content is not covered by screen decorations. </p> 358</td></tr> 359<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa961ff4c9c0903cfb8867d961bebe1659"></a>AWINDOW_FLAG_ALT_FOCUSABLE_IM</em> </td><td class="fielddoc"> 360<p>Invert the state of <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> with respect to how this window interacts with the current method. That is, if FLAG_NOT_FOCUSABLE is set and this flag is set, then the window will behave as if it needs to interact with the input method and thus be placed behind/away from it; if <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffab5f19f59dd6b2601e4d1a7ff533bc50f">AWINDOW_FLAG_NOT_FOCUSABLE</a> is not set and this flag is set, then the window will behave as if it doesn't need to interact with the input method and can be placed to use more space and cover the input method. </p> 361</td></tr> 362<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa35229f75b3309bafdd828cbbf27d05b6"></a>AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH</em> </td><td class="fielddoc"> 363<p>If you have set <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa5ef903c3617dd33e3c22f567abd64b09">AWINDOW_FLAG_NOT_TOUCH_MODAL</a>, you can set this flag to receive a single special MotionEvent with the action <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">AMOTION_EVENT_ACTION_OUTSIDE</a> for touches that occur outside of your window. Note that you will not receive the full down/move/up gesture, only the location of the first down as an <a class="el" href="group___input.html#ggabed82baf7f470b522273a3e37c24c600a7c3c96b74af4c8304b8137ac6d201517">AMOTION_EVENT_ACTION_OUTSIDE</a>. </p> 364</td></tr> 365<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b"></a>AWINDOW_FLAG_SHOW_WHEN_LOCKED</em> </td><td class="fielddoc"> 366<p>Special flag to let windows be shown when the screen is locked. This will let application windows take precedence over key guard or any other lock screens. Can be used with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffaf6f66a498bd3bda8d51b6983eb2a99d8">AWINDOW_FLAG_KEEP_SCREEN_ON</a> to turn screen on and display windows directly before showing the key guard window. Can be used with <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a">AWINDOW_FLAG_DISMISS_KEYGUARD</a> to automatically fully dismisss non-secure keyguards. This flag only applies to the top-most full-screen window. </p> 367</td></tr> 368<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa952ae6ceebe94d3f0d666454548b8824"></a>AWINDOW_FLAG_SHOW_WALLPAPER</em> </td><td class="fielddoc"> 369<p>Ask that the system wallpaper be shown behind your window. The window surface must be translucent to be able to actually see the wallpaper behind it; this flag just ensures that the wallpaper surface will be there if this window actually has translucent regions. </p> 370</td></tr> 371<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffac4deee26ac742bbd0bb4c44fda140a01"></a>AWINDOW_FLAG_TURN_SCREEN_ON</em> </td><td class="fielddoc"> 372<p>When set as a window is being added or made visible, once the window has been shown then the system will poke the power manager's user activity (as if the user had woken up the device) to turn the screen on. </p> 373</td></tr> 374<tr><td class="fieldname"><em><a class="anchor" id="ggaf715e26dfffd1f8de1c18449e2770cffa37c1077a12f1c8c6805b1da6f7bb213a"></a>AWINDOW_FLAG_DISMISS_KEYGUARD</em> </td><td class="fielddoc"> 375<p>When set the window will cause the keyguard to be dismissed, only if it is not a secure lock keyguard. Because such a keyguard is not needed for security, it will never re-appear if the user navigates to another window (in contrast to <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a>, which will only temporarily hide both secure and non-secure keyguards but ensure they reappear when the user moves to another UI that doesn't hide them). If the keyguard is currently active and is secure (requires an unlock pattern) than the user will still need to confirm it before seeing this window, unless <a class="el" href="group___native_activity.html#ggaf715e26dfffd1f8de1c18449e2770cffa549f08950ef1ed3a334338d08ced1c3b">AWINDOW_FLAG_SHOW_WHEN_LOCKED</a> has also been set. </p> 376</td></tr> 377</table> 378 379</div> 380</div> 381<h2 class="groupheader">Function Documentation</h2> 382<a class="anchor" id="ga4d872ae54a239704c06a0517e23cc0ad"></a> 383<div class="memitem"> 384<div class="memproto"> 385 <table class="memname"> 386 <tr> 387 <td class="memname">void ANativeActivity_finish </td> 388 <td>(</td> 389 <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> * </td> 390 <td class="paramname"><em>activity</em></td><td>)</td> 391 <td></td> 392 </tr> 393 </table> 394</div><div class="memdoc"> 395<p>Finish the given activity. Its finish() method will be called, causing it to be stopped and destroyed. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p> 396 397</div> 398</div> 399<a class="anchor" id="gaf673d6efea7ce517ef46ff2551b25944"></a> 400<div class="memitem"> 401<div class="memproto"> 402 <table class="memname"> 403 <tr> 404 <td class="memname">void ANativeActivity_hideSoftInput </td> 405 <td>(</td> 406 <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> * </td> 407 <td class="paramname"><em>activity</em>, </td> 408 </tr> 409 <tr> 410 <td class="paramkey"></td> 411 <td></td> 412 <td class="paramtype">uint32_t </td> 413 <td class="paramname"><em>flags</em> </td> 414 </tr> 415 <tr> 416 <td></td> 417 <td>)</td> 418 <td></td><td></td> 419 </tr> 420 </table> 421</div><div class="memdoc"> 422<p>Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput() for the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p> 423 424</div> 425</div> 426<a class="anchor" id="gaa1d091ca4a99b0ce570bab1c8c06f297"></a> 427<div class="memitem"> 428<div class="memproto"> 429 <table class="memname"> 430 <tr> 431 <td class="memname">void ANativeActivity_setWindowFlags </td> 432 <td>(</td> 433 <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> * </td> 434 <td class="paramname"><em>activity</em>, </td> 435 </tr> 436 <tr> 437 <td class="paramkey"></td> 438 <td></td> 439 <td class="paramtype">uint32_t </td> 440 <td class="paramname"><em>addFlags</em>, </td> 441 </tr> 442 <tr> 443 <td class="paramkey"></td> 444 <td></td> 445 <td class="paramtype">uint32_t </td> 446 <td class="paramname"><em>removeFlags</em> </td> 447 </tr> 448 <tr> 449 <td></td> 450 <td>)</td> 451 <td></td><td></td> 452 </tr> 453 </table> 454</div><div class="memdoc"> 455<p>Change the window flags of the given activity. Calls getWindow().setFlags() of the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. See <a class="el" href="window_8h.html">window.h</a> for flag constants. </p> 456 457</div> 458</div> 459<a class="anchor" id="gaec8b12decdf2b9841344e75c4c038c5a"></a> 460<div class="memitem"> 461<div class="memproto"> 462 <table class="memname"> 463 <tr> 464 <td class="memname">void ANativeActivity_setWindowFormat </td> 465 <td>(</td> 466 <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> * </td> 467 <td class="paramname"><em>activity</em>, </td> 468 </tr> 469 <tr> 470 <td class="paramkey"></td> 471 <td></td> 472 <td class="paramtype">int32_t </td> 473 <td class="paramname"><em>format</em> </td> 474 </tr> 475 <tr> 476 <td></td> 477 <td>)</td> 478 <td></td><td></td> 479 </tr> 480 </table> 481</div><div class="memdoc"> 482<p>Change the window format of the given activity. Calls getWindow().setFormat() of the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p> 483 484</div> 485</div> 486<a class="anchor" id="ga14eaeb6190f266369023b04d8ab9dba7"></a> 487<div class="memitem"> 488<div class="memproto"> 489 <table class="memname"> 490 <tr> 491 <td class="memname">void ANativeActivity_showSoftInput </td> 492 <td>(</td> 493 <td class="paramtype"><a class="el" href="struct_a_native_activity.html">ANativeActivity</a> * </td> 494 <td class="paramname"><em>activity</em>, </td> 495 </tr> 496 <tr> 497 <td class="paramkey"></td> 498 <td></td> 499 <td class="paramtype">uint32_t </td> 500 <td class="paramname"><em>flags</em> </td> 501 </tr> 502 <tr> 503 <td></td> 504 <td>)</td> 505 <td></td><td></td> 506 </tr> 507 </table> 508</div><div class="memdoc"> 509<p>Show the IME while in the given activity. Calls InputMethodManager.showSoftInput() for the given activity. Note that this method can be called from <em>any</em> thread; it will send a message to the main thread of the process where the Java finish call will take place. </p> 510 511</div> 512</div> 513<a class="anchor" id="ga533876b57909243b238927344a6592db"></a> 514<div class="memitem"> 515<div class="memproto"> 516 <table class="memname"> 517 <tr> 518 <td class="memname">void ANativeWindow_acquire </td> 519 <td>(</td> 520 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 521 <td class="paramname"><em>window</em></td><td>)</td> 522 <td></td> 523 </tr> 524 </table> 525</div><div class="memdoc"> 526<p>Acquire a reference on the given ANativeWindow object. This prevents the object from being deleted until the reference is removed. </p> 527 528</div> 529</div> 530<a class="anchor" id="ga774d0a87ec496b3940fcddccbc31fd9d"></a> 531<div class="memitem"> 532<div class="memproto"> 533 <table class="memname"> 534 <tr> 535 <td class="memname"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a>* ANativeWindow_fromSurface </td> 536 <td>(</td> 537 <td class="paramtype">JNIEnv * </td> 538 <td class="paramname"><em>env</em>, </td> 539 </tr> 540 <tr> 541 <td class="paramkey"></td> 542 <td></td> 543 <td class="paramtype">jobject </td> 544 <td class="paramname"><em>surface</em> </td> 545 </tr> 546 <tr> 547 <td></td> 548 <td>)</td> 549 <td></td><td></td> 550 </tr> 551 </table> 552</div><div class="memdoc"> 553<p>Return the ANativeWindow associated with a Java Surface object, for interacting with it through native code. This acquires a reference on the ANativeWindow that is returned; be sure to use <a class="el" href="group___native_activity.html#gae944e98865b902bd924663785d7b0258">ANativeWindow_release()</a> when done with it so that it doesn't leak. </p> 554 555</div> 556</div> 557<a class="anchor" id="ga9e3a492a8300146b30d864f0ab22bb2e"></a> 558<div class="memitem"> 559<div class="memproto"> 560 <table class="memname"> 561 <tr> 562 <td class="memname">int32_t ANativeWindow_getFormat </td> 563 <td>(</td> 564 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 565 <td class="paramname"><em>window</em></td><td>)</td> 566 <td></td> 567 </tr> 568 </table> 569</div><div class="memdoc"> 570<p>Return the current pixel format of the window surface. Returns a negative value on error. </p> 571 572</div> 573</div> 574<a class="anchor" id="ga463ba99f6dee3edc1167a54e1ff7de15"></a> 575<div class="memitem"> 576<div class="memproto"> 577 <table class="memname"> 578 <tr> 579 <td class="memname">int32_t ANativeWindow_getHeight </td> 580 <td>(</td> 581 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 582 <td class="paramname"><em>window</em></td><td>)</td> 583 <td></td> 584 </tr> 585 </table> 586</div><div class="memdoc"> 587<p>Return the current height in pixels of the window surface. Returns a negative value on error. </p> 588 589</div> 590</div> 591<a class="anchor" id="ga186f0040c5cb405a63d93889bb9a4ff1"></a> 592<div class="memitem"> 593<div class="memproto"> 594 <table class="memname"> 595 <tr> 596 <td class="memname">int32_t ANativeWindow_getWidth </td> 597 <td>(</td> 598 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 599 <td class="paramname"><em>window</em></td><td>)</td> 600 <td></td> 601 </tr> 602 </table> 603</div><div class="memdoc"> 604<p>Return the current width in pixels of the window surface. Returns a negative value on error. </p> 605 606</div> 607</div> 608<a class="anchor" id="ga0b0e3b7d442dee83e1a1b42e5b0caee6"></a> 609<div class="memitem"> 610<div class="memproto"> 611 <table class="memname"> 612 <tr> 613 <td class="memname">int32_t ANativeWindow_lock </td> 614 <td>(</td> 615 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 616 <td class="paramname"><em>window</em>, </td> 617 </tr> 618 <tr> 619 <td class="paramkey"></td> 620 <td></td> 621 <td class="paramtype"><a class="el" href="struct_a_native_window___buffer.html">ANativeWindow_Buffer</a> * </td> 622 <td class="paramname"><em>outBuffer</em>, </td> 623 </tr> 624 <tr> 625 <td class="paramkey"></td> 626 <td></td> 627 <td class="paramtype"><a class="el" href="struct_a_rect.html">ARect</a> * </td> 628 <td class="paramname"><em>inOutDirtyBounds</em> </td> 629 </tr> 630 <tr> 631 <td></td> 632 <td>)</td> 633 <td></td><td></td> 634 </tr> 635 </table> 636</div><div class="memdoc"> 637<p>Lock the window's next drawing surface for writing. inOutDirtyBounds is used as an in/out parameter, upon entering the function, it contains the dirty region, that is, the region the caller intends to redraw. When the function returns, inOutDirtyBounds is updated with the actual area the caller needs to redraw – this region is often extended by ANativeWindow_lock. </p> 638 639</div> 640</div> 641<a class="anchor" id="gae944e98865b902bd924663785d7b0258"></a> 642<div class="memitem"> 643<div class="memproto"> 644 <table class="memname"> 645 <tr> 646 <td class="memname">void ANativeWindow_release </td> 647 <td>(</td> 648 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 649 <td class="paramname"><em>window</em></td><td>)</td> 650 <td></td> 651 </tr> 652 </table> 653</div><div class="memdoc"> 654<p>Remove a reference that was previously acquired with <a class="el" href="group___native_activity.html#ga533876b57909243b238927344a6592db">ANativeWindow_acquire()</a>. </p> 655 656</div> 657</div> 658<a class="anchor" id="ga7b0652533998d61e1a3b542485889113"></a> 659<div class="memitem"> 660<div class="memproto"> 661 <table class="memname"> 662 <tr> 663 <td class="memname">int32_t ANativeWindow_setBuffersGeometry </td> 664 <td>(</td> 665 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 666 <td class="paramname"><em>window</em>, </td> 667 </tr> 668 <tr> 669 <td class="paramkey"></td> 670 <td></td> 671 <td class="paramtype">int32_t </td> 672 <td class="paramname"><em>width</em>, </td> 673 </tr> 674 <tr> 675 <td class="paramkey"></td> 676 <td></td> 677 <td class="paramtype">int32_t </td> 678 <td class="paramname"><em>height</em>, </td> 679 </tr> 680 <tr> 681 <td class="paramkey"></td> 682 <td></td> 683 <td class="paramtype">int32_t </td> 684 <td class="paramname"><em>format</em> </td> 685 </tr> 686 <tr> 687 <td></td> 688 <td>)</td> 689 <td></td><td></td> 690 </tr> 691 </table> 692</div><div class="memdoc"> 693<p>Change the format and size of the window buffers.</p> 694<p>The width and height control the number of pixels in the buffers, not the dimensions of the window on screen. If these are different than the window's physical size, then it buffer will be scaled to match that size when compositing it to the screen.</p> 695<p>For all of these parameters, if 0 is supplied then the window's base value will come back in force.</p> 696<p>width and height must be either both zero or both non-zero. </p> 697 698</div> 699</div> 700<a class="anchor" id="ga4dc9b687ead9034fbc11bf2d90f203f9"></a> 701<div class="memitem"> 702<div class="memproto"> 703 <table class="memname"> 704 <tr> 705 <td class="memname">int32_t ANativeWindow_unlockAndPost </td> 706 <td>(</td> 707 <td class="paramtype"><a class="el" href="group___native_activity.html#ga66956d540c2e3709e12156d195e64726">ANativeWindow</a> * </td> 708 <td class="paramname"><em>window</em></td><td>)</td> 709 <td></td> 710 </tr> 711 </table> 712</div><div class="memdoc"> 713<p>Unlock the window's drawing surface after previously locking it, posting the new buffer to the display. </p> 714 715</div> 716</div> 717<h2 class="groupheader">Variable Documentation</h2> 718<a class="anchor" id="ga02791d0d490839055169f39fdc905c5e"></a> 719<div class="memitem"> 720<div class="memproto"> 721 <table class="memname"> 722 <tr> 723 <td class="memname"><a class="el" href="group___native_activity.html#ga569a53bcac3fcedb0189b7c412ebcb22">ANativeActivity_createFunc</a> ANativeActivity_onCreate</td> 724 </tr> 725 </table> 726</div><div class="memdoc"> 727<p>The name of the function that NativeInstance looks for when launching its native code. This is the default function that is used, you can specify "android.app.func_name" string meta-data in your manifest to use a different function. </p> 728 729</div> 730</div> 731</div><!-- contents --> 732