Update to newer nswrap, gogio.
This commit is contained in:
parent
f434092233
commit
b311ea29d6
|
@ -7,6 +7,6 @@ in `examples/sensors`. To try it on your Android device:
|
||||||
go install gioui.org/cmd/gogio
|
go install gioui.org/cmd/gogio
|
||||||
go get git.wow.st/gmp/android-go/examples/sensors
|
go get git.wow.st/gmp/android-go/examples/sensors
|
||||||
cd $GOPATH/src/git.wow.st/gmp/android-go/examples/sensors
|
cd $GOPATH/src/git.wow.st/gmp/android-go/examples/sensors
|
||||||
gogio -target android .
|
gogio -target android -minsdk 27 .
|
||||||
adb install -r sensors.apk
|
adb install -r sensors.apk
|
||||||
```
|
```
|
||||||
|
|
|
@ -25,7 +25,7 @@ functionignore:
|
||||||
- wcstoimax
|
- wcstoimax
|
||||||
- wcstoumax
|
- wcstoumax
|
||||||
- imaxdiv
|
- imaxdiv
|
||||||
- __system_property_get
|
# - __system_property_get
|
||||||
enums:
|
enums:
|
||||||
- .*
|
- .*
|
||||||
typesubs:
|
typesubs:
|
2056
android27/main.go
2056
android27/main.go
File diff suppressed because it is too large
Load Diff
34
android28.yaml
Normal file
34
android28.yaml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
package: android28
|
||||||
|
libraries: [android, log, nativewindow, m]
|
||||||
|
inputfiles:
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/android/native_window.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/android/log.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/android/sensor.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/jni.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/sys/stat.h
|
||||||
|
sysimports:
|
||||||
|
- android/native_window.h
|
||||||
|
- android/log.h
|
||||||
|
- android/sensor.h
|
||||||
|
- jni.h
|
||||||
|
- stdlib.h
|
||||||
|
- sys/stat.h
|
||||||
|
functions:
|
||||||
|
- .*
|
||||||
|
functionignore:
|
||||||
|
- JNI_CreateJavaVM
|
||||||
|
- JNI_GetCreatedJavaVMs
|
||||||
|
- JNI_GetDefaultJavaVMInitArgs
|
||||||
|
- JNI_OnLoad
|
||||||
|
- JNI_OnUnload
|
||||||
|
- AHardwareBuffer_lockPlanes
|
||||||
|
- wcstoimax
|
||||||
|
- wcstoumax
|
||||||
|
- imaxdiv
|
||||||
|
# - __system_property_get
|
||||||
|
enums:
|
||||||
|
- .*
|
||||||
|
typesubs:
|
||||||
|
Stat: Stat_t
|
||||||
|
Stat64: Stat64_t
|
||||||
|
clang: $ANDROID_HOME/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android28-clang
|
1274
android28/main.go
Normal file
1274
android28/main.go
Normal file
File diff suppressed because it is too large
Load Diff
34
android29.yaml
Normal file
34
android29.yaml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
package: android29
|
||||||
|
libraries: [android, log, nativewindow, m]
|
||||||
|
inputfiles:
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/android/native_window.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/android/log.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/android/sensor.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/jni.h
|
||||||
|
- $ANDROID_HOME/ndk-bundle/sysroot/usr/include/sys/stat.h
|
||||||
|
sysimports:
|
||||||
|
- android/native_window.h
|
||||||
|
- android/log.h
|
||||||
|
- android/sensor.h
|
||||||
|
- jni.h
|
||||||
|
- stdlib.h
|
||||||
|
- sys/stat.h
|
||||||
|
functions:
|
||||||
|
- .*
|
||||||
|
functionignore:
|
||||||
|
- JNI_CreateJavaVM
|
||||||
|
- JNI_GetCreatedJavaVMs
|
||||||
|
- JNI_GetDefaultJavaVMInitArgs
|
||||||
|
- JNI_OnLoad
|
||||||
|
- JNI_OnUnload
|
||||||
|
- AHardwareBuffer_lockPlanes
|
||||||
|
- wcstoimax
|
||||||
|
- wcstoumax
|
||||||
|
- imaxdiv
|
||||||
|
# - __system_property_get
|
||||||
|
enums:
|
||||||
|
- .*
|
||||||
|
typesubs:
|
||||||
|
Stat: Stat_t
|
||||||
|
Stat64: Stat64_t
|
||||||
|
clang: $ANDROID_HOME/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android29-clang
|
1284
android29/main.go
Normal file
1284
android29/main.go
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -9,8 +9,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
ndk "git.wow.st/gmp/android-go/android27"
|
|
||||||
"gioui.org/app"
|
"gioui.org/app"
|
||||||
|
ndk "git.wow.st/gmp/android-go/android27"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
|
||||||
"image/color"
|
"image/color"
|
||||||
|
"log"
|
||||||
|
|
||||||
"gioui.org/app"
|
"gioui.org/app"
|
||||||
"gioui.org/layout"
|
"gioui.org/layout"
|
||||||
|
@ -12,8 +12,8 @@ import (
|
||||||
"gioui.org/text/shape"
|
"gioui.org/text/shape"
|
||||||
"gioui.org/unit"
|
"gioui.org/unit"
|
||||||
|
|
||||||
"golang.org/x/image/font/sfnt"
|
|
||||||
"golang.org/x/image/font/gofont/goregular"
|
"golang.org/x/image/font/gofont/goregular"
|
||||||
|
"golang.org/x/image/font/sfnt"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -49,7 +49,9 @@ func eventloop() {
|
||||||
var faces shape.Faces
|
var faces shape.Faces
|
||||||
|
|
||||||
regular, err := sfnt.Parse(goregular.TTF)
|
regular, err := sfnt.Parse(goregular.TTF)
|
||||||
if err != nil { log.Fatal("Cannot parse font.") }
|
if err != nil {
|
||||||
|
log.Fatal("Cannot parse font.")
|
||||||
|
}
|
||||||
face = faces.For(regular, unit.Sp(16))
|
face = faces.For(regular, unit.Sp(16))
|
||||||
|
|
||||||
sysinset := &layout.Inset{}
|
sysinset := &layout.Inset{}
|
||||||
|
@ -90,4 +92,3 @@ func eventloop() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user