├── app ├── src │ └── main │ │ ├── assets │ │ ├── Verify │ │ │ ├── set1.XY │ │ │ ├── set13.XY │ │ │ ├── set3.XY │ │ │ ├── set4.XY │ │ │ ├── set6.XY │ │ │ ├── set9.XY │ │ │ ├── setb.XY │ │ │ ├── setbb.XY │ │ │ ├── set10.XY │ │ │ ├── set11.XY │ │ │ ├── set12.XY │ │ │ ├── set5.XY │ │ │ ├── set7.XY │ │ │ ├── set8.XY │ │ │ └── set2.XY │ │ ├── font │ │ │ ├── update │ │ │ ├── a.ttf │ │ │ └── b.ttf │ │ ├── img │ │ │ ├── data │ │ │ ├── a1.png │ │ │ ├── a2.png │ │ │ ├── a3.png │ │ │ ├── a4.png │ │ │ ├── a5.png │ │ │ ├── b1.png │ │ │ ├── b2.png │ │ │ ├── c1.png │ │ │ ├── c2.png │ │ │ ├── c3.png │ │ │ ├── c4.png │ │ │ ├── d1.png │ │ │ ├── e1.png │ │ │ ├── e2.png │ │ │ ├── f1.png │ │ │ ├── f10.png │ │ │ ├── f11.png │ │ │ ├── f12.png │ │ │ ├── f2.png │ │ │ ├── f3.png │ │ │ ├── f4.png │ │ │ ├── f5.png │ │ │ ├── f6.png │ │ │ ├── f7.png │ │ │ ├── f8.png │ │ │ ├── f9.png │ │ │ ├── check_on.png │ │ │ └── check_off.png │ │ ├── layouthelper │ │ │ ├── .using │ │ │ ├── init.lua │ │ │ └── layout.lua │ │ ├── file.png │ │ ├── icon.png │ │ ├── res │ │ │ ├── a.png │ │ │ ├── b.png │ │ │ ├── c.png │ │ │ ├── a1.png │ │ │ ├── a2.png │ │ │ ├── a3.png │ │ │ ├── b1.png │ │ │ ├── b2.png │ │ │ ├── b3.png │ │ │ ├── bft.png │ │ │ ├── d1.png │ │ │ ├── d2.png │ │ │ ├── d3.png │ │ │ ├── d4.png │ │ │ ├── set.png │ │ │ ├── end1.png │ │ │ ├── end2.png │ │ │ ├── end3.png │ │ │ ├── end4.png │ │ │ ├── end5.png │ │ │ ├── search.png │ │ │ ├── ThomeLua1.png │ │ │ ├── ThomeLua10.png │ │ │ ├── ThomeLua11.png │ │ │ ├── ThomeLua2.png │ │ │ ├── ThomeLua3.png │ │ │ ├── ThomeLua4.png │ │ │ ├── ThomeLua5.png │ │ │ ├── ThomeLua6.png │ │ │ ├── ThomeLua7.png │ │ │ ├── ThomeLua8.png │ │ │ └── ThomeLua9.png │ │ ├── folder.png │ │ ├── imgs │ │ │ ├── A1.png │ │ │ ├── A2.png │ │ │ ├── A3.png │ │ │ ├── A4.png │ │ │ ├── My.png │ │ │ ├── qq.png │ │ │ ├── Add.png │ │ │ ├── Item.png │ │ │ ├── Other.png │ │ │ ├── Send.png │ │ │ ├── Set.png │ │ │ ├── Teach.png │ │ │ ├── User.png │ │ │ ├── clear.png │ │ │ ├── find.png │ │ │ ├── Donate.png │ │ │ ├── Logout.png │ │ │ ├── Search.png │ │ │ ├── Community.png │ │ │ ├── ThomeLua1.png │ │ │ ├── ThomeLua2.png │ │ │ ├── ThomeLua3.png │ │ │ ├── ThomeLua4.png │ │ │ └── Source Code.png │ │ ├── res3 │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ └── 5.png │ │ ├── image │ │ │ ├── a0.png │ │ │ ├── a1.png │ │ │ ├── a10.png │ │ │ ├── a11.png │ │ │ ├── a2.png │ │ │ ├── a3.png │ │ │ ├── a4.png │ │ │ ├── a5.png │ │ │ ├── a6.png │ │ │ ├── a7.png │ │ │ ├── a8.png │ │ │ └── a9.png │ │ ├── libs │ │ │ ├── mao.odex │ │ │ ├── mao.vdex │ │ │ ├── sign.odex │ │ │ ├── sign.vdex │ │ │ ├── oat │ │ │ │ ├── arm │ │ │ │ │ ├── okh.odex │ │ │ │ │ ├── okh.vdex │ │ │ │ │ ├── classes.odex │ │ │ │ │ ├── classes.vdex │ │ │ │ │ ├── android-support-v4.odex │ │ │ │ │ └── android-support-v4.vdex │ │ │ │ └── arm64 │ │ │ │ │ ├── okh.odex │ │ │ │ │ ├── okh.vdex │ │ │ │ │ ├── classes.odex │ │ │ │ │ ├── classes.vdex │ │ │ │ │ ├── android-support-v4.odex │ │ │ │ │ └── android-support-v4.vdex │ │ │ └── oat1 │ │ │ │ └── arm │ │ │ │ ├── classes.odex │ │ │ │ └── classes.vdex │ │ ├── picture │ │ │ ├── a1.png │ │ │ ├── a2.png │ │ │ ├── a3.png │ │ │ ├── a4.png │ │ │ ├── a5.png │ │ │ ├── b1.png │ │ │ ├── b2.png │ │ │ ├── b3.png │ │ │ ├── b4.png │ │ │ ├── 1642739853191.png │ │ │ ├── privatemsg_chat_my_bg.9.png │ │ │ └── privatemsg_chat_other_bg.9.png │ │ ├── res2 │ │ │ ├── apk.png │ │ │ ├── file.png │ │ │ ├── image.png │ │ │ ├── music.png │ │ │ ├── pdf.png │ │ │ ├── text.png │ │ │ ├── video.png │ │ │ ├── xml.png │ │ │ ├── folder.png │ │ │ └── compression.png │ │ ├── keys │ │ │ ├── keystore.ks │ │ │ ├── testkey.pk8 │ │ │ ├── testkey.sbt │ │ │ └── platform.pk8 │ │ ├── oat │ │ │ ├── arm │ │ │ │ ├── mao.odex │ │ │ │ ├── mao.vdex │ │ │ │ ├── sign.odex │ │ │ │ └── sign.vdex │ │ │ └── arm64 │ │ │ │ ├── mao.odex │ │ │ │ ├── mao.vdex │ │ │ │ ├── sign.odex │ │ │ │ └── sign.vdex │ │ ├── javaapi │ │ │ ├── init.lua │ │ │ ├── layout.aly │ │ │ ├── mlayout.aly │ │ │ └── clayout.aly │ │ ├── plugin │ │ │ ├── layout.aly │ │ │ ├── init.lua │ │ │ └── item.aly │ │ ├── Community.aly │ │ ├── other.lua │ │ ├── toast.lua │ │ └── init.lua │ │ ├── jni │ │ ├── lfs │ │ │ ├── .gitignore │ │ │ ├── lfs.def │ │ │ └── lfs.h │ │ ├── Application.mk │ │ ├── Android.mk │ │ ├── luayaml │ │ │ ├── README │ │ │ ├── b64.h │ │ │ ├── TODO │ │ │ ├── Android.mk │ │ │ ├── HISTORY │ │ │ ├── Makefile │ │ │ ├── README.LibYAML │ │ │ ├── LICENSE │ │ │ └── LICENSE.LibYAML │ │ ├── tcc │ │ │ ├── arm-gen.c │ │ │ ├── include │ │ │ │ ├── stdbool.h │ │ │ │ ├── varargs.h │ │ │ │ ├── stddef.h │ │ │ │ ├── stdarg.h │ │ │ │ └── float.h │ │ │ ├── stab.h │ │ │ ├── Android.mk2 │ │ │ └── config.h │ │ ├── crypt │ │ │ ├── lcrypt.h │ │ │ └── Android.mk │ │ ├── lsqlite3 │ │ │ ├── lsqlite3.h │ │ │ └── Android.mk2 │ │ ├── zlib │ │ │ ├── lua_zlib.h │ │ │ └── Android.mk │ │ ├── lua │ │ │ ├── lua.hpp │ │ │ ├── lapi.h │ │ │ ├── lfs.h │ │ │ ├── lundump.h │ │ │ ├── lprefix.h │ │ │ ├── Android.mk │ │ │ ├── lualib.h │ │ │ └── ldebug.h │ │ ├── xml │ │ │ └── Android.mk │ │ ├── bson │ │ │ └── Android.mk │ │ ├── canvas │ │ │ └── Android.mk │ │ ├── cjson │ │ │ ├── Android.mk │ │ │ └── fpconv.h │ │ ├── md5 │ │ │ ├── Android.mk │ │ │ ├── md5.h │ │ │ ├── README │ │ │ ├── compat-5.2.h │ │ │ └── compat-5.2.c │ │ ├── regex │ │ │ └── Android.mk │ │ ├── sensor │ │ │ ├── Android.mk │ │ │ ├── luasensor.h │ │ │ └── test_sensor.lua │ │ ├── luagl │ │ │ ├── Android.mk │ │ │ └── luagl_const.h │ │ ├── luajava │ │ │ ├── Android.mk │ │ │ └── luajava.h │ │ ├── lluv │ │ │ ├── lluv │ │ │ │ ├── lluv_dns.h │ │ │ │ ├── lluv_misc.h │ │ │ │ ├── lluv_fs.h │ │ │ │ ├── lluv_tty.h │ │ │ │ ├── lluv_udp.h │ │ │ │ ├── lluv_idle.h │ │ │ │ ├── lluv_poll.h │ │ │ │ ├── lluv_check.h │ │ │ │ ├── lluv_timer.h │ │ │ │ ├── lluv_signal.h │ │ │ │ ├── lluv_fs_poll.h │ │ │ │ ├── lluv_prepare.h │ │ │ │ ├── lluv_process.h │ │ │ │ ├── lluv_fs_event.h │ │ │ │ ├── lluv_tcp.h │ │ │ │ ├── lluv_pipe.h │ │ │ │ ├── lluv.h │ │ │ │ ├── lluv_fbuf.h │ │ │ │ ├── lluv_stream.h │ │ │ │ ├── lluv_error.h │ │ │ │ ├── lluv_req.h │ │ │ │ └── lluv_list.h │ │ │ └── uv │ │ │ │ ├── win │ │ │ │ ├── detect-wakeup.c │ │ │ │ └── req.c │ │ │ │ └── unix │ │ │ │ ├── posix-hrtime.c │ │ │ │ └── sysinfo-loadavg.c │ │ ├── socket │ │ │ ├── select.h │ │ │ ├── unix.h │ │ │ ├── Android.mk │ │ │ ├── udp.h │ │ │ ├── wsocket.h │ │ │ ├── timeout.h │ │ │ ├── tcp.h │ │ │ ├── mime.h │ │ │ ├── luasocket.h │ │ │ ├── io.c │ │ │ ├── pierror.h │ │ │ └── except.h │ │ ├── luv │ │ │ ├── luv │ │ │ │ ├── schema.c │ │ │ │ ├── util.h │ │ │ │ └── lreq.h │ │ │ └── uv │ │ │ │ ├── win │ │ │ │ ├── detect-wakeup.c │ │ │ │ └── req.c │ │ │ │ └── unix │ │ │ │ ├── posix-hrtime.c │ │ │ │ └── sysinfo-loadavg.c │ │ └── zip │ │ │ └── zipconf.h │ │ ├── res │ │ ├── drawable │ │ │ ├── icon.png │ │ │ └── welcome.png │ │ ├── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── xml │ │ │ ├── androlua_filepaths.xml │ │ │ └── accessibility_service_config.xml │ │ ├── java │ │ ├── android │ │ │ ├── support │ │ │ │ └── v4 │ │ │ │ │ └── app │ │ │ │ │ └── Fragment.java │ │ │ ├── widget │ │ │ │ ├── ExListView.java │ │ │ │ ├── DrawerLayoutImpl.java │ │ │ │ ├── CardViewDelegate.java │ │ │ │ └── PageAdapter.java │ │ │ └── app │ │ │ │ └── AlertDialogBuilder.java │ │ └── com │ │ │ ├── androlua │ │ │ ├── LuaGcable.java │ │ │ ├── LuaActivityX.java │ │ │ ├── ZipUtil.java │ │ │ ├── LuaBroadcastReceiver.java │ │ │ ├── LuaExAdapter.java │ │ │ ├── LuaFileObserver.java │ │ │ ├── LuaDexClassLoader.java │ │ │ ├── LuaView.java │ │ │ ├── Main.java │ │ │ ├── LuaEnhancer.java │ │ │ ├── LuaFragment.java │ │ │ ├── util │ │ │ │ └── VolatileDispose.java │ │ │ ├── LuaTokenTypes.java │ │ │ ├── LuaPrint.java │ │ │ ├── LuaContext.java │ │ │ └── LuaAssetLoader.java │ │ │ ├── android │ │ │ └── cglib │ │ │ │ ├── proxy │ │ │ │ ├── MethodInterceptor.java │ │ │ │ ├── MethodFilter.java │ │ │ │ ├── ProxyException.java │ │ │ │ ├── EnhancerInterface.java │ │ │ │ └── MethodProxy.java │ │ │ │ └── dx │ │ │ │ ├── Version.java │ │ │ │ ├── util │ │ │ │ ├── ByteInput.java │ │ │ │ ├── ByteOutput.java │ │ │ │ ├── LabeledItem.java │ │ │ │ ├── Warning.java │ │ │ │ ├── Uint.java │ │ │ │ ├── ByteArrayByteInput.java │ │ │ │ ├── DexException.java │ │ │ │ ├── ToHuman.java │ │ │ │ ├── MutabilityException.java │ │ │ │ ├── IntIterator.java │ │ │ │ └── Unsigned.java │ │ │ │ ├── rop │ │ │ │ ├── cst │ │ │ │ │ ├── CstMethodRef.java │ │ │ │ │ └── TypedConstant.java │ │ │ │ └── annotation │ │ │ │ │ └── AnnotationVisibility.java │ │ │ │ ├── UnaryOp.java │ │ │ │ ├── dex │ │ │ │ └── DexOptions.java │ │ │ │ └── io │ │ │ │ └── instructions │ │ │ │ └── CodeInput.java │ │ │ ├── luajava │ │ │ ├── LuaMetaTable.java │ │ │ ├── LuaStack.java │ │ │ ├── LuaFunction.java │ │ │ └── LuaString.java │ │ │ ├── nirenr │ │ │ ├── screencapture │ │ │ │ └── ScreenCaptureListener.java │ │ │ ├── LocaleComparator.java │ │ │ ├── Color.java │ │ │ └── ColorPoint.java │ │ │ ├── osfans │ │ │ └── trime │ │ │ │ ├── BackupActivity.java │ │ │ │ └── enums │ │ │ │ ├── InlineModeType.java │ │ │ │ └── KeyEventType.java │ │ │ └── myopicmobile │ │ │ └── textwarrior │ │ │ ├── android │ │ │ ├── TextChangeListener.java │ │ │ └── OnSelectionChangedListener.java │ │ │ └── common │ │ │ ├── RowListener.java │ │ │ ├── Flag.java │ │ │ ├── Pair.java │ │ │ ├── ColorSchemeLight.java │ │ │ └── LanguageC.java │ │ └── resources │ │ └── lua │ │ ├── autotheme.lua │ │ ├── loadbitmap.lua │ │ ├── su.lua │ │ ├── permission.lua │ │ └── loadmenu.lua └── build.gradle ├── settings.gradle ├── .gitignore ├── luajava-license.txt └── LICENSE.txt /app/src/main/assets/Verify/set1.XY: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set13.XY: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set3.XY: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set4.XY: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/assets/font/update: -------------------------------------------------------------------------------- 1 | true -------------------------------------------------------------------------------- /app/src/main/assets/img/data: -------------------------------------------------------------------------------- 1 | 7225fae6e4 -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set6.XY: -------------------------------------------------------------------------------- 1 | 颜色1 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set9.XY: -------------------------------------------------------------------------------- 1 | 颜色3 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/setb.XY: -------------------------------------------------------------------------------- 1 | 颜色5 2 | -------------------------------------------------------------------------------- /app/src/main/assets/layouthelper/.using: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/setbb.XY: -------------------------------------------------------------------------------- 1 | 颜色1 2 | -------------------------------------------------------------------------------- /app/src/main/jni/lfs/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set10.XY: -------------------------------------------------------------------------------- 1 | 0xFF03A9F4 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set11.XY: -------------------------------------------------------------------------------- 1 | 0xffa0a0a0 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set12.XY: -------------------------------------------------------------------------------- 1 | 0xFF03A9F4 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set5.XY: -------------------------------------------------------------------------------- 1 | 0xff8dbdc9 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set7.XY: -------------------------------------------------------------------------------- 1 | 0xFF03A9F4 2 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set8.XY: -------------------------------------------------------------------------------- 1 | 0xFF03A9F4 2 | -------------------------------------------------------------------------------- /app/src/main/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI = armeabi-v7a 2 | -------------------------------------------------------------------------------- /app/src/main/jni/lfs/lfs.def: -------------------------------------------------------------------------------- 1 | LIBRARY lfs.dll 2 | VERSION 1.6 3 | EXPORTS 4 | luaopen_lfs 5 | -------------------------------------------------------------------------------- /app/src/main/assets/Verify/set2.XY: -------------------------------------------------------------------------------- 1 | Fun ( ) [ ] { } " = : . , ; ! _ + - * / \ | % # $ ? < > ~ ; @ ' @XY -------------------------------------------------------------------------------- /app/src/main/jni/Android.mk: -------------------------------------------------------------------------------- 1 | APP_ABI = armeabi-v7a 2 | include $(call all-subdir-makefiles) 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/assets/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/file.png -------------------------------------------------------------------------------- /app/src/main/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/icon.png -------------------------------------------------------------------------------- /app/src/main/assets/res/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/a.png -------------------------------------------------------------------------------- /app/src/main/assets/res/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/b.png -------------------------------------------------------------------------------- /app/src/main/assets/res/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/c.png -------------------------------------------------------------------------------- /app/src/main/assets/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/folder.png -------------------------------------------------------------------------------- /app/src/main/assets/font/a.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/font/a.ttf -------------------------------------------------------------------------------- /app/src/main/assets/font/b.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/font/b.ttf -------------------------------------------------------------------------------- /app/src/main/assets/img/a1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/a1.png -------------------------------------------------------------------------------- /app/src/main/assets/img/a2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/a2.png -------------------------------------------------------------------------------- /app/src/main/assets/img/a3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/a3.png -------------------------------------------------------------------------------- /app/src/main/assets/img/a4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/a4.png -------------------------------------------------------------------------------- /app/src/main/assets/img/a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/a5.png -------------------------------------------------------------------------------- /app/src/main/assets/img/b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/b1.png -------------------------------------------------------------------------------- /app/src/main/assets/img/b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/b2.png -------------------------------------------------------------------------------- /app/src/main/assets/img/c1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/c1.png -------------------------------------------------------------------------------- /app/src/main/assets/img/c2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/c2.png -------------------------------------------------------------------------------- /app/src/main/assets/img/c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/c3.png -------------------------------------------------------------------------------- /app/src/main/assets/img/c4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/c4.png -------------------------------------------------------------------------------- /app/src/main/assets/img/d1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/d1.png -------------------------------------------------------------------------------- /app/src/main/assets/img/e1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/e1.png -------------------------------------------------------------------------------- /app/src/main/assets/img/e2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/e2.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f1.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f10.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f11.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f12.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f2.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f3.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f4.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f5.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f6.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f7.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f8.png -------------------------------------------------------------------------------- /app/src/main/assets/img/f9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/f9.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/A1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/A1.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/A2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/A2.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/A3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/A3.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/A4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/A4.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/My.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/My.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/qq.png -------------------------------------------------------------------------------- /app/src/main/assets/res/a1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/a1.png -------------------------------------------------------------------------------- /app/src/main/assets/res/a2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/a2.png -------------------------------------------------------------------------------- /app/src/main/assets/res/a3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/a3.png -------------------------------------------------------------------------------- /app/src/main/assets/res/b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/b1.png -------------------------------------------------------------------------------- /app/src/main/assets/res/b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/b2.png -------------------------------------------------------------------------------- /app/src/main/assets/res/b3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/b3.png -------------------------------------------------------------------------------- /app/src/main/assets/res/bft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/bft.png -------------------------------------------------------------------------------- /app/src/main/assets/res/d1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/d1.png -------------------------------------------------------------------------------- /app/src/main/assets/res/d2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/d2.png -------------------------------------------------------------------------------- /app/src/main/assets/res/d3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/d3.png -------------------------------------------------------------------------------- /app/src/main/assets/res/d4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/d4.png -------------------------------------------------------------------------------- /app/src/main/assets/res/set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/set.png -------------------------------------------------------------------------------- /app/src/main/assets/res3/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res3/1.png -------------------------------------------------------------------------------- /app/src/main/assets/res3/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res3/2.png -------------------------------------------------------------------------------- /app/src/main/assets/res3/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res3/3.png -------------------------------------------------------------------------------- /app/src/main/assets/res3/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res3/4.png -------------------------------------------------------------------------------- /app/src/main/assets/res3/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res3/5.png -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/jni/luayaml/README -------------------------------------------------------------------------------- /app/src/main/jni/tcc/arm-gen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/jni/tcc/arm-gen.c -------------------------------------------------------------------------------- /app/src/main/assets/image/a0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a0.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a1.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a10.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a11.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a2.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a3.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a4.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a5.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a6.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a7.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a8.png -------------------------------------------------------------------------------- /app/src/main/assets/image/a9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/image/a9.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Add.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Item.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Other.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Send.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Set.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Teach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Teach.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/User.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/User.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/clear.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/find.png -------------------------------------------------------------------------------- /app/src/main/assets/libs/mao.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/mao.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/mao.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/mao.vdex -------------------------------------------------------------------------------- /app/src/main/assets/libs/sign.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/sign.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/sign.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/sign.vdex -------------------------------------------------------------------------------- /app/src/main/assets/picture/a1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/a1.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/a2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/a2.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/a3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/a3.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/a4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/a4.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/a5.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/b1.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/b2.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/b3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/b3.png -------------------------------------------------------------------------------- /app/src/main/assets/picture/b4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/b4.png -------------------------------------------------------------------------------- /app/src/main/assets/res/end1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/end1.png -------------------------------------------------------------------------------- /app/src/main/assets/res/end2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/end2.png -------------------------------------------------------------------------------- /app/src/main/assets/res/end3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/end3.png -------------------------------------------------------------------------------- /app/src/main/assets/res/end4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/end4.png -------------------------------------------------------------------------------- /app/src/main/assets/res/end5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/end5.png -------------------------------------------------------------------------------- /app/src/main/assets/res/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/search.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/apk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/apk.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/file.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/image.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/music.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/pdf.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/text.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/video.png -------------------------------------------------------------------------------- /app/src/main/assets/res2/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/xml.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/res/drawable/icon.png -------------------------------------------------------------------------------- /app/src/main/assets/img/check_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/check_on.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Donate.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Logout.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Search.png -------------------------------------------------------------------------------- /app/src/main/assets/keys/keystore.ks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/keys/keystore.ks -------------------------------------------------------------------------------- /app/src/main/assets/keys/testkey.pk8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/keys/testkey.pk8 -------------------------------------------------------------------------------- /app/src/main/assets/keys/testkey.sbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/keys/testkey.sbt -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm/mao.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm/mao.odex -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm/mao.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm/mao.vdex -------------------------------------------------------------------------------- /app/src/main/assets/res2/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/folder.png -------------------------------------------------------------------------------- /app/src/main/java/android/support/v4/app/Fragment.java: -------------------------------------------------------------------------------- 1 | package android.support.v4.app; 2 | 3 | public class Fragment { 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/assets/img/check_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/img/check_off.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Community.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/ThomeLua1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/ThomeLua1.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/ThomeLua2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/ThomeLua2.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/ThomeLua3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/ThomeLua3.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/ThomeLua4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/ThomeLua4.png -------------------------------------------------------------------------------- /app/src/main/assets/keys/platform.pk8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/keys/platform.pk8 -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm/sign.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm/sign.odex -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm/sign.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm/sign.vdex -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm64/mao.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm64/mao.odex -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm64/mao.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm64/mao.vdex -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm64/sign.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm64/sign.odex -------------------------------------------------------------------------------- /app/src/main/assets/oat/arm64/sign.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/oat/arm64/sign.vdex -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua1.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua10.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua11.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua2.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua3.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua4.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua5.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua6.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua7.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua8.png -------------------------------------------------------------------------------- /app/src/main/assets/res/ThomeLua9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res/ThomeLua9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/res/drawable/welcome.png -------------------------------------------------------------------------------- /app/src/main/assets/imgs/Source Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/imgs/Source Code.png -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm/okh.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm/okh.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm/okh.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm/okh.vdex -------------------------------------------------------------------------------- /app/src/main/assets/res2/compression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/res2/compression.png -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm64/okh.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm64/okh.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm64/okh.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm64/okh.vdex -------------------------------------------------------------------------------- /app/src/main/jni/crypt/lcrypt.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int lsha1(lua_State *L); 5 | int lhmac_sha1(lua_State *L); 6 | -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm/classes.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm/classes.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm/classes.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm/classes.vdex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat1/arm/classes.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat1/arm/classes.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat1/arm/classes.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat1/arm/classes.vdex -------------------------------------------------------------------------------- /app/src/main/assets/picture/1642739853191.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/1642739853191.png -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm64/classes.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm64/classes.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm64/classes.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm64/classes.vdex -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/b64.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int frombase64(lua_State *, const unsigned char *, unsigned int); 4 | int tobase64(lua_State *, int); 5 | -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm/android-support-v4.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm/android-support-v4.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm/android-support-v4.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm/android-support-v4.vdex -------------------------------------------------------------------------------- /app/src/main/assets/picture/privatemsg_chat_my_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/privatemsg_chat_my_bg.9.png -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaGcable.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | public interface LuaGcable 4 | { 5 | public void gc(); 6 | public boolean isGc(); 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm64/android-support-v4.odex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm64/android-support-v4.odex -------------------------------------------------------------------------------- /app/src/main/assets/libs/oat/arm64/android-support-v4.vdex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/libs/oat/arm64/android-support-v4.vdex -------------------------------------------------------------------------------- /app/src/main/assets/picture/privatemsg_chat_other_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheMostBlack/Android-Lua/HEAD/app/src/main/assets/picture/privatemsg_chat_other_bg.9.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 辅助功能 4 | -------------------------------------------------------------------------------- /app/src/main/jni/lsqlite3/lsqlite3.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** 3 | */ 4 | 5 | #ifndef __LUA_SQLITE3_H_ 6 | #define __LUA_SQLITE3_H_ 7 | 8 | int luaopen_lsqlite3(lua_State *L); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /app/src/main/assets/javaapi/init.lua: -------------------------------------------------------------------------------- 1 | appname="Java方法浏览器" 2 | appver="1.0" 3 | packagename="com.androlua.JavaAPI" 4 | user_permission={ 5 | "INTERNET", 6 | "WRITE_EXTERNAL_STORAGE", 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/jni/zlib/lua_zlib.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __LUA_ZLIB_H_ 3 | #define __LUA_ZLIB_H_ 4 | 5 | #include "lauxlib.h" 6 | 7 | LUALIB_API int luaopen_zlib(lua_State *L); 8 | 9 | #endif // __LUA_ZLIB_H_ 10 | -------------------------------------------------------------------------------- /app/src/main/assets/plugin/layout.aly: -------------------------------------------------------------------------------- 1 | { 2 | LinearLayout, 3 | layout_width="fill", 4 | orientation="vertical", 5 | { 6 | ListView, 7 | id="plist", 8 | layout_width="fill" 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/TODO: -------------------------------------------------------------------------------- 1 | * allow creating dump/load objects with internal configuration settings 2 | * better error checking when using LibYAML dump functions 3 | * potentially support additional Lua types (functions?) 4 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/include/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef _STDBOOL_H 2 | #define _STDBOOL_H 3 | 4 | /* ISOC99 boolean */ 5 | 6 | #define bool _Bool 7 | #define true 1 8 | #define false 0 9 | 10 | #endif /* _STDBOOL_H */ 11 | -------------------------------------------------------------------------------- /app/src/main/assets/javaapi/layout.aly: -------------------------------------------------------------------------------- 1 | { 2 | LinearLayout; 3 | orientation="horizontal"; 4 | { 5 | ProgressBar; 6 | }; 7 | { 8 | TextView; 9 | textSize="24sp"; 10 | text="正在分析..."; 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /app/src/main/java/android/widget/ExListView.java: -------------------------------------------------------------------------------- 1 | package android.widget; 2 | import android.content.*; 3 | 4 | public class ExListView extends ExpandableListView 5 | { 6 | public ExListView(Context context){ 7 | super(context); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/assets/plugin/init.lua: -------------------------------------------------------------------------------- 1 | appname="插件" 2 | appver="1.1" 3 | packagename="com.androlua.plugin" 4 | developer="nirenr" 5 | description="插件管理" 6 | debugmode=true 7 | user_permission={ 8 | "INTERNET", 9 | "WRITE_EXTERNAL_STORAGE" 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/xml/androlua_filepaths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/proxy/MethodInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.android.cglib.proxy; 2 | 3 | public interface MethodInterceptor { 4 | 5 | public Object intercept(Object object, Object[] args, MethodProxy methodProxy) 6 | throws Exception; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaActivityX.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.content.res.Resources; 4 | 5 | /** 6 | * Created by Administrator on 2018/06/10 0010. 7 | */ 8 | 9 | public class LuaActivityX extends LuaActivity { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/jni/xml/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := xml 7 | LOCAL_SRC_FILES := xml.c 8 | LOCAL_STATIC_LIBRARIES := luajava 9 | 10 | include $(BUILD_SHARED_LIBRARY) 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/luajava/LuaMetaTable.java: -------------------------------------------------------------------------------- 1 | package com.luajava; 2 | 3 | public interface LuaMetaTable 4 | { 5 | public Object __call(Object...arg) throws LuaException; 6 | 7 | public Object __index(String key); 8 | 9 | public void __newIndex(String key,Object value); 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/jni/bson/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := bson 7 | LOCAL_SRC_FILES := lua-bson.c 8 | LOCAL_STATIC_LIBRARIES := luajava 9 | 10 | include $(BUILD_SHARED_LIBRARY) 11 | -------------------------------------------------------------------------------- /app/src/main/jni/canvas/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := canvas 7 | LOCAL_SRC_FILES := canvas.c 8 | LOCAL_STATIC_LIBRARIES := luajava 9 | 10 | include $(BUILD_SHARED_LIBRARY) 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/proxy/MethodFilter.java: -------------------------------------------------------------------------------- 1 | package com.android.cglib.proxy; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | /** 6 | * Created by nirenr on 2018/12/20. 7 | */ 8 | 9 | public interface MethodFilter { 10 | public boolean filter(Method mode,String name); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/jni/crypt/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := crypt 7 | LOCAL_SRC_FILES := lcrypt.c lsha1.c 8 | LOCAL_STATIC_LIBRARIES := luajava 9 | 10 | include $(BUILD_SHARED_LIBRARY) 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/jni/lsqlite3/Android.mk2: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 5 | LOCAL_MODULE := lsqlite3 6 | LOCAL_SRC_FILES := \ 7 | lsqlite3.c \ 8 | sqlite3.c 9 | LOCAL_STATIC_LIBRARIES := luajava 10 | include $(BUILD_SHARED_LIBRARY) 11 | -------------------------------------------------------------------------------- /app/src/main/jni/cjson/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 5 | LOCAL_MODULE := cjson 6 | LOCAL_SRC_FILES := \ 7 | lua_cjson.c \ 8 | fpconv.c \ 9 | strbuf.c 10 | LOCAL_STATIC_LIBRARIES := luajava 11 | include $(BUILD_SHARED_LIBRARY) 12 | -------------------------------------------------------------------------------- /app/src/main/jni/zlib/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := zlib 7 | LOCAL_SRC_FILES := lua_zlib.c 8 | LOCAL_LDLIBS := -lz 9 | LOCAL_STATIC_LIBRARIES := luajava 10 | 11 | include $(BUILD_SHARED_LIBRARY) 12 | -------------------------------------------------------------------------------- /app/src/main/jni/md5/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := md5 7 | LOCAL_SRC_FILES := md5lib.c \ 8 | md5.c \ 9 | compat-5.2.c 10 | 11 | LOCAL_STATIC_LIBRARIES := luajava 12 | 13 | include $(BUILD_SHARED_LIBRARY) 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/android/widget/DrawerLayoutImpl.java: -------------------------------------------------------------------------------- 1 | package android.widget; 2 | 3 | /** 4 | * Interface used to communicate from the v21-specific code for configuring a DrawerLayout 5 | * to the DrawerLayout itself. 6 | */ 7 | public interface DrawerLayoutImpl { 8 | void setChildInsets(Object insets, boolean drawStatusBar); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/jni/regex/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := regex 7 | LOCAL_SRC_FILES := lposix.c common.c 8 | LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog -ldl 9 | LOCAL_STATIC_LIBRARIES := luajava 10 | 11 | include $(BUILD_SHARED_LIBRARY) 12 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/stab.h: -------------------------------------------------------------------------------- 1 | #ifndef __GNU_STAB__ 2 | 3 | /* Indicate the GNU stab.h is in use. */ 4 | 5 | #define __GNU_STAB__ 6 | 7 | #define __define_stab(NAME, CODE, STRING) NAME=CODE, 8 | 9 | enum __stab_debug_code 10 | { 11 | #include "stab.def" 12 | LAST_UNUSED_STAB_CODE 13 | }; 14 | 15 | #undef __define_stab 16 | 17 | #endif /* __GNU_STAB_ */ 18 | -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := yaml 7 | LOCAL_SRC_FILES := api.c b64.c dumper.c emitter.c loader.c lyaml.c parser.c reader.c scanner.c writer.c 8 | LOCAL_STATIC_LIBRARIES := luajava 9 | 10 | include $(BUILD_SHARED_LIBRARY) 11 | -------------------------------------------------------------------------------- /app/src/main/assets/Community.aly: -------------------------------------------------------------------------------- 1 | { 2 | RelativeLayout; 3 | layout_width="fill"; 4 | layout_height="fill"; 5 | { 6 | PageView; 7 | layout_height="100%h"; 8 | layout_width="fill"; 9 | id="page"; 10 | touchEnabled=false; 11 | overScrollMode=2; 12 | pages={ 13 | -- layout1, 14 | layout2, 15 | 16 | layout4, 17 | }; 18 | }; 19 | }; -------------------------------------------------------------------------------- /app/src/main/assets/layouthelper/init.lua: -------------------------------------------------------------------------------- 1 | appname="布局助手" 2 | appver="1.1" 3 | appcode="1" 4 | appsdk="15" 5 | path_pattern="" 6 | packagename="com.androlua.layouthelper" 7 | app_key="" 8 | app_channel="QQ 1284321744" 9 | developer="nirenr wsdx233(improve)" 10 | description="快速布局工具" 11 | debugmode=true 12 | user_permission={ 13 | "INTERNET", 14 | "WRITE_EXTERNAL_STORAGE" 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/jni/sensor/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # sensor module to access Android sensor (accel, mag, gyr, etc.) 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 7 | LOCAL_MODULE := sensor 8 | LOCAL_LDLIBS := -landroid -llog 9 | LOCAL_SRC_FILES := luasensor.cpp 10 | LOCAL_SHARED_LIBRARIES := luajava 11 | include $(BUILD_SHARED_LIBRARY) 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/nirenr/screencapture/ScreenCaptureListener.java: -------------------------------------------------------------------------------- 1 | package com.nirenr.screencapture; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | /** 6 | * Created by Administrator on 2017/08/06 0006. 7 | */ 8 | 9 | public interface ScreenCaptureListener { 10 | public void onScreenCaptureDone(Bitmap bitmap); 11 | 12 | public void onScreenCaptureError(String msg); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/osfans/trime/BackupActivity.java: -------------------------------------------------------------------------------- 1 | package com.osfans.trime; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.androlua.LuaActivity; 6 | 7 | public class BackupActivity extends LuaActivity { 8 | @Override 9 | public void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | doAsset("backup.lua"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/jni/sensor/luasensor.h: -------------------------------------------------------------------------------- 1 | #ifndef luasensor_h 2 | #define luasensor_h 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | #include "lua.h" 9 | #include "lualib.h" 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | #undef LUALIB_API 16 | #define LUALIB_API extern "C" 17 | #endif 18 | 19 | LUALIB_API int (luaopen_sensor) (lua_State *L); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /app/src/main/jni/md5/md5.h: -------------------------------------------------------------------------------- 1 | /** 2 | * $Id: md5.h,v 1.2 2006/03/03 15:04:49 tomas Exp $ 3 | * Cryptographic module for Lua. 4 | * @author Roberto Ierusalimschy 5 | */ 6 | 7 | 8 | #ifndef md5_h 9 | #define md5_h 10 | 11 | #include 12 | 13 | 14 | #define HASHSIZE 16 15 | 16 | void md5 (const char *message, long len, char *output); 17 | int luaopen_md5_core (lua_State *L); 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /app/src/main/assets/javaapi/mlayout.aly: -------------------------------------------------------------------------------- 1 | { 2 | LinearLayout; 3 | { 4 | LinearLayout; 5 | { 6 | EditText; 7 | id="medit"; 8 | singleLine=true; 9 | layout_weight="1"; 10 | layout_width="fill"; 11 | }; 12 | layout_width="fill"; 13 | }; 14 | { 15 | ListView; 16 | id="mlist"; 17 | FastScrollEnabled=true; 18 | layout_width="fill"; 19 | }; 20 | orientation="vertical"; 21 | }; -------------------------------------------------------------------------------- /app/src/main/jni/md5/README: -------------------------------------------------------------------------------- 1 | MD5 - Cryptographic Library for Lua 2 | Copyright 2003 PUC-Rio 3 | http://www.keplerproject.org/md5 4 | 5 | MD5 offers basic cryptographic facilities for Lua 5.1: a hash (digest) 6 | function, a pair crypt/decrypt based on MD5 and CFB, and a pair crypt/decrypt based 7 | on DES with 56-bit keys. 8 | 9 | MD5 current version is 1.1.2. 10 | 11 | This version is copy from https://github.com/keplerproject/md5 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/jni/md5/compat-5.2.h: -------------------------------------------------------------------------------- 1 | #if !defined LUA_VERSION_NUM 2 | /* Lua 5.0 */ 3 | #define luaL_Reg luaL_reg 4 | 5 | #define luaL_addchar(B,c) \ 6 | ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \ 7 | (*(B)->p++ = (char)(c))) 8 | #endif 9 | 10 | #if LUA_VERSION_NUM==501 11 | /* Lua 5.1 */ 12 | #define lua_rawlen lua_objlen 13 | #endif 14 | 15 | void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); 16 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/include/varargs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file has no copyright assigned and is placed in the Public Domain. 3 | * This file is part of the w64 mingw-runtime package. 4 | * No warranty is given; refer to the file DISCLAIMER within this package. 5 | */ 6 | #ifndef _VARARGS_H 7 | #define _VARARGS_H 8 | 9 | #error "TinyCC no longer implements ." 10 | #error "Revise your code to use ." 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/myopicmobile/textwarrior/android/TextChangeListener.java: -------------------------------------------------------------------------------- 1 | package com.myopicmobile.textwarrior.android; 2 | 3 | public interface TextChangeListener 4 | { 5 | 6 | public void onNewLine(String c, int _caretPosition, int p2); 7 | 8 | 9 | public void onDel(CharSequence text, int _caretPosition, int newCursorPosition); 10 | 11 | public void onAdd(CharSequence text, int _caretPosition, int newCursorPosition); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/android/app/AlertDialogBuilder.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.Context; 4 | 5 | import com.androlua.LuaDialog; 6 | 7 | public class AlertDialogBuilder extends LuaDialog { 8 | 9 | public AlertDialogBuilder(Context context) { 10 | super(context); 11 | } 12 | 13 | public AlertDialogBuilder(Context context, int theme) { 14 | super(context, theme); 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/proxy/ProxyException.java: -------------------------------------------------------------------------------- 1 | package com.android.cglib.proxy; 2 | 3 | public class ProxyException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = 702035040596969930L; 6 | 7 | public ProxyException() { 8 | super(); 9 | } 10 | 11 | public ProxyException(String msg) { 12 | super(msg); 13 | } 14 | 15 | public ProxyException(Throwable cause) { 16 | super(cause); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/assets/javaapi/clayout.aly: -------------------------------------------------------------------------------- 1 | { 2 | LinearLayout; 3 | { 4 | LinearLayout; 5 | { 6 | EditText; 7 | id="edit"; 8 | singleLine=true; 9 | layout_weight="1"; 10 | layout_width="fill"; 11 | }; 12 | layout_width="fill"; 13 | }; 14 | { 15 | ListView; 16 | id="clist"; 17 | FastScrollEnabled=true; 18 | layout_width="fill"; 19 | items=classes; 20 | }; 21 | orientation="vertical"; 22 | }; -------------------------------------------------------------------------------- /app/src/main/jni/luagl/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_MODULE := gl 7 | 8 | LOCAL_CFLAGS := -DANDROID_NDK \ 9 | -DDISABLE_IMPORTGL 10 | 11 | LOCAL_SRC_FILES := \ 12 | luagl.c \ 13 | luagl_const.c \ 14 | luagl_util.c \ 15 | 16 | 17 | LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog 18 | LOCAL_STATIC_LIBRARIES := luajava 19 | 20 | include $(BUILD_SHARED_LIBRARY) 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/ZipUtil.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | import java.io.*; 3 | 4 | public class ZipUtil { 5 | public static boolean zip(String sourceFilePath, String zipFilePath) { 6 | return LuaUtil.zip(sourceFilePath, zipFilePath); 7 | } 8 | 9 | public static boolean unzip(String zipPath, String destPath) { 10 | try { 11 | LuaUtil.unZip(zipPath, destPath); 12 | return true; 13 | } 14 | catch (IOException e) { 15 | return false; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/HISTORY: -------------------------------------------------------------------------------- 1 | 0.1: May 12 2009 2 | * initial release 3 | 4 | 0.2: November 23 2009 5 | * updated libyaml to version 0.1.3 6 | * now properly dumps and loads strings containing binary data using base64 7 | * dumped strings are quoted when they could be loaded as numbers 8 | * nulls are loaded as yaml.null, a function that returns itself and can 9 | be used to test for equality 10 | * load now also recognizes 'yes' as a boolean truth value 11 | * zero length scalars are not converted to nil 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/myopicmobile/textwarrior/common/RowListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Tah Wei Hoon. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Apache License Version 2.0, 5 | * with full text available at http://www.apache.org/licenses/LICENSE-2.0.html 6 | * 7 | * This software is provided "as is". Use at your own risk. 8 | */ 9 | package com.myopicmobile.textwarrior.common; 10 | 11 | public interface RowListener { 12 | public void onRowChange(int newRowIndex); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/jni/luajava/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_CFLAGS := -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast 5 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 6 | LOCAL_CFLAGS += -std=c99 7 | 8 | #CAL_ARM_MODE := arm 9 | #TARGET_PLATFORM := armeabi-v7a 10 | #TARGET_ABI := android-14-armeabi 11 | 12 | LOCAL_MODULE := luajava 13 | LOCAL_SRC_FILES := luajava.c 14 | LOCAL_LDLIBS += -lz 15 | LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog -ldl 16 | LOCAL_STATIC_LIBRARIES := liblua 17 | 18 | include $(BUILD_SHARED_LIBRARY) 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/proxy/EnhancerInterface.java: -------------------------------------------------------------------------------- 1 | package com.android.cglib.proxy; 2 | 3 | public interface EnhancerInterface { 4 | public static final String SET_METHOD_INTERCEPTOR_ENHANCER = "setMethodInterceptor_Enhancer"; 5 | public static final String EXECUTE_SUPER_METHOD_ENHANCER = "executeSuperMethod_Enhancer"; 6 | 7 | public void setMethodInterceptor_Enhancer(MethodInterceptor methodInterceptor); 8 | 9 | @SuppressWarnings("rawtypes") 10 | public Object executeSuperMethod_Enhancer(String methodName, Class[] argsType, Object[] argsValue); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/resources/lua/autotheme.lua: -------------------------------------------------------------------------------- 1 | local version = luajava.bindClass("android.os.Build").VERSION.SDK_INT; 2 | local function autotheme() 3 | local h=tonumber(os.date("%H")) 4 | --h=0 5 | if version >= 21 then 6 | if h<=6 or h>=22 then 7 | return (android.R.style.Theme_Material) 8 | else 9 | return (android.R.style.Theme_Material_Light) 10 | end 11 | else 12 | if h<=6 or h>=22 then 13 | return (android.R.style.Theme_Holo) 14 | else 15 | return (android.R.style.Theme_Holo_Light) 16 | end 17 | end 18 | end 19 | return autotheme 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/luajava/LuaStack.java: -------------------------------------------------------------------------------- 1 | package com.luajava; 2 | import java.util.*; 3 | import com.luajava.*; 4 | 5 | public class LuaStack 6 | { 7 | private final static HashMap luaStack=new HashMap(); 8 | 9 | public static void put(String name,LuaState L){ 10 | luaStack.put(name,L); 11 | } 12 | 13 | public static LuaState get(String name){ 14 | return luaStack.get(name); 15 | } 16 | 17 | public static Object call(String name,String func,Object[] arg) throws LuaException{ 18 | return new LuaFunction(get(name),func).call(arg); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_dns.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_DNS_H_ 12 | #define _LLUV_DNS_H_ 13 | 14 | LLUV_INTERNAL void lluv_dns_initlib(lua_State *L, int nup, int safe); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_misc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_MISC_H_ 12 | #define _LLUV_MISC_H_ 13 | 14 | LLUV_INTERNAL void lluv_misc_initlib(lua_State *L, int nup, int safe); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /app/src/main/resources/lua/loadbitmap.lua: -------------------------------------------------------------------------------- 1 | local context=activity or service 2 | 3 | local LuaBitmap=luajava.bindClass "com.androlua.LuaBitmap" 4 | local function loadbitmap(path) 5 | if not path:find("^https*://") and not path:find("%.%a%a%a%a?$") then 6 | path=path..".png" 7 | end 8 | if path:find("^https*://") then 9 | return LuaBitmap.getHttpBitmap(context,path) 10 | elseif not path:find("^/") then 11 | return LuaBitmap.getLocalBitmap(context,string.format("%s/%s",luajava.luadir,path)) 12 | else 13 | return LuaBitmap.getLocalBitmap(context,path) 14 | end 15 | end 16 | return loadbitmap 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/myopicmobile/textwarrior/android/OnSelectionChangedListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Tah Wei Hoon. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Apache License Version 2.0, 5 | * with full text available at http://www.apache.org/licenses/LICENSE-2.0.html 6 | * 7 | * This software is provided "as is". Use at your own risk. 8 | */ 9 | package com.myopicmobile.textwarrior.android; 10 | 11 | public interface OnSelectionChangedListener { 12 | public void onSelectionChanged(boolean active,int selStart, int selEnd); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_fs.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_FS_H_ 12 | #define _LLUV_FS_H_ 13 | 14 | #include "lluv.h" 15 | 16 | LLUV_INTERNAL void lluv_fs_initlib(lua_State *L, int nup, int safe); 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/jni/cjson/fpconv.h: -------------------------------------------------------------------------------- 1 | /* Lua CJSON floating point conversion routines */ 2 | 3 | /* Buffer required to store the largest string representation of a double. 4 | * 5 | * Longest double printed with %.14g is 21 characters long: 6 | * -1.7976931348623e+308 */ 7 | # define FPCONV_G_FMT_BUFSIZE 32 8 | 9 | #ifdef USE_INTERNAL_FPCONV 10 | static inline void fpconv_init() 11 | { 12 | /* Do nothing - not required */ 13 | } 14 | #else 15 | extern inline void fpconv_init(); 16 | #endif 17 | 18 | extern int fpconv_g_fmt(char*, double, int); 19 | extern double fpconv_strtod(const char*, char**); 20 | 21 | /* vi:ai et sw=4 ts=4: 22 | */ 23 | -------------------------------------------------------------------------------- /app/src/main/jni/luagl/luagl_const.h: -------------------------------------------------------------------------------- 1 | #ifndef __LUAGL_CONST_H__ 2 | #define __LUAGL_CONST_H__ 3 | 4 | 5 | #define LUAGL_ENUM_ERROR (unsigned int)-2 6 | 7 | typedef struct luaglConst 8 | { 9 | const char *str; 10 | unsigned int value; 11 | } luaglConst; 12 | 13 | void luagl_initconst(lua_State *L, const luaglConst *gl_const); 14 | unsigned int luagl_get_enum(lua_State *L, int index, const luaglConst* gl_const); 15 | unsigned int luagl_get_gl_enum(lua_State *L, int index); 16 | const char *luagl_get_str_gl_enum(unsigned int num); 17 | void luagl_pushenum(lua_State *L, unsigned int num); 18 | void luagl_open_const(lua_State *L); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaBroadcastReceiver.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.content.*; 4 | 5 | public class LuaBroadcastReceiver extends BroadcastReceiver 6 | { 7 | 8 | private OnReceiveListener mRlt; 9 | 10 | public LuaBroadcastReceiver(OnReceiveListener rlt) 11 | { 12 | mRlt=rlt; 13 | } 14 | 15 | @Override 16 | public void onReceive(Context context, Intent intent) 17 | { 18 | // TODO: Implement this method 19 | mRlt.onReceive(context,intent); 20 | } 21 | 22 | public interface OnReceiveListener 23 | { 24 | public void onReceive(android.content.Context context, android.content.Intent intent); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/select.h: -------------------------------------------------------------------------------- 1 | #ifndef SELECT_H 2 | #define SELECT_H 3 | /*=========================================================================*\ 4 | * Select implementation 5 | * LuaSocket toolkit 6 | * 7 | * Each object that can be passed to the select function has to export 8 | * method getfd() which returns the descriptor to be passed to the 9 | * underlying select function. Another method, dirty(), should return 10 | * true if there is data ready for reading (required for buffered input). 11 | \*=========================================================================*/ 12 | 13 | int select_open(lua_State *L); 14 | 15 | #endif /* SELECT_H */ 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaExAdapter.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import com.luajava.*; 4 | 5 | public class LuaExAdapter extends LuaExpandableListAdapter 6 | { 7 | public LuaExAdapter(LuaContext context, LuaTable groupLayout, LuaTable childLayout) throws LuaException { 8 | this(context,null,null,groupLayout,childLayout); 9 | } 10 | 11 | public LuaExAdapter(LuaContext context, LuaTable> groupData, LuaTable>> childData, LuaTable groupLayout, LuaTable childLayout) throws LuaException { 12 | super(context,groupData,childData,groupLayout,childLayout); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_tty.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_TTY_H_ 12 | #define _LLUV_TTY_H_ 13 | 14 | LLUV_INTERNAL void lluv_tty_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_tty_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_udp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_UDP_H_ 12 | #define _LLUV_UDP_H_ 13 | 14 | LLUV_INTERNAL void lluv_udp_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_udp_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.9 2015/03/06 19:49:50 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/nirenr/LocaleComparator.java: -------------------------------------------------------------------------------- 1 | package com.nirenr; 2 | 3 | import java.text.Collator; 4 | import java.util.Comparator; 5 | 6 | /** 7 | * Created by nirenr on 2019/6/25. 8 | */ 9 | 10 | public class LocaleComparator implements Comparator { 11 | 12 | public int compare(String o1, String o2) { 13 | Collator myCollator = Collator.getInstance(java.util.Locale.getDefault()); 14 | 15 | if (myCollator.compare(o1, o2) < 0) 16 | 17 | return -1; 18 | 19 | else if (myCollator.compare(o1, o2) > 0) 20 | 21 | return 1; 22 | 23 | else 24 | 25 | return 0; 26 | 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_idle.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_IDLE_H_ 12 | #define _LLUV_IDLE_H_ 13 | 14 | LLUV_INTERNAL void lluv_idle_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_idle_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_poll.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_POLL_H_ 12 | #define _LLUV_POLL_H_ 13 | 14 | LLUV_INTERNAL void lluv_poll_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_poll_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_check.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_CHECK_H_ 12 | #define _LLUV_CHECK_H_ 13 | 14 | LLUV_INTERNAL void lluv_check_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_check_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_timer.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_TIMER_H_ 12 | #define _LLUV_TIMER_H_ 13 | 14 | LLUV_INTERNAL void lluv_timer_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_timer_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_signal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_SIGNAL_H_ 12 | #define _LLUV_SIGNAL_H_ 13 | 14 | LLUV_INTERNAL void lluv_signal_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_signal_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_fs_poll.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_FS_POLL_H_ 12 | #define _LLUV_FS_POLL_H_ 13 | 14 | LLUV_INTERNAL void lluv_fs_poll_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_fs_poll_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_prepare.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_PREPARE_H_ 12 | #define _LLUV_PREPARE_H_ 13 | 14 | LLUV_INTERNAL void lluv_prepare_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_prepare_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_process.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_PROCESS_H_ 12 | #define _LLUV_PROCESS_H_ 13 | 14 | LLUV_INTERNAL void lluv_process_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_process_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_fs_event.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_FS_EVENT_H_ 12 | #define _LLUV_FS_EVENT_H_ 13 | 14 | LLUV_INTERNAL void lluv_fs_event_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_fs_event_index(lua_State *L); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/assets/layouthelper/layout.lua: -------------------------------------------------------------------------------- 1 | layout={ 2 | main={ 3 | LinearLayout, 4 | orientation="vertical", 5 | }, 6 | 7 | dlg={ 8 | LinearLayout, 9 | orientation="vertical", 10 | {TextView, 11 | id="label", 12 | }, 13 | {EditText, 14 | id="fld", 15 | layout_width="fill", 16 | }, 17 | {Button, 18 | text="确定", 19 | onClick="ok", 20 | }, 21 | 22 | }, 23 | 24 | ck={ 25 | LinearLayout; 26 | { 27 | RadioGroup; 28 | layout_weight="1"; 29 | id="ck_rg"; 30 | }; 31 | { 32 | Button; 33 | Text="确定"; 34 | id="ck_bt"; 35 | }; 36 | orientation="vertical"; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/assets/plugin/item.aly: -------------------------------------------------------------------------------- 1 | { 2 | LinearLayout; 3 | layout_width="fill"; 4 | { 5 | ImageView; 6 | id="icon"; 7 | padding="2dp"; 8 | layout_width="64dp"; 9 | layout_height="64dp"; 10 | }; 11 | { 12 | FrameLayout; 13 | padding="2dp"; 14 | layout_width="fill"; 15 | layout_height="64dp"; 16 | { 17 | TextView; 18 | id="title"; 19 | layout_width="fill"; 20 | singleLine="true"; 21 | textSize="20sp"; 22 | }; 23 | { 24 | TextView; 25 | textSize="14sp"; 26 | id="description"; 27 | layout_width="fill"; 28 | singleLine="true"; 29 | layout_gravity="bottom"; 30 | }; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/nirenr/Color.java: -------------------------------------------------------------------------------- 1 | package com.nirenr; 2 | 3 | public class Color { 4 | public int red; 5 | public int green; 6 | public int blue; 7 | 8 | public Color(int color) { 9 | red = color << 8 >>> 24; 10 | green = color << 16 >>> 24; 11 | blue = color << 24 >>> 24; 12 | } 13 | 14 | public Color(int r, int g, int b) { 15 | red = r; 16 | green = g; 17 | blue = b; 18 | } 19 | 20 | public int getInt() { 21 | return 0xFF000000|red<<16|green<<8|blue; 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | return "Color(" + red + ", " + green + ", " + blue + ")"; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | *.rar 5 | *.zip 6 | 7 | # Files for the Dalvik VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # Generated files 14 | bin/ 15 | gen/ 16 | obj/ 17 | 18 | # Eclipse Generate files 19 | .classpath 20 | .project 21 | .settings/ 22 | 23 | 24 | # Gradle files 25 | *.iml 26 | .gradle/ 27 | build/ 28 | /*/build/ 29 | app/.externalNativeBuild/ 30 | app/src/main/libs/ 31 | 32 | # Local configuration file (sdk path, etc) 33 | local.properties 34 | gradle.properties 35 | *.keystore 36 | 37 | # Proguard folder generated by Eclipse 38 | proguard/ 39 | 40 | # Log Files 41 | *.log 42 | 43 | # Make 44 | build*/ 45 | 46 | # Android Studio 47 | .idea/* 48 | -------------------------------------------------------------------------------- /app/src/main/jni/luv/luv/schema.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The Luvit Authors. All Rights Reserved. 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 | -------------------------------------------------------------------------------- /app/src/main/assets/other.lua: -------------------------------------------------------------------------------- 1 | import "java.io.File" 2 | import "AndLua" 3 | 软件文件夹="/sdcard/ThomeLua" 4 | 项目文件夹=软件文件夹.."/project" 5 | 备份文件夹=软件文件夹.."/backup" 6 | 打包文件夹=软件文件夹.."/bin" 7 | 解压文件夹=软件文件夹.."/Decompression" 8 | a=File(软件文件夹).isDirectory() 9 | if a==false then 10 | 创建文件夹(软件文件夹) 11 | end 12 | a=File(项目文件夹).isDirectory() 13 | if a==false then 14 | 创建文件夹(项目文件夹) 15 | end 16 | a=File(备份文件夹).isDirectory() 17 | if a==false then 18 | 创建文件夹(备份文件夹) 19 | end 20 | a=File(打包文件夹).isDirectory() 21 | if a==false then 22 | 创建文件夹(打包文件夹) 23 | end 24 | a=File(解压文件夹).isDirectory() 25 | if a==false then 26 | 创建文件夹(解压文件夹) 27 | end 28 | a=File("/sdcard/.cookie.dat").isFile() 29 | if a==false then 30 | 创建文件("/sdcard/.cookie.dat") 31 | end 32 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/Android.mk2: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_CFLAGS += -DTCC_TARGET_ARM -DTCC_ARM_VFP 6 | LOCAL_CFLAGS += -DTCC_TARGET_ARM -DTCC_ARM_EABI 7 | #LOCAL_CFLAGS += -DTCC_TARGET_X86_64 -DTCC_X86_64_VFP 8 | #LOCAL_CFLAGS += -DTCC_TARGET_X86_64 -DTCC_X86_64_EABI 9 | LOCAL_CFLAGS += -std=c99 10 | LOCAL_CFLAGS += -Wno-pointer-sign 11 | #LOCAL_C_INCLUDES += $(LOCAL_PATH)/../extra 12 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 13 | LOCAL_MODULE := tcc 14 | LOCAL_SRC_FILES := tccpp.c libtcc.c tccelf.c tccasm.c tccgen.c tccrun.c arm-gen.c 15 | LOCAL_SRC_FILES += tcc_jni.c 16 | LOCAL_STATIC_LIBRARIES := luajava 17 | 18 | LOCAL_LDLIBS += -llog 19 | include $(BUILD_SHARED_LIBRARY) 20 | APP_MODULES += tcc 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/myopicmobile/textwarrior/common/Flag.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Tah Wei Hoon. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Apache License Version 2.0, 5 | * with full text available at http://www.apache.org/licenses/LICENSE-2.0.html 6 | * 7 | * This software is provided "as is". Use at your own risk. 8 | */ 9 | package com.myopicmobile.textwarrior.common; 10 | 11 | public class Flag { 12 | private boolean state = false; 13 | 14 | synchronized public final void set(){ 15 | state = true; 16 | } 17 | 18 | synchronized public final void clear(){ 19 | state = false; 20 | } 21 | 22 | synchronized public final boolean isSet(){ 23 | return state; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/unix.h: -------------------------------------------------------------------------------- 1 | #ifndef UNIX_H 2 | #define UNIX_H 3 | /*=========================================================================*\ 4 | * Unix domain object 5 | * LuaSocket toolkit 6 | * 7 | * This module is just an example of how to extend LuaSocket with a new 8 | * domain. 9 | \*=========================================================================*/ 10 | #include "lua.h" 11 | 12 | #include "buffer.h" 13 | #include "timeout.h" 14 | #include "socket.h" 15 | 16 | #ifndef UNIX_API 17 | #define UNIX_API extern 18 | #endif 19 | 20 | typedef struct t_unix_ { 21 | t_socket sock; 22 | t_io io; 23 | t_buffer buf; 24 | t_timeout tm; 25 | } t_unix; 26 | typedef t_unix *p_unix; 27 | 28 | UNIX_API int luaopen_socket_unix(lua_State *L); 29 | 30 | #endif /* UNIX_H */ 31 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_tcp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_TCP_H_ 12 | #define _LLUV_TCP_H_ 13 | 14 | LLUV_INTERNAL void lluv_tcp_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_tcp_index(lua_State *L); 17 | 18 | LLUV_INTERNAL int lluv_tcp_create_safe(lua_State *L); 19 | 20 | LLUV_INTERNAL int lluv_tcp_create_unsafe(lua_State *L); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_pipe.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_PIPE_H_ 12 | #define _LLUV_PIPE_H_ 13 | 14 | LLUV_INTERNAL void lluv_pipe_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_pipe_index(lua_State *L); 17 | 18 | LLUV_INTERNAL int lluv_pipe_create_safe(lua_State *L); 19 | 20 | LLUV_INTERNAL int lluv_pipe_create_unsafe(lua_State *L); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /app/src/main/jni/luajava/luajava.h: -------------------------------------------------------------------------------- 1 | #ifndef luajava_h 2 | #define luajava_h 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include "lua.h" 10 | #include "lualib.h" 11 | #include "lauxlib.h" 12 | typedef struct { 13 | //const char* name; 14 | int type; 15 | int index; 16 | } java_object; 17 | 18 | JNIEnv *checkEnv(lua_State *L); 19 | 20 | void pushJNIEnv(JNIEnv *env, lua_State *L); 21 | 22 | jlong checkIndex(lua_State *L); 23 | 24 | java_object *checkJavaObject(lua_State *L, int idx); 25 | 26 | void checkError(JNIEnv *javaEnv, lua_State *L); 27 | 28 | JNIEnv *getEnvFromState(lua_State * L); 29 | 30 | int isJavaObject(lua_State * L, int idx); 31 | 32 | int pushJavaObject(lua_State *L, const char *name,int idx,int isclass); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_H_ 12 | #define _LLUV_H_ 13 | 14 | #include 15 | #include 16 | #include "l52util.h" 17 | 18 | #define LLUV_PREFIX "Lua-UV" 19 | 20 | /*export*/ 21 | #ifdef _WIN32 22 | # define LLUV_EXPORT_API __declspec(dllexport) 23 | #else 24 | # define LLUV_EXPORT_API LUALIB_API 25 | #endif 26 | 27 | #define LLUV_INTERNAL 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /app/src/main/jni/md5/compat-5.2.c: -------------------------------------------------------------------------------- 1 | #include "lua.h" 2 | #include "lauxlib.h" 3 | #include "compat-5.2.h" 4 | 5 | #if !defined LUA_VERSION_NUM || LUA_VERSION_NUM==501 6 | /* 7 | ** Adapted from Lua 5.2.0 8 | */ 9 | void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { 10 | luaL_checkstack(L, nup+1, "too many upvalues"); 11 | for (; l->name != NULL; l++) { /* fill the table with given functions */ 12 | int i; 13 | lua_pushstring(L, l->name); 14 | for (i = 0; i < nup; i++) /* copy upvalues to the top */ 15 | lua_pushvalue(L, -(nup + 1)); 16 | lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ 17 | lua_settable(L, -(nup + 3)); /* table must be below the upvalues, the name and the closure */ 18 | } 19 | lua_pop(L, nup); /* remove upvalues */ 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/config.h: -------------------------------------------------------------------------------- 1 | #define TRIPLET_ARCH "arm" 2 | #define TRIPLET_OS "linux" 3 | #define TRIPLET_ABI "gnueabihf" 4 | #define TRIPLET TRIPLET_ARCH "-" TRIPLET_ABI 5 | #define TCC_VERSION "0.9.26" 6 | 7 | #define CONFIG_SYSROOT "/system" 8 | #define CONFIG_TCCDIR "/sdcard/tcc" 9 | #define CONFIG_TCC_SYSINCLUDEPATHS "/sdcard/tcc/include" 10 | #define CONFIG_TCC_LIBPATHS "/system/lib" 11 | #define CONFIG_TCC_CRTPREFIX "" 12 | #define CONFIG_TCC_ELFINTERP "$tcc_elfinterp" 13 | #define CONFIG_LDDIR "/system/lib" 14 | #define CONFIG_MULTIARCHDIR TRIPLET 15 | #define HOST_ARM 1 16 | #define TCC_ARM_VERSION 7 17 | #define WITHOUT_LIBTCC 1 18 | #define TCC_TARGET_TCC_ARM_EABI 1 19 | //#define CONFIG_TCC_BACKTRACE 1 /* enabled by default */ 20 | #undef CONFIG_TCC_BCHECK /* not supported for anything but x86 yet */ 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/include/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef _STDDEF_H 2 | #define _STDDEF_H 3 | 4 | typedef __SIZE_TYPE__ size_t; 5 | typedef __PTRDIFF_TYPE__ ssize_t; 6 | typedef __WCHAR_TYPE__ wchar_t; 7 | typedef __PTRDIFF_TYPE__ ptrdiff_t; 8 | typedef __PTRDIFF_TYPE__ intptr_t; 9 | typedef __SIZE_TYPE__ uintptr_t; 10 | 11 | #ifndef __int8_t_defined 12 | #define __int8_t_defined 13 | typedef signed char int8_t; 14 | typedef signed short int int16_t; 15 | typedef signed int int32_t; 16 | typedef signed long long int int64_t; 17 | typedef unsigned char uint8_t; 18 | typedef unsigned short int uint16_t; 19 | typedef unsigned int uint32_t; 20 | typedef unsigned long long int uint64_t; 21 | #endif 22 | 23 | #define NULL ((void*)0) 24 | #define offsetof(type, field) ((size_t)&((type *)0)->field) 25 | 26 | void *alloca(size_t size); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /app/src/main/resources/lua/su.lua: -------------------------------------------------------------------------------- 1 | local Runtime=luajava.bindClass("java.lang.Runtime") 2 | local DataOutputStream=luajava.bindClass("java.io.DataOutputStream") 3 | local DataInputStream=luajava.bindClass("java.io.DataInputStream") 4 | function su(...) 5 | local args={...} 6 | local process = Runtime.getRuntime().exec("su") 7 | local dos = DataOutputStream(process.getOutputStream()); 8 | local dis = DataInputStream(process.getInputStream()); 9 | for k,v in ipairs(args) do 10 | dos.writeBytes(v.."\n"); 11 | dos.flush(); 12 | end 13 | dos.writeBytes("exit\n"); 14 | dos.flush(); 15 | process.waitFor(); 16 | local r="" 17 | local t={} 18 | while r do 19 | r=dis.readLine() 20 | table.insert(t,r) 21 | end 22 | return table.concat(t,"\n") 23 | end 24 | -------------------------------------------------------------------------------- /app/src/main/assets/toast.lua: -------------------------------------------------------------------------------- 1 | function print(内容) 2 | tsbj={ 3 | LinearLayout; 4 | layout_width="fill"; 5 | layout_height="fill"; 6 | gravity="center"; 7 | orientation="vertical"; 8 | { 9 | CardView; 10 | radius=15, 11 | CardElevation="0dp"; 12 | backgroundColor="0xff6f6f6f"; 13 | { 14 | TextView; 15 | layout_marginRight="35dp"; 16 | text="提示"; 17 | id="提示内容", 18 | textColor="0xffffffff"; 19 | layout_marginLeft="35dp"; 20 | layout_marginTop="10dp"; 21 | layout_gravity="center"; 22 | layout_marginBottom="10dp"; 23 | }; 24 | }; 25 | }; 26 | local toast=Toast.makeText(activity,"内容",Toast.LENGTH_SHORT).setView(loadlayout(tsbj)) 27 | toast.setGravity(Gravity.BOTTOM,0,100) 28 | 提示内容.Text=tostring(内容) 29 | toast.show() 30 | end -------------------------------------------------------------------------------- /app/src/main/jni/lfs/lfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** LuaFileSystem 3 | ** Copyright Kepler Project 2003 - 2017 (http://keplerproject.github.io/luafilesystem) 4 | */ 5 | 6 | /* Define 'chdir' for systems that do not implement it */ 7 | #ifdef NO_CHDIR 8 | #define chdir(p) (-1) 9 | #define chdir_error "Function 'chdir' not provided by system" 10 | #else 11 | #define chdir_error strerror(errno) 12 | #endif 13 | 14 | #ifdef _WIN32 15 | #define chdir(p) (_chdir(p)) 16 | #define getcwd(d, s) (_getcwd(d, s)) 17 | #define rmdir(p) (_rmdir(p)) 18 | #define LFS_EXPORT __declspec (dllexport) 19 | #ifndef fileno 20 | #define fileno(f) (_fileno(f)) 21 | #endif 22 | #else 23 | #define LFS_EXPORT 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | LFS_EXPORT int luaopen_lfs (lua_State *L); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** LuaFileSystem 3 | ** Copyright Kepler Project 2003 - 2017 (http://keplerproject.github.io/luafilesystem) 4 | */ 5 | 6 | /* Define 'chdir' for systems that do not implement it */ 7 | #ifdef NO_CHDIR 8 | #define chdir(p) (-1) 9 | #define chdir_error "Function 'chdir' not provided by system" 10 | #else 11 | #define chdir_error strerror(errno) 12 | #endif 13 | 14 | #ifdef _WIN32 15 | #define chdir(p) (_chdir(p)) 16 | #define getcwd(d, s) (_getcwd(d, s)) 17 | #define rmdir(p) (_rmdir(p)) 18 | #define LFS_EXPORT __declspec (dllexport) 19 | #ifndef fileno 20 | #define fileno(f) (_fileno(f)) 21 | #endif 22 | #else 23 | #define LFS_EXPORT 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | LFS_EXPORT int luaopen_lfs (lua_State *L); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # Need to build as libsocket_core.so 4 | # since Android libs directory cannot have subdirectories 5 | # and because all-in-one loader loads before Android asset loader 6 | include $(CLEAR_VARS) 7 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 8 | LOCAL_MODULE := socket 9 | LOCAL_SRC_FILES := \ 10 | luasocket.c \ 11 | timeout.c \ 12 | buffer.c \ 13 | io.c \ 14 | auxiliar.c \ 15 | options.c \ 16 | inet.c \ 17 | tcp.c \ 18 | udp.c \ 19 | except.c \ 20 | select.c \ 21 | usocket.c 22 | LOCAL_STATIC_LIBRARIES := luajava 23 | include $(BUILD_SHARED_LIBRARY) 24 | 25 | # lua socket mime.core module (all-in-one loader should open libmime.so) 26 | include $(CLEAR_VARS) 27 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lua 28 | LOCAL_MODULE := mime 29 | LOCAL_SRC_FILES := mime.c 30 | LOCAL_STATIC_LIBRARIES := luajava 31 | include $(BUILD_SHARED_LIBRARY) 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaFileObserver.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.os.FileObserver; 4 | 5 | /** 6 | * Created by Administrator on 2017/11/08 0008. 7 | */ 8 | 9 | public class LuaFileObserver extends FileObserver { 10 | 11 | private OnEventListener mOnEventListener; 12 | 13 | public LuaFileObserver(String path) { 14 | super(path); 15 | } 16 | 17 | public LuaFileObserver(String path, int mask) { 18 | super(path, mask); 19 | } 20 | 21 | public void setOnEventListener(OnEventListener listener){ 22 | mOnEventListener=listener; 23 | } 24 | 25 | @Override 26 | public void onEvent(int event, String path) { 27 | if(mOnEventListener!=null) 28 | mOnEventListener.onEvent(event, path); 29 | } 30 | 31 | public interface OnEventListener{ 32 | public void onEvent(int event, String path); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_fbuf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_FBUF_H_ 12 | #define _LLUV_FBUF_H_ 13 | 14 | #include "lluv.h" 15 | 16 | typedef struct lluv_fixed_buffer_tag{ 17 | size_t capacity; 18 | char data[1]; 19 | }lluv_fixed_buffer_t; 20 | 21 | LLUV_INTERNAL void lluv_fbuf_initlib(lua_State *L, int nup, int safe); 22 | 23 | LLUV_INTERNAL lluv_fixed_buffer_t *lluv_fbuf_alloc(lua_State *L, size_t n); 24 | 25 | LLUV_INTERNAL lluv_fixed_buffer_t *lluv_check_fbuf(lua_State *L, int i); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/myopicmobile/textwarrior/common/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Tah Wei Hoon. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Apache License Version 2.0, 5 | * with full text available at http://www.apache.org/licenses/LICENSE-2.0.html 6 | * 7 | * This software is provided "as is". Use at your own risk. 8 | */ 9 | package com.myopicmobile.textwarrior.common; 10 | 11 | public final class Pair { 12 | private int _first; 13 | private int _second; 14 | 15 | public Pair(int x, int y){ 16 | _first = x; 17 | _second = y; 18 | } 19 | 20 | public final int getFirst(){ 21 | return _first; 22 | } 23 | 24 | public final int getSecond(){ 25 | return _second; 26 | } 27 | 28 | public final void setFirst(int value){ 29 | _first = value; 30 | } 31 | 32 | public final void setSecond(int value){ 33 | _second = value; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/Version.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | package com.android.cglib.dx; 18 | 19 | /** 20 | * Version number for dx. 21 | */ 22 | public class Version { 23 | /** {@code non-null;} version string */ 24 | public static final String VERSION = "1.7"; 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/luajava/LuaFunction.java: -------------------------------------------------------------------------------- 1 | package com.luajava; 2 | 3 | public class LuaFunction extends LuaObject implements LuaMetaTable { 4 | 5 | @Override 6 | public T __call(Object[] arg) throws LuaException { 7 | // TODO: Implement this method 8 | return (T)super.call(arg); 9 | } 10 | 11 | @Override 12 | public Object __index(String key) { 13 | // TODO: Implement this method 14 | return null; 15 | } 16 | 17 | @Override 18 | public void __newIndex(String key, Object value) { 19 | // TODO: Implement this method 20 | } 21 | 22 | @Override 23 | public T call(Object...args) throws LuaException { 24 | // TODO: Implement this method 25 | Object ret = super.call(args); 26 | return (T)ret; 27 | } 28 | 29 | protected LuaFunction(LuaState L, String globalName) { 30 | super(L, globalName); 31 | } 32 | 33 | protected LuaFunction(LuaState L, int index) { 34 | super(L, index); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaDexClassLoader.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import dalvik.system.*; 4 | import java.util.*; 5 | 6 | public class LuaDexClassLoader extends DexClassLoader { 7 | private HashMap> classCache=new HashMap>(); 8 | 9 | private String mDexPath; 10 | 11 | public LuaDexClassLoader(java.lang.String dexPath, java.lang.String optimizedDirectory, java.lang.String libraryPath, java.lang.ClassLoader parent) { 12 | super(dexPath, optimizedDirectory, libraryPath, parent); 13 | mDexPath=dexPath; 14 | } 15 | 16 | public String getDexPath() { 17 | return mDexPath; 18 | } 19 | 20 | @Override 21 | protected Class findClass(String name) throws ClassNotFoundException { 22 | // TODO: Implement this method 23 | Class cls=classCache.get(name); 24 | if (cls == null) { 25 | cls = super.findClass(name); 26 | classCache.put(name, cls); 27 | } 28 | return cls; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.45 2015/09/08 15:41:05 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* data to catch conversion errors */ 16 | #define LUAC_DATA "\x19\x93\r\n\x1a\n" 17 | 18 | #define LUAC_INT 0x5678 19 | #define LUAC_NUM cast_num(370.5) 20 | 21 | #define MYINT(s) (s[0]-'0') 22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) 23 | #define LUAC_FORMAT 0 /* this is the official format */ 24 | 25 | /* load one chunk; from lundump.c */ 26 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name); 27 | 28 | /* dump one chunk; from ldump.c */ 29 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, 30 | void* data, int strip); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/luajava/LuaString.java: -------------------------------------------------------------------------------- 1 | package com.luajava; 2 | 3 | /** 4 | * Created by nirenr on 2018/12/17. 5 | */ 6 | 7 | public class LuaString implements CharSequence { 8 | 9 | private byte[] mByte=new byte[0]; 10 | 11 | public LuaString(String string) { 12 | mByte=string.getBytes(); 13 | } 14 | 15 | public LuaString(byte[] string) { 16 | mByte=string; 17 | } 18 | 19 | public byte[] toByteArray() { 20 | return mByte; 21 | } 22 | 23 | @Override 24 | public int length() { 25 | return mByte.length; 26 | } 27 | 28 | @Override 29 | public char charAt(int index) { 30 | return (char) mByte[index]; 31 | } 32 | 33 | @Override 34 | public CharSequence subSequence(int start, int end) { 35 | return new String(mByte,start,end); 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return new String(mByte); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/Makefile: -------------------------------------------------------------------------------- 1 | # Default installation prefix 2 | PREFIX=/usr 3 | 4 | # System's libraries directory (where binary libraries are installed) 5 | LUA_LIBDIR=$(PREFIX)/lib/lua/5.1 6 | 7 | # System's lua directory (where Lua libraries are installed) 8 | LUA_DIR=$(PREFIX)/share/lua/5.1 9 | 10 | LUAINC=$(PREFIX)/include 11 | LUALIB=$(PREFIX)/lib 12 | 13 | CC=gcc 14 | # -fexceptions is necessary if your Lua was built with a C++ compiler and 15 | # uses exceptions internally; can be removed 16 | CFLAGS=-O2 -Wall $(INC) -shared -fPIC -fexceptions 17 | LDFLAGS=-shared -L$(LUALIB) 18 | INC=-I$(LUAINC) 19 | 20 | OBJS=lyaml.o api.o dumper.o emitter.o loader.o parser.o reader.o scanner.o writer.o b64.o 21 | 22 | all: yaml.so 23 | 24 | install: 25 | cp -f yaml.so $(LUA_LIBDIR) 26 | 27 | uninstall: 28 | rm -f $(LUA_LIBDIR)/yaml.so 29 | 30 | yaml.so: $(OBJS) 31 | $(CC) -o $@ $(LDFLAGS) $(OBJS) 32 | 33 | clean: 34 | rm -f $(OBJS) yaml.so core core.* a.out 35 | -------------------------------------------------------------------------------- /app/src/main/assets/init.lua: -------------------------------------------------------------------------------- 1 | appname="ThomeLua" 2 | appver="5.0-beta1" 3 | appcode="5" 4 | appsdk="15" 5 | path_pattern="" 6 | packagename="com.ThomeLua.IDE" 7 | theme="Theme_DeviceDefault_Light_NoActionBar" 8 | app_key="" 9 | app_channel="" 10 | developer="" 11 | description="" 12 | debugmode=true 13 | user_permission={ 14 | "ACCESS_COARSE_LOCATION", 15 | "ACCESS_FINE_LOCATION", 16 | "ACCESS_NETWORK_STATE", 17 | "ACCESS_WIFI_STATE", 18 | "BIND_ACCESSIBILITY_SERVICE", 19 | "CAMERA", 20 | "CHANGE_NETWORK_STATE", 21 | "CHANGE_WIFI_STATE", 22 | "DOWNLOAD_WITHOUT_NOTIFICATION", 23 | "GET_PACKAGE_SIZE", 24 | "INSTALL_SHORTCUT", 25 | "INTERNET", 26 | "KILL_BACKGROUND_PROCESSES", 27 | "READ_CONTACTS", 28 | "READ_EXTERNAL_STORAGE", 29 | "READ_PHONE_STATE", 30 | "RECORD_AUDIO", 31 | "REQUEST_INSTALL_PACKAGES", 32 | "SEND_SMS", 33 | "SET_WALLPAPER", 34 | "SYSTEM_ALERT_WINDOW", 35 | "VIBRATE", 36 | "WRITE_CALL_LOG", 37 | "WRITE_CONTACTS", 38 | "WRITE_EXTERNAL_STORAGE" 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/udp.h: -------------------------------------------------------------------------------- 1 | #ifndef UDP_H 2 | #define UDP_H 3 | /*=========================================================================*\ 4 | * UDP object 5 | * LuaSocket toolkit 6 | * 7 | * The udp.h module provides LuaSocket with support for UDP protocol 8 | * (AF_INET, SOCK_DGRAM). 9 | * 10 | * Two classes are defined: connected and unconnected. UDP objects are 11 | * originally unconnected. They can be "connected" to a given address 12 | * with a call to the setpeername function. The same function can be used to 13 | * break the connection. 14 | \*=========================================================================*/ 15 | #include "lua.h" 16 | 17 | #include "timeout.h" 18 | #include "socket.h" 19 | 20 | /* can't be larger than wsocket.c MAXCHUNK!!! */ 21 | #define UDP_DATAGRAMSIZE 8192 22 | 23 | typedef struct t_udp_ { 24 | t_socket sock; 25 | t_timeout tm; 26 | int family; 27 | } t_udp; 28 | typedef t_udp *p_udp; 29 | 30 | int udp_open(lua_State *L); 31 | 32 | #endif /* UDP_H */ 33 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/wsocket.h: -------------------------------------------------------------------------------- 1 | #ifndef WSOCKET_H 2 | #define WSOCKET_H 3 | /*=========================================================================*\ 4 | * Socket compatibilization module for Win32 5 | * LuaSocket toolkit 6 | \*=========================================================================*/ 7 | 8 | /*=========================================================================*\ 9 | * WinSock include files 10 | \*=========================================================================*/ 11 | #include 12 | #include 13 | 14 | typedef int socklen_t; 15 | typedef SOCKADDR_STORAGE t_sockaddr_storage; 16 | typedef SOCKET t_socket; 17 | typedef t_socket *p_socket; 18 | 19 | #ifndef IPV6_V6ONLY 20 | #define IPV6_V6ONLY 27 21 | #endif 22 | 23 | #define SOCKET_INVALID (INVALID_SOCKET) 24 | 25 | #ifndef SO_REUSEPORT 26 | #define SO_REUSEPORT SO_REUSEADDR 27 | #endif 28 | 29 | #ifndef AI_NUMERICSERV 30 | #define AI_NUMERICSERV (0) 31 | #endif 32 | 33 | #endif /* WSOCKET_H */ 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/ByteInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * A byte source. 21 | */ 22 | public interface ByteInput { 23 | 24 | /** 25 | * Returns a byte. 26 | * 27 | * @throws IndexOutOfBoundsException if all bytes have been read. 28 | */ 29 | byte readByte(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/ByteOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * A byte sink. 21 | */ 22 | public interface ByteOutput { 23 | 24 | /** 25 | * Writes a byte. 26 | * 27 | * @throws IndexOutOfBoundsException if all bytes have been written. 28 | */ 29 | void writeByte(int i); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/LabeledItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * An item that has an integer label. 21 | */ 22 | public interface LabeledItem { 23 | 24 | /* 25 | * Gets the label of this block. 26 | * 27 | * @return {@code >= 0;} the label 28 | */ 29 | public int getLabel(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/README.LibYAML: -------------------------------------------------------------------------------- 1 | LibYAML - A C library for parsing and emitting YAML. 2 | 3 | The project is in an early stage of development. 4 | 5 | To build and install the library, run: 6 | $ ./configure 7 | $ make 8 | # make install 9 | 10 | If you checked the source code from the Subversion repository, run 11 | $ ./bootstrap 12 | $ ./configure 13 | $ make 14 | # make install 15 | 16 | For more information, check the LibYAML homepage: 17 | 'http://pyyaml.org/wiki/LibYAML'. 18 | 19 | Post your questions and opinions to the YAML-Core mailing list: 20 | 'http://lists.sourceforge.net/lists/listinfo/yaml-core'. 21 | 22 | Submit bug reports and feature requests to the LibYAML bug tracker: 23 | 'http://pyyaml.org/newticket?component=libyaml'. 24 | 25 | LibYAML is written by Kirill Simonov . It is released 26 | under the MIT license. See the file LICENSE for more details. 27 | 28 | This project is developed for Python Software Foundation as a part of 29 | Google Summer of Code under the mentorship of Clark Evans. 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/osfans/trime/enums/InlineModeType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-present, osfans 3 | * waxaca@163.com https://github.com/osfans 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.osfans.trime.enums; 20 | 21 | /** 嵌入模式枚举 */ 22 | public enum InlineModeType { 23 | INLINE_NONE, 24 | INLINE_PREVIEW, 25 | INLINE_COMPOSITION, 26 | INLINE_INPUT 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_stream.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_STREAM_H_ 12 | #define _LLUV_STREAM_H_ 13 | 14 | LLUV_INTERNAL void lluv_stream_initlib(lua_State *L, int nup, int safe); 15 | 16 | LLUV_INTERNAL int lluv_stream_index(lua_State *L); 17 | 18 | LLUV_INTERNAL lluv_handle_t* lluv_stream_create(lua_State *L, uv_handle_type type, lluv_flags_t flags); 19 | 20 | LLUV_INTERNAL lluv_handle_t* lluv_check_stream(lua_State *L, int idx, lluv_flags_t flags); 21 | 22 | LLUV_INTERNAL void lluv_on_stream_connect_cb(uv_connect_t* arg, int status); 23 | 24 | LLUV_INTERNAL void lluv_on_stream_req_cb(uv_req_t* arg, int status); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/myopicmobile/textwarrior/common/ColorSchemeLight.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Tah Wei Hoon. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Apache License Version 2.0, 5 | * with full text available at http://www.apache.org/licenses/LICENSE-2.0.html 6 | * 7 | * This software is provided "as is". Use at your own risk. 8 | */ 9 | 10 | package com.myopicmobile.textwarrior.common; 11 | 12 | 13 | /** 14 | * Off-black on off-white background color scheme 15 | */ 16 | public class ColorSchemeLight extends ColorScheme { 17 | 18 | public ColorSchemeLight(){ 19 | setColor(Colorable.FOREGROUND, OFF_BLACK); 20 | setColor(Colorable.BACKGROUND, OFF_WHITE); 21 | setColor(Colorable.SELECTION_FOREGROUND, OFF_WHITE); 22 | setColor(Colorable.CARET_FOREGROUND, OFF_WHITE); 23 | } 24 | 25 | private static final int OFF_WHITE = 0xFFF0F0ED; 26 | private static final int OFF_BLACK = 0xFF333333; 27 | 28 | @Override 29 | public boolean isDark() { 30 | return false; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/osfans/trime/enums/KeyEventType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-present, osfans 3 | * waxaca@163.com https://github.com/osfans 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.osfans.trime.enums; 20 | 21 | /** 按键事件枚举 */ 22 | public enum KeyEventType { 23 | CLICK, 24 | LONG_CLICK, 25 | SWIPE_LEFT, 26 | SWIPE_RIGHT, 27 | SWIPE_UP, 28 | SWIPE_DOWN, 29 | COMBO 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lprefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ 3 | ** Definitions for Lua code that must come before any other header file 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lprefix_h 8 | #define lprefix_h 9 | 10 | 11 | /* 12 | ** Allows POSIX/XSI stuff 13 | */ 14 | #if !defined(LUA_USE_C89) /* { */ 15 | 16 | #if !defined(_XOPEN_SOURCE) 17 | #define _XOPEN_SOURCE 600 18 | #elif _XOPEN_SOURCE == 0 19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ 20 | #endif 21 | 22 | /* 23 | ** Allows manipulation of large files in gcc and some other compilers 24 | */ 25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) 26 | #define _LARGEFILE_SOURCE 1 27 | #define _FILE_OFFSET_BITS 64 28 | #endif 29 | 30 | #endif /* } */ 31 | 32 | 33 | /* 34 | ** Windows stuff 35 | */ 36 | #if defined(_WIN32) /* { */ 37 | 38 | #if !defined(_CRT_SECURE_NO_WARNINGS) 39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ 40 | #endif 41 | 42 | #endif /* } */ 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/xml/accessibility_service_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/jni/luv/luv/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The Luvit Authors. All Rights Reserved. 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 | #ifndef LUV_UTIL_H 18 | #define LUV_UTIL_H 19 | 20 | #include "luv.h" 21 | 22 | #define LUV_UV_VERSION_GEQ(major, minor, patch) \ 23 | (((major)<<16 | (minor)<<8 | (patch)) <= UV_VERSION_HEX) 24 | 25 | void luv_stack_dump(lua_State* L, const char* name); 26 | static int luv_error(lua_State* L, int ret); 27 | static void luv_status(lua_State* L, int status); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/timeout.h: -------------------------------------------------------------------------------- 1 | #ifndef TIMEOUT_H 2 | #define TIMEOUT_H 3 | /*=========================================================================*\ 4 | * Timeout management functions 5 | * LuaSocket toolkit 6 | \*=========================================================================*/ 7 | #include "lua.h" 8 | 9 | /* timeout control structure */ 10 | typedef struct t_timeout_ { 11 | double block; /* maximum time for blocking calls */ 12 | double total; /* total number of miliseconds for operation */ 13 | double start; /* time of start of operation */ 14 | } t_timeout; 15 | typedef t_timeout *p_timeout; 16 | 17 | int timeout_open(lua_State *L); 18 | void timeout_init(p_timeout tm, double block, double total); 19 | double timeout_get(p_timeout tm); 20 | double timeout_getretry(p_timeout tm); 21 | p_timeout timeout_markstart(p_timeout tm); 22 | double timeout_getstart(p_timeout tm); 23 | double timeout_gettime(void); 24 | int timeout_meth_settimeout(lua_State *L, p_timeout tm); 25 | 26 | #define timeout_iszero(tm) ((tm)->block == 0.0) 27 | 28 | #endif /* TIMEOUT_H */ 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/Warning.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * Exception which is meant to indicate a non-fatal warning. 21 | */ 22 | public class Warning extends RuntimeException { 23 | /** 24 | * Constructs an instance. 25 | * 26 | * @param message human-oriented message 27 | */ 28 | public Warning(String message) { 29 | super(message); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/Uint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * An unsigned integer. 21 | */ 22 | public final class Uint implements Comparable { 23 | public final int intValue; 24 | 25 | public Uint(int value) { 26 | this.intValue = value; 27 | } 28 | 29 | public int compareTo(Uint uint) { 30 | return Unsigned.compare(intValue, uint.intValue); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/ByteArrayByteInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.util; 18 | 19 | public final class ByteArrayByteInput implements ByteInput { 20 | 21 | private final byte[] bytes; 22 | private int position; 23 | 24 | public ByteArrayByteInput(byte... bytes) { 25 | this.bytes = bytes; 26 | } 27 | 28 | @Override public byte readByte() { 29 | return bytes[position++]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_error.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_ERROR_H_ 12 | #define _LLUV_ERROR_H_ 13 | 14 | #include "lluv.h" 15 | #include "lluv_utils.h" 16 | 17 | /* error category */ 18 | #define LLUV_ERR_LIB 0 19 | #define LLUV_ERR_UV 1 20 | 21 | typedef struct lluv_error_tag{ 22 | int cat; 23 | uv_errno_t no; 24 | char ext[1]; 25 | }lluv_error_t; 26 | 27 | LLUV_INTERNAL void lluv_error_initlib(lua_State *L, int nup, int safe); 28 | 29 | LLUV_INTERNAL int lluv_error_create(lua_State *L, int error_category, uv_errno_t error_no, const char *ext); 30 | 31 | LLUV_INTERNAL int lluv_fail(lua_State *L, lluv_flags_t flags, int error_category, uv_errno_t error_no, const char *ext); 32 | 33 | #endif 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/DexException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * Thrown when there's a format problem reading, writing, or generally 21 | * processing a dex file. 22 | */ 23 | public final class DexException extends ExceptionWithContext { 24 | public DexException(String message) { 25 | super(message); 26 | } 27 | 28 | public DexException(Throwable cause) { 29 | super(cause); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009, Andrew Danforth 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /luajava-license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2003-2007 Kepler Project. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # Core Lua library 4 | # compiled as static library to embed in liblua-activity.so 5 | include $(CLEAR_VARS) 6 | LOCAL_MODULE := lua 7 | CAL_ARM_MODE := arm 8 | TARGET_PLATFORM := armeabi-v7a 9 | TARGET_ABI := android-14-armeabi 10 | LOCAL_CFLAGS += -std=c99 11 | 12 | 13 | LOCAL_SRC_FILES := \ 14 | lapi.c \ 15 | lauxlib.c \ 16 | lbaselib.c \ 17 | lbitlib.c \ 18 | lcode.c \ 19 | lcorolib.c \ 20 | lctype.c \ 21 | ldblib.c \ 22 | ldebug.c \ 23 | ldo.c \ 24 | ldump.c \ 25 | lfunc.c \ 26 | lgc.c \ 27 | linit.c \ 28 | liolib.c \ 29 | llex.c \ 30 | lmathlib.c \ 31 | lmem.c \ 32 | loadlib.c \ 33 | lobject.c \ 34 | lopcodes.c \ 35 | loslib.c \ 36 | lparser.c \ 37 | lstate.c \ 38 | lstring.c \ 39 | lstrlib.c \ 40 | ltable.c \ 41 | ltablib.c \ 42 | ltm.c \ 43 | lundump.c \ 44 | lutf8lib.c \ 45 | lvm.c \ 46 | lzio.c 47 | # lua.c \ 48 | # luac.c \ 49 | 50 | # Auxiliary lua user defined file 51 | # LOCAL_SRC_FILES += luauser.c 52 | # LOCAL_CFLAGS := -DLUA_DL_DLOPEN -DLUA_USER_H='"luauser.h"' 53 | 54 | LOCAL_CFLAGS := -DLUA_DL_DLOPEN 55 | include $(BUILD_STATIC_LIBRARY) 56 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef TCP_H 2 | #define TCP_H 3 | /*=========================================================================*\ 4 | * TCP object 5 | * LuaSocket toolkit 6 | * 7 | * The tcp.h module is basicly a glue that puts together modules buffer.h, 8 | * timeout.h socket.h and inet.h to provide the LuaSocket TCP (AF_INET, 9 | * SOCK_STREAM) support. 10 | * 11 | * Three classes are defined: master, client and server. The master class is 12 | * a newly created tcp object, that has not been bound or connected. Server 13 | * objects are tcp objects bound to some local address. Client objects are 14 | * tcp objects either connected to some address or returned by the accept 15 | * method of a server object. 16 | \*=========================================================================*/ 17 | #include "lua.h" 18 | 19 | #include "buffer.h" 20 | #include "timeout.h" 21 | #include "socket.h" 22 | 23 | typedef struct t_tcp_ { 24 | t_socket sock; 25 | t_io io; 26 | t_buffer buf; 27 | t_timeout tm; 28 | int family; 29 | } t_tcp; 30 | 31 | typedef t_tcp *p_tcp; 32 | 33 | int tcp_open(lua_State *L); 34 | 35 | #endif /* TCP_H */ 36 | -------------------------------------------------------------------------------- /app/src/main/jni/luayaml/LICENSE.LibYAML: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006 Kirill Simonov 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 28 4 | buildToolsVersion '28.0.3' 5 | defaultConfig { 6 | applicationId "com.androlua" 7 | minSdkVersion 18 8 | targetSdkVersion 23 9 | ndk { 10 | abiFilters 'armeabi-v7a' 11 | } 12 | } 13 | packagingOptions { 14 | exclude 'META-INF/proguard/androidx-annotations.pro' 15 | exclude 'META-INF/NOTICE' 16 | exclude 'META-INF/LICENSE' 17 | exclude 'META-INF/LICENSE.txt' 18 | exclude 'META-INF/NOTICE.txt' 19 | } 20 | buildTypes { 21 | release { 22 | minifyEnabled true 23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 24 | } 25 | debug { 26 | debuggable true 27 | jniDebuggable true 28 | } 29 | } 30 | externalNativeBuild { 31 | ndkBuild { 32 | path 'src/main/jni/android.mk' 33 | } 34 | } 35 | productFlavors { 36 | } 37 | } 38 | 39 | dependencies { 40 | implementation 'com.android.support:support-annotations:28.0.0' 41 | } -------------------------------------------------------------------------------- /app/src/main/jni/sensor/test_sensor.lua: -------------------------------------------------------------------------------- 1 | sensor = require('sensor') 2 | 3 | if not s then 4 | s = sensor.new(); 5 | end 6 | 7 | slist = s:getSensorList(); 8 | for i = 1,#slist do 9 | print("Sensor", i); 10 | for k,v in pairs(slist[i]) do 11 | print(string.format(" %s %s",k,tostring(v))); 12 | end 13 | end 14 | 15 | print("Default Accel", s:getDefaultSensor(sensor.TYPE_ACCELEROMETER)); 16 | 17 | for i = 1,#slist do 18 | s:enableSensor(i) 19 | end 20 | 21 | print("proximity", s:setEventRate(9, 1000000)); 22 | 23 | print("accel", s:setEventRate(5, 250000)); 24 | print("gyro", s:setEventRate(4, 250000)); 25 | print("magnetic", s:setEventRate(6, 250000)); 26 | 27 | 28 | svalue = {}; 29 | for i = 1,100 do 30 | unix.usleep(100000); 31 | e = s:getEvents(); 32 | if (e) then 33 | print("sensor num events", #e); 34 | for i = 1,#e do 35 | -- print(" event", i); 36 | -- table.foreach(e[i], print); 37 | svalue[e[i].sensor] = {unpack(e[i])}; 38 | end 39 | end 40 | end 41 | 42 | for i = 1,#slist do 43 | s:disableSensor(i) 44 | end 45 | 46 | for i = 1,#svalue do 47 | print("svalue", i) 48 | table.foreach(svalue[i], print); 49 | end -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Androlua 1.0 Copyright (C) 2011 by Michal Kottman 2 | Androlua+ 3.0 Copyright (C) 2015-2016 by Nirenr 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /app/src/main/jni/zip/zipconf.h: -------------------------------------------------------------------------------- 1 | #ifndef _HAD_ZIPCONF_H 2 | #define _HAD_ZIPCONF_H 3 | 4 | /* 5 | zipconf.h -- platform specific include file 6 | 7 | This file was generated automatically by ./make_zipconf.sh 8 | based on ../config.h. 9 | */ 10 | 11 | #define LIBZIP_VERSION "1.0.1" 12 | #define LIBZIP_VERSION_MAJOR 1 13 | #define LIBZIP_VERSION_MINOR 0 14 | #define LIBZIP_VERSION_MICRO 1 15 | 16 | #include 17 | 18 | typedef int8_t zip_int8_t; 19 | #define ZIP_INT8_MIN INT8_MIN 20 | #define ZIP_INT8_MAX INT8_MAX 21 | 22 | typedef uint8_t zip_uint8_t; 23 | #define ZIP_UINT8_MAX UINT8_MAX 24 | 25 | typedef int16_t zip_int16_t; 26 | #define ZIP_INT16_MIN INT16_MIN 27 | #define ZIP_INT16_MAX INT16_MAX 28 | 29 | typedef uint16_t zip_uint16_t; 30 | #define ZIP_UINT16_MAX UINT16_MAX 31 | 32 | typedef int32_t zip_int32_t; 33 | #define ZIP_INT32_MIN INT32_MIN 34 | #define ZIP_INT32_MAX INT32_MAX 35 | 36 | typedef uint32_t zip_uint32_t; 37 | #define ZIP_UINT32_MAX UINT32_MAX 38 | 39 | typedef int64_t zip_int64_t; 40 | #define ZIP_INT64_MIN INT64_MIN 41 | #define ZIP_INT64_MAX INT64_MAX 42 | 43 | typedef uint64_t zip_uint64_t; 44 | #define ZIP_UINT64_MAX UINT64_MAX 45 | 46 | 47 | #endif /* zipconf.h */ 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/ToHuman.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * Simple interface for objects that can return a "human" (as opposed to 21 | * a complete but often hard to read) string form. 22 | */ 23 | public interface ToHuman { 24 | /** 25 | * Return the "human" string form of this instance. This is 26 | * generally less "debuggy" than {@code toString()}. 27 | * 28 | * @return {@code non-null;} the human string form 29 | */ 30 | public String toHuman(); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/mime.h: -------------------------------------------------------------------------------- 1 | #ifndef MIME_H 2 | #define MIME_H 3 | /*=========================================================================*\ 4 | * Core MIME support 5 | * LuaSocket toolkit 6 | * 7 | * This module provides functions to implement transfer content encodings 8 | * and formatting conforming to RFC 2045. It is used by mime.lua, which 9 | * provide a higher level interface to this functionality. 10 | \*=========================================================================*/ 11 | #include "lua.h" 12 | 13 | /*-------------------------------------------------------------------------*\ 14 | * Current MIME library version 15 | \*-------------------------------------------------------------------------*/ 16 | #define MIME_VERSION "MIME 1.0.3" 17 | #define MIME_COPYRIGHT "Copyright (C) 2004-2013 Diego Nehab" 18 | #define MIME_AUTHORS "Diego Nehab" 19 | 20 | /*-------------------------------------------------------------------------*\ 21 | * This macro prefixes all exported API functions 22 | \*-------------------------------------------------------------------------*/ 23 | #ifndef MIME_API 24 | #define MIME_API extern 25 | #endif 26 | 27 | MIME_API int luaopen_mime_core(lua_State *L); 28 | 29 | #endif /* MIME_H */ 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/MutabilityException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * Exception due to a mutability problem. 21 | */ 22 | public class MutabilityException 23 | extends ExceptionWithContext { 24 | public MutabilityException(String message) { 25 | super(message); 26 | } 27 | 28 | public MutabilityException(Throwable cause) { 29 | super(cause); 30 | } 31 | 32 | public MutabilityException(String message, Throwable cause) { 33 | super(message, cause); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaView.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import com.luajava.LuaException; 7 | import com.luajava.LuaObject; 8 | import com.luajava.LuaTable; 9 | 10 | /** 11 | * Created by Administrator on 2018/08/29 0029. 12 | */ 13 | 14 | public class LuaView extends View { 15 | 16 | private LuaTable mTable; 17 | private LuaObject mOnMeasure; 18 | 19 | public LuaView(Context context){ 20 | super(context); 21 | } 22 | 23 | public LuaView(Context context, LuaTable table){ 24 | super(context); 25 | mTable=table; 26 | } 27 | 28 | @Override 29 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 30 | if(mTable!=null){ 31 | try { 32 | mOnMeasure = mTable.getField("onMeasure"); 33 | if(mOnMeasure.isFunction()){ 34 | mOnMeasure.call(widthMeasureSpec,heightMeasureSpec,this); 35 | return; 36 | } 37 | } catch (LuaException e) { 38 | e.printStackTrace(); 39 | } 40 | } 41 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/IntIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * An iterator for a list of ints. 21 | */ 22 | public interface IntIterator { 23 | 24 | /** 25 | * Checks to see if the iterator has a next value. 26 | * 27 | * @return true if next() will succeed 28 | */ 29 | boolean hasNext(); 30 | 31 | /** 32 | * Returns the next value in the iterator. 33 | * 34 | * @return next value 35 | * @throws java.util.NoSuchElementException if no next element exists 36 | */ 37 | int next(); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/luasocket.h: -------------------------------------------------------------------------------- 1 | #ifndef LUASOCKET_H 2 | #define LUASOCKET_H 3 | /*=========================================================================*\ 4 | * LuaSocket toolkit 5 | * Networking support for the Lua language 6 | * Diego Nehab 7 | * 9/11/1999 8 | \*=========================================================================*/ 9 | #include "lua.h" 10 | 11 | /*-------------------------------------------------------------------------*\ 12 | * Current socket library version 13 | \*-------------------------------------------------------------------------*/ 14 | #define LUASOCKET_VERSION "LuaSocket 3.0-rc1" 15 | #define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2013 Diego Nehab" 16 | 17 | /*-------------------------------------------------------------------------*\ 18 | * This macro prefixes all exported API functions 19 | \*-------------------------------------------------------------------------*/ 20 | #ifndef LUASOCKET_API 21 | #define LUASOCKET_API extern 22 | #endif 23 | 24 | /*-------------------------------------------------------------------------*\ 25 | * Initializes the library. 26 | \*-------------------------------------------------------------------------*/ 27 | LUASOCKET_API int luaopen_socket_core(lua_State *L); 28 | 29 | #endif /* LUASOCKET_H */ 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/myopicmobile/textwarrior/common/LanguageC.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Tah Wei Hoon. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Apache License Version 2.0, 5 | * with full text available at http://www.apache.org/licenses/LICENSE-2.0.html 6 | * 7 | * This software is provided "as is". Use at your own risk. 8 | */ 9 | package com.myopicmobile.textwarrior.common; 10 | 11 | /** 12 | * Singleton class containing the symbols and operators of the C language 13 | */ 14 | public class LanguageC extends Language{ 15 | private static Language _theOne = null; 16 | 17 | private final static String[] keywords = { 18 | "char", "double", "float", "int", "long", "short", "void", 19 | "auto", "const", "extern", "register", "static", "volatile", 20 | "signed", "unsigned", "sizeof", "typedef", 21 | "enum", "struct", "union", 22 | "break", "case", "continue", "default", "do", "else", "for", 23 | "goto", "if", "return", "switch", "while" 24 | }; 25 | 26 | public static Language getInstance(){ 27 | if(_theOne == null){ 28 | _theOne = new LanguageC(); 29 | } 30 | return _theOne; 31 | } 32 | 33 | private LanguageC(){ 34 | super.setKeywords(keywords); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/io.c: -------------------------------------------------------------------------------- 1 | /*=========================================================================*\ 2 | * Input/Output abstraction 3 | * LuaSocket toolkit 4 | \*=========================================================================*/ 5 | #include "io.h" 6 | 7 | /*=========================================================================*\ 8 | * Exported functions 9 | \*=========================================================================*/ 10 | /*-------------------------------------------------------------------------*\ 11 | * Initializes C structure 12 | \*-------------------------------------------------------------------------*/ 13 | void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { 14 | io->send = send; 15 | io->recv = recv; 16 | io->error = error; 17 | io->ctx = ctx; 18 | } 19 | 20 | /*-------------------------------------------------------------------------*\ 21 | * I/O error strings 22 | \*-------------------------------------------------------------------------*/ 23 | const char *io_strerror(int err) { 24 | switch (err) { 25 | case IO_DONE: return NULL; 26 | case IO_CLOSED: return "closed"; 27 | case IO_TIMEOUT: return "timeout"; 28 | default: return "unknown error"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_req.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_REQ_H_ 12 | #define _LLUV_REQ_H_ 13 | 14 | #include "lluv.h" 15 | #include "lluv_handle.h" 16 | 17 | typedef struct lluv_req_tag{ 18 | lluv_handle_t *handle; 19 | int cb; 20 | int arg; 21 | int ctx; 22 | uv_req_t req; 23 | } lluv_req_t; 24 | 25 | #define LLUV_R(H, T) ((uv_##T##_t*)&H->req) 26 | 27 | LLUV_INTERNAL lluv_req_t* lluv_req_new(lua_State *L, uv_req_type type, lluv_handle_t *h); 28 | 29 | LLUV_INTERNAL void lluv_req_free(lua_State *L, lluv_req_t *req); 30 | 31 | LLUV_INTERNAL void lluv_req_ref(lua_State *L, lluv_req_t *req); 32 | 33 | LLUV_INTERNAL void lluv_req_ref_ctx(lua_State *L, lluv_req_t *req); 34 | 35 | LLUV_INTERNAL lluv_req_t* lluv_req_byptr(uv_req_t *r); 36 | 37 | LLUV_INTERNAL int lluv_req_has_cb(lua_State *L, lluv_req_t *req); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/lluv/lluv_list.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Author: Alexey Melnichuk 3 | * 4 | * Copyright (C) 2014-2016 Alexey Melnichuk 5 | * 6 | * Licensed according to the included 'LICENSE' document 7 | * 8 | * This file is part of lua-lluv library. 9 | ******************************************************************************/ 10 | 11 | #ifndef _LLUV_LIST_H_ 12 | #define _LLUV_LIST_H_ 13 | 14 | typedef struct lluv_list_tag{ 15 | lua_Integer first; 16 | lua_Integer last; 17 | int t; 18 | } lluv_list_t; 19 | 20 | LLUV_INTERNAL void lluv_list_init(lua_State *L, lluv_list_t *lst); 21 | 22 | LLUV_INTERNAL void lluv_list_close(lua_State *L, lluv_list_t *lst); 23 | 24 | LLUV_INTERNAL void lluv_list_push_back(lua_State *L, lluv_list_t *lst); 25 | 26 | LLUV_INTERNAL void lluv_list_push_front(lua_State *L, lluv_list_t *lst); 27 | 28 | LLUV_INTERNAL int lluv_list_pop_back(lua_State *L, lluv_list_t *lst); 29 | 30 | LLUV_INTERNAL int lluv_list_pop_front(lua_State *L, lluv_list_t *lst); 31 | 32 | LLUV_INTERNAL size_t lluv_list_size(lua_State *L, lluv_list_t *lst); 33 | 34 | LLUV_INTERNAL int lluv_list_empty(lua_State *L, lluv_list_t *lst); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/uv/win/detect-wakeup.c: -------------------------------------------------------------------------------- 1 | #include "uv.h" 2 | #include "internal.h" 3 | #include "winapi.h" 4 | 5 | static void uv__register_system_resume_callback(void); 6 | 7 | void uv__init_detect_system_wakeup(void) { 8 | /* Try registering system power event callback. This is the cleanest 9 | * method, but it will only work on Win8 and above. 10 | */ 11 | uv__register_system_resume_callback(); 12 | } 13 | 14 | static ULONG CALLBACK uv__system_resume_callback(PVOID Context, 15 | ULONG Type, 16 | PVOID Setting) { 17 | if (Type == PBT_APMRESUMESUSPEND || Type == PBT_APMRESUMEAUTOMATIC) 18 | uv__wake_all_loops(); 19 | 20 | return 0; 21 | } 22 | 23 | static void uv__register_system_resume_callback(void) { 24 | _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS recipient; 25 | _HPOWERNOTIFY registration_handle; 26 | 27 | if (pPowerRegisterSuspendResumeNotification == NULL) 28 | return; 29 | 30 | recipient.Callback = uv__system_resume_callback; 31 | recipient.Context = NULL; 32 | (*pPowerRegisterSuspendResumeNotification)(DEVICE_NOTIFY_CALLBACK, 33 | &recipient, 34 | ®istration_handle); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/jni/luv/uv/win/detect-wakeup.c: -------------------------------------------------------------------------------- 1 | #include "uv.h" 2 | #include "internal.h" 3 | #include "winapi.h" 4 | 5 | static void uv__register_system_resume_callback(void); 6 | 7 | void uv__init_detect_system_wakeup(void) { 8 | /* Try registering system power event callback. This is the cleanest 9 | * method, but it will only work on Win8 and above. 10 | */ 11 | uv__register_system_resume_callback(); 12 | } 13 | 14 | static ULONG CALLBACK uv__system_resume_callback(PVOID Context, 15 | ULONG Type, 16 | PVOID Setting) { 17 | if (Type == PBT_APMRESUMESUSPEND || Type == PBT_APMRESUMEAUTOMATIC) 18 | uv__wake_all_loops(); 19 | 20 | return 0; 21 | } 22 | 23 | static void uv__register_system_resume_callback(void) { 24 | _DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS recipient; 25 | _HPOWERNOTIFY registration_handle; 26 | 27 | if (pPowerRegisterSuspendResumeNotification == NULL) 28 | return; 29 | 30 | recipient.Callback = uv__system_resume_callback; 31 | recipient.Context = NULL; 32 | (*pPowerRegisterSuspendResumeNotification)(DEVICE_NOTIFY_CALLBACK, 33 | &recipient, 34 | ®istration_handle); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/proxy/MethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.android.cglib.proxy; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | public class MethodProxy { 6 | 7 | private Class subClass; 8 | private String methodName; 9 | private Class[] argsType; 10 | 11 | @SuppressWarnings("rawtypes") 12 | public MethodProxy(Class subClass, String methodName, Class[] argsType) { 13 | this.subClass = subClass; 14 | this.methodName = methodName; 15 | this.argsType = argsType; 16 | } 17 | 18 | public String getMethodName() { 19 | return methodName; 20 | } 21 | 22 | @SuppressWarnings("unchecked") 23 | public Method getOriginalMethod() { 24 | try { 25 | return subClass.getMethod(methodName, argsType); 26 | } catch (NoSuchMethodException e) { 27 | throw new ProxyException(e.getMessage()); 28 | } 29 | } 30 | 31 | @SuppressWarnings("unchecked") 32 | public Method getProxyMethod() { 33 | try { 34 | return subClass.getMethod(methodName + Const.SUBCLASS_INVOKE_SUPER_SUFFIX, argsType); 35 | } catch (NoSuchMethodException e) { 36 | throw new ProxyException(e.getMessage()); 37 | } 38 | } 39 | 40 | public Object invokeSuper(Object object, Object[] argsValue) { 41 | return ((EnhancerInterface) object).executeSuperMethod_Enhancer(methodName, argsType, argsValue); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/uv/win/req.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include 23 | 24 | #include "uv.h" 25 | #include "internal.h" 26 | -------------------------------------------------------------------------------- /app/src/main/jni/luv/uv/win/req.c: -------------------------------------------------------------------------------- 1 | /* Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include 23 | 24 | #include "uv.h" 25 | #include "internal.h" 26 | -------------------------------------------------------------------------------- /app/src/main/resources/lua/permission.lua: -------------------------------------------------------------------------------- 1 | require "import" 2 | import "android.content.pm.PackageManager" 3 | local pm = activity.getPackageManager(); 4 | local pi = pm.getPackageInfo(activity.getPackageName(), 0); 5 | -- 得到自己的包名 6 | local pkgName = pi.packageName; 7 | 8 | local pkgInfo = pm.getPackageInfo(pkgName, 9 | PackageManager.GET_PERMISSIONS); --通过包名,返回包信息 10 | local sharedPkgList = pkgInfo.requestedPermissions; --得到权限列表 11 | permission = {} 12 | permission_info = {} 13 | permission_info["BIND_ACCESSIBILITY_SERVICE"] = "辅助功能" 14 | for i = 0, #sharedPkgList - 1 do 15 | local permName = sharedPkgList[i]; 16 | --print(permName) 17 | local s, tmpPermInfo = pcall(pm.getPermissionInfo, permName, 0); --通过permName得到该权限的详细信息 18 | 19 | --local pgi = pm.getPermissionGroupInfo( tmpPermInfo.group, 0);--权限分为不同的群组,通过权限名,我们得到该权限属于什么类型的权限。 20 | --print(i , "-" , permName ); 21 | --print(tmpPermInfo) 22 | -- print(i , "-" , pgi.loadLabel(pm) ); 23 | --print(i , "-" , tmpPermInfo.loadLabel(pm)); 24 | --print(i , "-" , tmpPermInfo.loadDescription(pm)); 25 | permName = permName:match("%.([%w_]+)$") 26 | table.insert(permission, permName) 27 | if s then 28 | permission_info[permName] = tmpPermInfo.loadLabel(pm) 29 | else 30 | permission_info[permName] = permName 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /app/src/main/java/android/widget/CardViewDelegate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 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 | package android.widget; 17 | 18 | import android.graphics.Rect; 19 | import android.graphics.drawable.Drawable; 20 | 21 | /** 22 | * Interface provided by CardView to implementations. 23 | *

24 | * Necessary to resolve circular dependency between base CardView and platform implementations. 25 | */ 26 | interface CardViewDelegate { 27 | void setBackgroundDrawable(Drawable paramDrawable); 28 | Drawable getBackground(); 29 | boolean getUseCompatPadding(); 30 | boolean getPreventCornerOverlap(); 31 | float getRadius(); 32 | void setShadowPadding(int left, int top, int right, int bottom); 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/resources/lua/loadmenu.lua: -------------------------------------------------------------------------------- 1 | local require=require 2 | local table=require "table" 3 | luajava.ids=luajava.ids or {id=0x7f000000} 4 | local ids = luajava.ids 5 | local _G=_G 6 | local insert = table.insert 7 | local new = luajava.new 8 | local bindClass = luajava.bindClass 9 | local LuaDrawable=luajava.bindClass "com.androlua.LuaDrawable" 10 | local loadbitmap=require "loadbitmap" 11 | 12 | local function loadmenu(menu,t,root,n) 13 | root=root or _G 14 | n=n or 0 15 | for k,v in ipairs(t) do 16 | local id=ids.id 17 | ids.id=ids.id+1 18 | if v[1]== MenuItem then 19 | local item=menu.add(v.group or 0,id,v.order or 0,v.title) 20 | if v.id then 21 | rawset(root,v.id,item) 22 | ids[v.id]=id 23 | end 24 | if k<=n then 25 | item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS) 26 | end 27 | if v.icon then 28 | item.setIcon(BitmapDrawable(loadbitmap(v.icon))) 29 | end 30 | if v.enabled==false then 31 | item.setEnabled(v.enabled) 32 | end 33 | if v.visible==false then 34 | item.setVisible(v.visible) 35 | end 36 | elseif v[1]== SubMenu then 37 | local item=menu.addSubMenu(v.group or 0,id,v.order or 0,v.title) 38 | loadmenu(item,v,root) 39 | end 40 | end 41 | end 42 | return loadmenu 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/rop/cst/CstMethodRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | package com.android.cglib.dx.rop.cst; 18 | 19 | /** 20 | * Constants of type {@code CONSTANT_Methodref_info}. 21 | */ 22 | public final class CstMethodRef 23 | extends CstBaseMethodRef { 24 | /** 25 | * Constructs an instance. 26 | * 27 | * @param definingClass {@code non-null;} the type of the defining class 28 | * @param nat {@code non-null;} the name-and-type 29 | */ 30 | public CstMethodRef(CstType definingClass, CstNat nat) { 31 | super(definingClass, nat); 32 | } 33 | 34 | /** {@inheritDoc} */ 35 | @Override 36 | public String typeName() { 37 | return "method"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/Main.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | 6 | 7 | public class Main extends LuaActivity 8 | { 9 | 10 | @Override 11 | public void onCreate(Bundle savedInstanceState) { 12 | // TODO: Implement this method 13 | super.onCreate(savedInstanceState); 14 | if(savedInstanceState==null && getIntent().getData()!=null) 15 | runFunc("onNewIntent", getIntent()); 16 | if(getIntent().getBooleanExtra("isVersionChanged",false) && (savedInstanceState==null)){ 17 | onVersionChanged(getIntent().getStringExtra("newVersionName"),getIntent().getStringExtra("oldVersionName")); 18 | } 19 | } 20 | 21 | @Override 22 | protected void onNewIntent(Intent intent) 23 | { 24 | // TODO: Implement this method 25 | runFunc("onNewIntent", intent); 26 | super.onNewIntent(intent); 27 | } 28 | 29 | @Override 30 | public String getLuaDir() 31 | { 32 | // TODO: Implement this method 33 | return getLocalDir(); 34 | } 35 | 36 | @Override 37 | public String getLuaPath() 38 | { 39 | // TODO: Implement this method 40 | initMain(); 41 | return getLocalDir()+"/main.lua"; 42 | } 43 | 44 | private void onVersionChanged(String newVersionName, String oldVersionName) { 45 | // TODO: Implement this method 46 | runFunc("onVersionChanged", newVersionName, oldVersionName); 47 | 48 | } 49 | 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/pierror.h: -------------------------------------------------------------------------------- 1 | #ifndef PIERROR_H 2 | #define PIERROR_H 3 | /*=========================================================================*\ 4 | * Error messages 5 | * Defines platform independent error messages 6 | \*=========================================================================*/ 7 | 8 | #define PIE_HOST_NOT_FOUND "host not found" 9 | #define PIE_ADDRINUSE "address already in use" 10 | #define PIE_ISCONN "already connected" 11 | #define PIE_ACCESS "permission denied" 12 | #define PIE_CONNREFUSED "connection refused" 13 | #define PIE_CONNABORTED "closed" 14 | #define PIE_CONNRESET "closed" 15 | #define PIE_TIMEDOUT "timeout" 16 | #define PIE_AGAIN "temporary failure in name resolution" 17 | #define PIE_BADFLAGS "invalid value for ai_flags" 18 | #define PIE_BADHINTS "invalid value for hints" 19 | #define PIE_FAIL "non-recoverable failure in name resolution" 20 | #define PIE_FAMILY "ai_family not supported" 21 | #define PIE_MEMORY "memory allocation failure" 22 | #define PIE_NONAME "host or service not provided, or not known" 23 | #define PIE_OVERFLOW "argument buffer overflow" 24 | #define PIE_PROTOCOL "resolved protocol is unknown" 25 | #define PIE_SERVICE "service not supported for socket type" 26 | #define PIE_SOCKTYPE "ai_socktype not supported" 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/UnaryOp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 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 | package com.android.cglib.dx; 18 | 19 | import com.android.cglib.dx.rop.code.Rop; 20 | import com.android.cglib.dx.rop.code.Rops; 21 | 22 | /** 23 | * An operation on one value. 24 | */ 25 | public enum UnaryOp { 26 | 27 | /** {@code ~a}. Supports int and long. */ 28 | NOT() { 29 | @Override Rop rop(TypeId type) { 30 | return Rops.opNot(type.ropType); 31 | } 32 | }, 33 | 34 | /** {@code -a}. Supports int, long, float and double. */ 35 | NEGATE() { 36 | @Override Rop rop(TypeId type) { 37 | return Rops.opNeg(type.ropType); 38 | } 39 | }; 40 | 41 | abstract Rop rop(TypeId type); 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaEnhancer.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import com.android.cglib.proxy.Enhancer; 4 | import com.android.cglib.proxy.EnhancerInterface; 5 | import com.android.cglib.proxy.MethodFilter; 6 | import com.android.cglib.proxy.MethodInterceptor; 7 | 8 | /** 9 | * Created by nirenr on 2018/12/19. 10 | */ 11 | 12 | public class LuaEnhancer { 13 | 14 | private Enhancer mEnhancer; 15 | 16 | public LuaEnhancer(String cls) throws ClassNotFoundException { 17 | this(Class.forName(cls)); 18 | } 19 | 20 | public LuaEnhancer(Class cls) { 21 | mEnhancer = new Enhancer(LuaApplication.getInstance()); 22 | mEnhancer.setSuperclass(cls); 23 | } 24 | 25 | public void setInterceptor(EnhancerInterface obj, MethodInterceptor interceptor) { 26 | obj.setMethodInterceptor_Enhancer(interceptor); 27 | } 28 | 29 | public Class create() { 30 | try { 31 | return mEnhancer.create(); 32 | } catch (Exception e) { 33 | e.printStackTrace(); 34 | } 35 | return null; 36 | } 37 | 38 | public Class create(MethodFilter filer) { 39 | try { 40 | mEnhancer.setMethodFilter(filer); 41 | return mEnhancer.create(); 42 | } catch (Exception e) { 43 | e.printStackTrace(); 44 | } 45 | return null; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaFragment.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.app.*; 4 | import android.view.*; 5 | import android.os.*; 6 | import android.widget.TextView; 7 | 8 | import com.luajava.*; 9 | 10 | public class LuaFragment extends Fragment { 11 | 12 | private LuaTable mLayout = null; 13 | 14 | private LuaObject mLoadLayout = null; 15 | private View mView; 16 | 17 | public LuaFragment() { 18 | 19 | } 20 | 21 | /* 22 | public LuaFragment(LuaTable layout){ 23 | mLoadLayout=layout.getLuaState().getLuaObject("loadlayout"); 24 | mLayout=layout; 25 | }*/ 26 | public void setLayout(LuaTable layout) { 27 | mLayout = layout; 28 | mView = null; 29 | } 30 | 31 | public void setLayout(View layout) { 32 | mView = layout; 33 | mLayout = null; 34 | } 35 | 36 | @Override 37 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 38 | try { 39 | if (mView != null) 40 | return mView; 41 | if (mLayout != null) 42 | return (View) ((LuaObject) (mLayout.getLuaState().getLuaObject("require").call("loadlayout"))).call(mLayout); 43 | return new TextView(getActivity()); 44 | } catch (Exception e) { 45 | throw new IllegalArgumentException(e.getMessage()); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.44 2014/02/06 17:32:33 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | 15 | LUAMOD_API int (luaopen_base) (lua_State *L); 16 | 17 | #define LUA_COLIBNAME "coroutine" 18 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 19 | 20 | #define LUA_TABLIBNAME "table" 21 | LUAMOD_API int (luaopen_table) (lua_State *L); 22 | 23 | #define LUA_IOLIBNAME "io" 24 | LUAMOD_API int (luaopen_io) (lua_State *L); 25 | 26 | #define LUA_OSLIBNAME "os" 27 | LUAMOD_API int (luaopen_os) (lua_State *L); 28 | 29 | #define LUA_STRLIBNAME "string" 30 | LUAMOD_API int (luaopen_string) (lua_State *L); 31 | 32 | #define LUA_UTF8LIBNAME "utf8" 33 | LUAMOD_API int (luaopen_utf8) (lua_State *L); 34 | 35 | #define LUA_BITLIBNAME "bit32" 36 | LUAMOD_API int (luaopen_bit32) (lua_State *L); 37 | 38 | #define LUA_MATHLIBNAME "math" 39 | LUAMOD_API int (luaopen_math) (lua_State *L); 40 | 41 | #define LUA_DBLIBNAME "debug" 42 | LUAMOD_API int (luaopen_debug) (lua_State *L); 43 | 44 | #define LUA_LOADLIBNAME "package" 45 | LUAMOD_API int (luaopen_package) (lua_State *L); 46 | 47 | 48 | /* open all previous libraries */ 49 | LUALIB_API void (luaL_openlibs) (lua_State *L); 50 | 51 | 52 | 53 | #if !defined(lua_assert) 54 | #define lua_assert(x) ((void)0) 55 | #endif 56 | 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /app/src/main/java/android/widget/PageAdapter.java: -------------------------------------------------------------------------------- 1 | package android.widget; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by Administrator on 2018/09/02 0002. 7 | */ 8 | 9 | public class PageAdapter extends BasePageAdapter { 10 | private final Adapter mAdapter; 11 | private View[] mView; 12 | 13 | public PageAdapter(Adapter adapter) { 14 | mAdapter = adapter; 15 | mView=new View[adapter.getViewTypeCount()]; 16 | } 17 | 18 | 19 | @Override 20 | public void destroyItem(View container, int position, Object object) { 21 | View view = (View) object; 22 | ((PageView) container).removeView(view); 23 | mView[mAdapter.getItemViewType(position)] = view; 24 | } 25 | 26 | @Override 27 | public int getCount() { 28 | return mAdapter.getCount(); 29 | } 30 | 31 | @Override 32 | public Object instantiateItem(View container, int position) { 33 | int type=mAdapter.getItemViewType(position); 34 | if (mView[type] != null) 35 | ((PageView) container).removeView(mView[type]); 36 | View view = mAdapter.getView(position, mView[type], ((PageView) container)); 37 | ((PageView) container).addView(view, 0); 38 | mView[type]=null; 39 | return view; 40 | } 41 | 42 | @Override 43 | public boolean isViewFromObject(View arg0, Object arg1) { 44 | return arg0 == (arg1); 45 | } 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/include/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef _STDARG_H 2 | #define _STDARG_H 3 | 4 | #ifdef __x86_64__ 5 | #ifndef _WIN64 6 | 7 | typedef void *va_list; 8 | 9 | va_list __va_start(void *fp); 10 | void *__va_arg(va_list ap, int arg_type, int size); 11 | va_list __va_copy(va_list src); 12 | void __va_end(va_list ap); 13 | 14 | #define va_start(ap, last) ((ap) = __va_start(__builtin_frame_address(0))) 15 | #define va_arg(ap, type) \ 16 | (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type)))) 17 | #define va_copy(dest, src) ((dest) = __va_copy(src)) 18 | #define va_end(ap) __va_end(ap) 19 | 20 | #else /* _WIN64 */ 21 | typedef char *va_list; 22 | #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+7)&~7) 23 | #define va_arg(ap,type) (ap += (sizeof(type)+7)&~7, *(type *)(ap - ((sizeof(type)+7)&~7))) 24 | #define va_copy(dest, src) (dest) = (src) 25 | #define va_end(ap) 26 | #endif 27 | 28 | #else /* __i386__ */ 29 | typedef char *va_list; 30 | /* only correct for i386 */ 31 | #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3) 32 | #define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3))) 33 | #define va_copy(dest, src) (dest) = (src) 34 | #define va_end(ap) 35 | #endif 36 | 37 | /* fix a buggy dependency on GCC in libio.h */ 38 | typedef va_list __gnuc_va_list; 39 | #define _VA_LIST_DEFINED 40 | 41 | #endif /* _STDARG_H */ 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/util/Unsigned.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.util; 18 | 19 | /** 20 | * Unsigned arithmetic over Java's signed types. 21 | */ 22 | public final class Unsigned { 23 | private Unsigned() {} 24 | 25 | public static int compare(short ushortA, short ushortB) { 26 | if (ushortA == ushortB) { 27 | return 0; 28 | } 29 | int a = ushortA & 0xFFFF; 30 | int b = ushortB & 0xFFFF; 31 | return a < b ? -1 : 1; 32 | } 33 | 34 | public static int compare(int uintA, int uintB) { 35 | if (uintA == uintB) { 36 | return 0; 37 | } 38 | long a = uintA & 0xFFFFFFFFL; 39 | long b = uintB & 0xFFFFFFFFL; 40 | return a < b ? -1 : 1; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/util/VolatileDispose.java: -------------------------------------------------------------------------------- 1 | package com.androlua.util; 2 | 3 | 4 | public class VolatileDispose { 5 | 6 | private volatile T mValue; 7 | 8 | public T blockedGet() { 9 | synchronized (this) { 10 | if (mValue != null) { 11 | return mValue; 12 | } 13 | try { 14 | this.wait(1000); 15 | } catch (InterruptedException e) { 16 | throw new RuntimeException(e); 17 | } 18 | } 19 | return mValue; 20 | } 21 | 22 | public T blockedGetOrThrow(Class exception) { 23 | synchronized (this) { 24 | if (mValue != null) { 25 | return mValue; 26 | } 27 | try { 28 | this.wait(); 29 | } catch (InterruptedException e) { 30 | try { 31 | throw exception.newInstance(); 32 | } catch (InstantiationException e1) { 33 | throw new RuntimeException(e1); 34 | } catch (IllegalAccessException e1) { 35 | throw new RuntimeException(e1); 36 | } 37 | } 38 | } 39 | return mValue; 40 | } 41 | 42 | public void setAndNotify(T value) { 43 | synchronized (this) { 44 | mValue = value; 45 | notify(); 46 | } 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/dex/DexOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.dex; 18 | 19 | /** 20 | * Container for options used to control details of dex file generation. 21 | */ 22 | public class DexOptions { 23 | /** target API level */ 24 | public int targetApiLevel = DexFormat.API_NO_EXTENDED_OPCODES; 25 | 26 | /** 27 | * Gets the dex file magic number corresponding to this instance. 28 | */ 29 | public String getMagic() { 30 | return DexFormat.apiToMagic(targetApiLevel); 31 | } 32 | 33 | /** 34 | * Returns whether extended opcodes are allowed. This became 35 | * allowed as of Ice Cream Sandwich. 36 | */ 37 | public boolean canUseExtendedOpcodes() { 38 | return targetApiLevel >= DexFormat.API_CURRENT; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaTokenTypes.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | /** 4 | * Created by Administrator on 2018/07/28 0028. 5 | */ 6 | 7 | public enum LuaTokenTypes { 8 | SHEBANG_CONTENT, 9 | NEW_LINE, 10 | WHITE_SPACE, 11 | BAD_CHARACTER, 12 | 13 | NAME, 14 | NUMBER, 15 | PLUS, 16 | DOT, 17 | MINUS, 18 | LBRACK, 19 | ASSIGN, 20 | RBRACK, 21 | GETN, 22 | NOT, 23 | GT, 24 | LT, 25 | BIT_TILDE, 26 | MULT, 27 | MOD, 28 | DIV, 29 | LPAREN, 30 | RPAREN, 31 | LCURLY, 32 | RCURLY, 33 | COMMA, 34 | SEMI, 35 | COLON, 36 | EXP, 37 | BIT_AND, 38 | BIT_OR, 39 | STRING, 40 | LONG_STRING, 41 | CONCAT, 42 | IN, 43 | IF, 44 | OR, 45 | DO, 46 | EQ, 47 | SHEBANG, 48 | NE, 49 | GE, 50 | BIT_RTRT, 51 | LE, 52 | BIT_LTLT, 53 | DOUBLE_DIV, 54 | DOUBLE_COLON, 55 | AND, 56 | SHORT_COMMENT, 57 | ELLIPSIS, 58 | END, 59 | NIL, 60 | LEF, 61 | MEAN, 62 | FOR, 63 | DOC_COMMENT, 64 | ELSE, 65 | GOTO, 66 | CASE, 67 | TRUE, 68 | THEN, 69 | BLOCK_COMMENT, 70 | BREAK, 71 | LOCAL, 72 | FALSE, 73 | UNTIL, 74 | WHILE, 75 | RETURN, 76 | REPEAT, 77 | ELSEIF, 78 | 79 | CONTINUE, 80 | SWITCH, 81 | DEFAULT, 82 | REGION, 83 | FUNCTION, 84 | ENDREGION, 85 | LABEL, 86 | AT, 87 | DEFER, 88 | WHEN, 89 | LAMBDA 90 | 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/jni/luv/luv/lreq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The Luvit Authors. All Rights Reserved. 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 | #ifndef LUV_LREQ_H 18 | #define LUV_LREQ_H 19 | 20 | #include "luv.h" 21 | 22 | typedef struct { 23 | int req_ref; /* ref for uv_req_t's userdata */ 24 | int callback_ref; /* ref for callback */ 25 | int data_ref; /* ref for write data */ 26 | void* data; /* extra data */ 27 | } luv_req_t; 28 | 29 | /* Used in the top of a setup function to check the arg 30 | and ref the callback to an integer. 31 | */ 32 | static int luv_check_continuation(lua_State* L, int index); 33 | 34 | /* setup a luv_req_t. The userdata is assumed to be at the 35 | top of the stack. 36 | */ 37 | static luv_req_t* luv_setup_req(lua_State* L, int ref); 38 | 39 | static void luv_fulfill_req(lua_State* L, luv_req_t* data, int nargs); 40 | 41 | static void luv_cleanup_req(lua_State* L, luv_req_t* data); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /app/src/main/jni/socket/except.h: -------------------------------------------------------------------------------- 1 | #ifndef EXCEPT_H 2 | #define EXCEPT_H 3 | /*=========================================================================*\ 4 | * Exception control 5 | * LuaSocket toolkit (but completely independent from other modules) 6 | * 7 | * This provides support for simple exceptions in Lua. During the 8 | * development of the HTTP/FTP/SMTP support, it became aparent that 9 | * error checking was taking a substantial amount of the coding. These 10 | * function greatly simplify the task of checking errors. 11 | * 12 | * The main idea is that functions should return nil as its first return 13 | * value when it finds an error, and return an error message (or value) 14 | * following nil. In case of success, as long as the first value is not nil, 15 | * the other values don't matter. 16 | * 17 | * The idea is to nest function calls with the "try" function. This function 18 | * checks the first value, and calls "error" on the second if the first is 19 | * nil. Otherwise, it returns all values it received. 20 | * 21 | * The protect function returns a new function that behaves exactly like the 22 | * function it receives, but the new function doesn't throw exceptions: it 23 | * returns nil followed by the error message instead. 24 | * 25 | * With these two function, it's easy to write functions that throw 26 | * exceptions on error, but that don't interrupt the user script. 27 | \*=========================================================================*/ 28 | 29 | #include "lua.h" 30 | 31 | int except_open(lua_State *L); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaPrint.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import com.luajava.*; 4 | 5 | public class LuaPrint extends JavaFunction { 6 | 7 | private LuaState L; 8 | private LuaContext mLuaContext; 9 | private StringBuilder output = new StringBuilder(); 10 | 11 | public LuaPrint(LuaContext luaContext, LuaState L) { 12 | super(L); 13 | this.L = L; 14 | mLuaContext = luaContext; 15 | } 16 | 17 | @Override 18 | public int execute() throws LuaException { 19 | if (L.getTop() < 2) { 20 | mLuaContext.sendMsg(""); 21 | return 0; 22 | } 23 | for (int i = 2; i <= L.getTop(); i++) { 24 | int type = L.type(i); 25 | String val = null; 26 | String stype = L.typeName(type); 27 | if (stype.equals("userdata")) { 28 | Object obj = L.toJavaObject(i); 29 | if (obj != null) 30 | val = obj.toString(); 31 | } else if (stype.equals("boolean")) { 32 | val = L.toBoolean(i) ? "true" : "false"; 33 | } else { 34 | val = L.toString(i); 35 | } 36 | if (val == null) 37 | val = stype; 38 | output.append("\t"); 39 | output.append(val); 40 | output.append("\t"); 41 | } 42 | mLuaContext.sendMsg(output.toString().substring(1, output.length() - 1)); 43 | output.setLength(0); 44 | return 0; 45 | } 46 | 47 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/rop/annotation/AnnotationVisibility.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | package com.android.cglib.dx.rop.annotation; 18 | 19 | import com.android.cglib.dx.util.ToHuman; 20 | 21 | /** 22 | * Visibility scope of an annotation. 23 | */ 24 | public enum AnnotationVisibility implements ToHuman { 25 | RUNTIME("runtime"), 26 | BUILD("build"), 27 | SYSTEM("system"), 28 | EMBEDDED("embedded"); 29 | 30 | /** {@code non-null;} the human-oriented string representation */ 31 | private final String human; 32 | 33 | /** 34 | * Constructs an instance. 35 | * 36 | * @param human {@code non-null;} the human-oriented string representation 37 | */ 38 | private AnnotationVisibility(String human) { 39 | this.human = human; 40 | } 41 | 42 | /** {@inheritDoc} */ 43 | public String toHuman() { 44 | return human; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/nirenr/ColorPoint.java: -------------------------------------------------------------------------------- 1 | package com.nirenr; 2 | 3 | import android.graphics.Point; 4 | 5 | public class ColorPoint { 6 | public int red; 7 | public int green; 8 | public int blue; 9 | public int x; 10 | public int y; 11 | public int offset; 12 | 13 | public ColorPoint(Point p,Color color,int o){ 14 | this(p.x,p.y,color.red,color.green,color.blue,o); 15 | } 16 | 17 | public ColorPoint(int x, int y, int r, int g, int b, int o) { 18 | this.x = x; 19 | this.y = y; 20 | this.red = r; 21 | this.green = g; 22 | this.blue = b; 23 | this.offset = o; 24 | } 25 | 26 | public ColorPoint(int[] arg) { 27 | x = arg[0]; 28 | y = arg[1]; 29 | red = arg[2]; 30 | green = arg[3]; 31 | blue = arg[4]; 32 | offset = arg[5]; 33 | } 34 | 35 | public boolean check(int[][] pixels) { 36 | return check(pixels, 0, 0); 37 | } 38 | 39 | public boolean check(int[][] pixels, int x, int y) { 40 | int r1 = red - offset; 41 | int r2 = red + offset; 42 | int g1 = green - offset; 43 | int g2 = green + offset; 44 | int b1 = blue - offset; 45 | int b2 = blue + offset; 46 | int color = pixels[this.y + y][this.x + x]; 47 | int r = color << 8 >>> 24; 48 | int g = color << 16 >>> 24; 49 | int b = color << 24 >>> 24; 50 | if (r >= r1 && r <= r2 && g >= g1 && g <= g2 && b >= b1 && b <= b2) 51 | return true; 52 | return false; 53 | } 54 | } -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/io/instructions/CodeInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 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 | package com.android.cglib.dx.io.instructions; 18 | 19 | import java.io.EOFException; 20 | 21 | /** 22 | * Input stream of code units, for reading in Dalvik bytecode. 23 | */ 24 | public interface CodeInput extends CodeCursor { 25 | /** 26 | * Returns whether there are any more code units to read. This 27 | * is analogous to {@code hasNext()} on an interator. 28 | */ 29 | public boolean hasMore(); 30 | 31 | /** 32 | * Reads a code unit. 33 | */ 34 | public int read() throws EOFException; 35 | 36 | /** 37 | * Reads two code units, treating them as a little-endian {@code int}. 38 | */ 39 | public int readInt() throws EOFException; 40 | 41 | /** 42 | * Reads four code units, treating them as a little-endian {@code long}. 43 | */ 44 | public long readLong() throws EOFException; 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/uv/unix/posix-hrtime.c: -------------------------------------------------------------------------------- 1 | /* Copyright libuv project contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "internal.h" 24 | 25 | #include 26 | #include 27 | 28 | #undef NANOSEC 29 | #define NANOSEC ((uint64_t) 1e9) 30 | 31 | uint64_t uv__hrtime(uv_clocktype_t type) { 32 | struct timespec ts; 33 | clock_gettime(CLOCK_MONOTONIC, &ts); 34 | return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/jni/luv/uv/unix/posix-hrtime.c: -------------------------------------------------------------------------------- 1 | /* Copyright libuv project contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "internal.h" 24 | 25 | #include 26 | #include 27 | 28 | #undef NANOSEC 29 | #define NANOSEC ((uint64_t) 1e9) 30 | 31 | uint64_t uv__hrtime(uv_clocktype_t type) { 32 | struct timespec ts; 33 | clock_gettime(CLOCK_MONOTONIC, &ts); 34 | return (((uint64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaContext.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.content.*; 4 | 5 | import com.luajava.*; 6 | 7 | import java.util.*; 8 | 9 | public interface LuaContext { 10 | 11 | public ArrayList getClassLoaders(); 12 | 13 | public void call(String func, Object... args); 14 | 15 | public void set(String name, Object value); 16 | 17 | public String getLuaPath(); 18 | 19 | public String getLuaPath(String path); 20 | 21 | public String getLuaPath(String dir, String name); 22 | 23 | public String getLuaDir(); 24 | 25 | public String getLuaDir(String dir); 26 | 27 | public String getLuaExtDir(); 28 | 29 | public String getLuaExtDir(String dir); 30 | 31 | public void setLuaExtDir(String dir); 32 | 33 | public String getLuaExtPath(String path); 34 | 35 | public String getLuaExtPath(String dir, String name); 36 | 37 | public String getLuaLpath(); 38 | 39 | public String getLuaCpath(); 40 | 41 | public Context getContext(); 42 | 43 | public LuaState getLuaState(); 44 | 45 | public Object doFile(String path, Object... arg); 46 | 47 | public void sendMsg(String msg); 48 | 49 | public void sendError(String title, Exception msg); 50 | 51 | public int getWidth(); 52 | 53 | public int getHeight(); 54 | 55 | public Map getGlobalData(); 56 | 57 | public Object getSharedData(String key); 58 | public Object getSharedData(String key,Object def); 59 | public boolean setSharedData(String key, Object value); 60 | 61 | public void regGc(LuaGcable obj); 62 | 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/androlua/LuaAssetLoader.java: -------------------------------------------------------------------------------- 1 | package com.androlua; 2 | 3 | import android.content.*; 4 | import android.content.res.*; 5 | import com.luajava.*; 6 | import java.io.*; 7 | 8 | public class LuaAssetLoader extends JavaFunction 9 | { 10 | 11 | private LuaState L; 12 | 13 | private Context mContext; 14 | 15 | public LuaAssetLoader(LuaContext luaContext,LuaState L) 16 | { 17 | super(L); 18 | this.L = L; 19 | mContext=luaContext.getContext(); 20 | } 21 | 22 | @Override 23 | public int execute() throws LuaException 24 | { 25 | String name = L.toString(-1); 26 | name = name.replace('.', '/') + ".lua"; 27 | try 28 | { 29 | byte[] bytes = readAsset(name); 30 | int ok=L.LloadBuffer(bytes, name); 31 | if (ok != 0) 32 | L.pushString("\n\t" + L.toString(-1)); 33 | return 1; 34 | } 35 | catch (IOException e) 36 | { 37 | L.pushString("\n\tno file \'/assets/" + name + "\'"); 38 | return 1; 39 | } 40 | } 41 | public byte[] readAsset(String name) throws IOException 42 | { 43 | AssetManager am = mContext.getAssets(); 44 | InputStream is = am.open(name); 45 | byte[] ret= readAll(is); 46 | is.close(); 47 | //am.close(); 48 | return ret; 49 | } 50 | 51 | private static byte[] readAll(InputStream input) throws IOException 52 | { 53 | ByteArrayOutputStream output = new ByteArrayOutputStream(4096); 54 | byte[] buffer = new byte[4096]; 55 | int n = 0; 56 | while (-1 != (n = input.read(buffer))) 57 | { 58 | output.write(buffer, 0, n); 59 | } 60 | byte[] ret= output.toByteArray(); 61 | output.close(); 62 | return ret; 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /app/src/main/jni/tcc/include/float.h: -------------------------------------------------------------------------------- 1 | #ifndef _FLOAT_H_ 2 | #define _FLOAT_H_ 3 | 4 | #define FLT_RADIX 2 5 | 6 | /* IEEE float */ 7 | #define FLT_MANT_DIG 24 8 | #define FLT_DIG 6 9 | #define FLT_ROUNDS 1 10 | #define FLT_EPSILON 1.19209290e-07F 11 | #define FLT_MIN_EXP (-125) 12 | #define FLT_MIN 1.17549435e-38F 13 | #define FLT_MIN_10_EXP (-37) 14 | #define FLT_MAX_EXP 128 15 | #define FLT_MAX 3.40282347e+38F 16 | #define FLT_MAX_10_EXP 38 17 | 18 | /* IEEE double */ 19 | #define DBL_MANT_DIG 53 20 | #define DBL_DIG 15 21 | #define DBL_EPSILON 2.2204460492503131e-16 22 | #define DBL_MIN_EXP (-1021) 23 | #define DBL_MIN 2.2250738585072014e-308 24 | #define DBL_MIN_10_EXP (-307) 25 | #define DBL_MAX_EXP 1024 26 | #define DBL_MAX 1.7976931348623157e+308 27 | #define DBL_MAX_10_EXP 308 28 | 29 | /* horrible intel long double */ 30 | #ifdef __i386__ 31 | 32 | #define LDBL_MANT_DIG 64 33 | #define LDBL_DIG 18 34 | #define LDBL_EPSILON 1.08420217248550443401e-19L 35 | #define LDBL_MIN_EXP (-16381) 36 | #define LDBL_MIN 3.36210314311209350626e-4932L 37 | #define LDBL_MIN_10_EXP (-4931) 38 | #define LDBL_MAX_EXP 16384 39 | #define LDBL_MAX 1.18973149535723176502e+4932L 40 | #define LDBL_MAX_10_EXP 4932 41 | 42 | #else 43 | 44 | /* same as IEEE double */ 45 | #define LDBL_MANT_DIG 53 46 | #define LDBL_DIG 15 47 | #define LDBL_EPSILON 2.2204460492503131e-16 48 | #define LDBL_MIN_EXP (-1021) 49 | #define LDBL_MIN 2.2250738585072014e-308 50 | #define LDBL_MIN_10_EXP (-307) 51 | #define LDBL_MAX_EXP 1024 52 | #define LDBL_MAX 1.7976931348623157e+308 53 | #define LDBL_MAX_10_EXP 308 54 | 55 | #endif 56 | 57 | #endif /* _FLOAT_H_ */ 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/cglib/dx/rop/cst/TypedConstant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | package com.android.cglib.dx.rop.cst; 18 | 19 | import com.android.cglib.dx.rop.type.TypeBearer; 20 | 21 | /** 22 | * Base class for constants which implement {@link TypeBearer}. 23 | */ 24 | public abstract class TypedConstant 25 | extends Constant implements TypeBearer { 26 | /** 27 | * {@inheritDoc} 28 | * 29 | * This implementation always returns {@code this}. 30 | */ 31 | public final TypeBearer getFrameType() { 32 | return this; 33 | } 34 | 35 | /** {@inheritDoc} */ 36 | public final int getBasicType() { 37 | return getType().getBasicType(); 38 | } 39 | 40 | /** {@inheritDoc} */ 41 | public final int getBasicFrameType() { 42 | return getType().getBasicFrameType(); 43 | } 44 | 45 | /** {@inheritDoc} */ 46 | public final boolean isConstant() { 47 | return true; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/jni/lua/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, 24 | const TValue *p2); 25 | LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1, 26 | const TValue *p2, 27 | const char *msg); 28 | LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1, 29 | const TValue *p2); 30 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 31 | const TValue *p2); 32 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 33 | LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg, 34 | TString *src, int line); 35 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 36 | LUAI_FUNC void luaG_traceexec (lua_State *L); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /app/src/main/jni/luv/uv/unix/sysinfo-loadavg.c: -------------------------------------------------------------------------------- 1 | /* Copyright libuv project contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "internal.h" 24 | 25 | #include 26 | #include 27 | 28 | void uv_loadavg(double avg[3]) { 29 | struct sysinfo info; 30 | 31 | if (sysinfo(&info) < 0) return; 32 | 33 | avg[0] = (double) info.loads[0] / 65536.0; 34 | avg[1] = (double) info.loads[1] / 65536.0; 35 | avg[2] = (double) info.loads[2] / 65536.0; 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/jni/lluv/uv/unix/sysinfo-loadavg.c: -------------------------------------------------------------------------------- 1 | /* Copyright libuv project contributors. All rights reserved. 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to 5 | * deal in the Software without restriction, including without limitation the 6 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | * sell copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "uv.h" 23 | #include "internal.h" 24 | 25 | #include 26 | #include 27 | 28 | void uv_loadavg(double avg[3]) { 29 | struct sysinfo info; 30 | 31 | if (sysinfo(&info) < 0) return; 32 | 33 | avg[0] = (double) info.loads[0] / 65536.0; 34 | avg[1] = (double) info.loads[1] / 65536.0; 35 | avg[2] = (double) info.loads[2] / 65536.0; 36 | } 37 | --------------------------------------------------------------------------------