Compare commits
7
Commits
2675f322af
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e65963bd4 | ||
|
|
267e2e1c33 | ||
|
|
0b6929c522 | ||
|
|
19194e36f4 | ||
|
|
0dc003bd57 | ||
|
|
f5a3da4398 | ||
|
|
ed998c3d24 |
+3
-1
@@ -1,9 +1,11 @@
|
|||||||
*.ast
|
*.ast
|
||||||
*.apk
|
*.apk
|
||||||
*.jar
|
|
||||||
*.dex
|
*.dex
|
||||||
*.class
|
*.class
|
||||||
|
examples/jni/AClass.jar
|
||||||
|
examples/pgp/PgpConnect.jar
|
||||||
examples/sensors/sensors
|
examples/sensors/sensors
|
||||||
examples/jni/jni
|
examples/jni/jni
|
||||||
examples/dex/dex
|
examples/dex/dex
|
||||||
|
examples/pgp/pgp
|
||||||
examples/permissions/permissions
|
examples/permissions/permissions
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package android27
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo CFLAGS: -x objective-c -fno-objc-arc
|
||||||
|
#cgo LDFLAGS: -landroid -llog -lnativewindow -lm
|
||||||
|
|
||||||
|
#import <android/looper.h>
|
||||||
|
#import <android/sensor.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
int8_t status;
|
||||||
|
} ASensorVector2;
|
||||||
|
|
||||||
|
ASensorVector2
|
||||||
|
ASensorAcceleration(ASensorEvent* event) {
|
||||||
|
ASensorVector2 ret;
|
||||||
|
ret.x = event->acceleration.x;
|
||||||
|
ret.y = event->acceleration.y;
|
||||||
|
ret.z = event->acceleration.z;
|
||||||
|
ret.status = event->acceleration.status;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASensorEventQueue*
|
||||||
|
ASensorManager_createEventQueue2(ASensorManager* manager, ALooper* looper, int ident) {
|
||||||
|
return ASensorManager_createEventQueue(manager, looper, ident, 0, 0);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
import "C"
|
||||||
|
|
||||||
|
type ASensorVector C.ASensorVector2
|
||||||
|
|
||||||
|
func (x ASensorVector) X() Float { return (Float)(x.x) }
|
||||||
|
func (x ASensorVector) Y() Float { return (Float)(x.y) }
|
||||||
|
func (x ASensorVector) Z() Float { return (Float)(x.z) }
|
||||||
|
|
||||||
|
func (x *ASensorEvent) Acceleration() ASensorVector {
|
||||||
|
return (ASensorVector)(C.ASensorAcceleration(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func ASensorManagerCreateEventQueue(manager *ASensorManager, looper *ALooper, ident int) *ASensorEventQueue {
|
||||||
|
ret := (*ASensorEventQueue)(C.ASensorManager_createEventQueue2((*C.ASensorManager)(manager), (*C.ALooper)(looper), (C.int)(ident)))
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
+877
-871
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
|||||||
|
package android28
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo CFLAGS: -x objective-c -fno-objc-arc
|
||||||
|
#cgo LDFLAGS: -landroid -llog -lnativewindow -lm
|
||||||
|
|
||||||
|
#import <android/looper.h>
|
||||||
|
#import <android/sensor.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
int8_t status;
|
||||||
|
} ASensorVector2;
|
||||||
|
|
||||||
|
ASensorVector2
|
||||||
|
ASensorAcceleration(ASensorEvent* event) {
|
||||||
|
ASensorVector2 ret;
|
||||||
|
ret.x = event->acceleration.x;
|
||||||
|
ret.y = event->acceleration.y;
|
||||||
|
ret.z = event->acceleration.z;
|
||||||
|
ret.status = event->acceleration.status;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASensorEventQueue*
|
||||||
|
ASensorManager_createEventQueue2(ASensorManager* manager, ALooper* looper, int ident) {
|
||||||
|
return ASensorManager_createEventQueue(manager, looper, ident, 0, 0);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
import "C"
|
||||||
|
|
||||||
|
type ASensorVector C.ASensorVector2
|
||||||
|
|
||||||
|
func (x ASensorVector) X() Float { return (Float)(x.x) }
|
||||||
|
func (x ASensorVector) Y() Float { return (Float)(x.y) }
|
||||||
|
func (x ASensorVector) Z() Float { return (Float)(x.z) }
|
||||||
|
|
||||||
|
func (x *ASensorEvent) Acceleration() ASensorVector {
|
||||||
|
return (ASensorVector)(C.ASensorAcceleration(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func ASensorManagerCreateEventQueue(manager *ASensorManager, looper *ALooper, ident int) *ASensorEventQueue {
|
||||||
|
ret := (*ASensorEventQueue)(C.ASensorManager_createEventQueue2((*C.ASensorManager)(manager), (*C.ALooper)(looper), (C.int)(ident)))
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
+1015
-1009
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
|||||||
|
package android29
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo CFLAGS: -x objective-c -fno-objc-arc
|
||||||
|
#cgo LDFLAGS: -landroid -llog -lnativewindow -lm
|
||||||
|
|
||||||
|
#import <android/looper.h>
|
||||||
|
#import <android/sensor.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
int8_t status;
|
||||||
|
} ASensorVector2;
|
||||||
|
|
||||||
|
ASensorVector2
|
||||||
|
ASensorAcceleration(ASensorEvent* event) {
|
||||||
|
ASensorVector2 ret;
|
||||||
|
ret.x = event->acceleration.x;
|
||||||
|
ret.y = event->acceleration.y;
|
||||||
|
ret.z = event->acceleration.z;
|
||||||
|
ret.status = event->acceleration.status;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASensorEventQueue*
|
||||||
|
ASensorManager_createEventQueue2(ASensorManager* manager, ALooper* looper, int ident) {
|
||||||
|
return ASensorManager_createEventQueue(manager, looper, ident, 0, 0);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
import "C"
|
||||||
|
|
||||||
|
type ASensorVector C.ASensorVector2
|
||||||
|
|
||||||
|
func (x ASensorVector) X() Float { return (Float)(x.x) }
|
||||||
|
func (x ASensorVector) Y() Float { return (Float)(x.y) }
|
||||||
|
func (x ASensorVector) Z() Float { return (Float)(x.z) }
|
||||||
|
|
||||||
|
func (x *ASensorEvent) Acceleration() ASensorVector {
|
||||||
|
return (ASensorVector)(C.ASensorAcceleration(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func ASensorManagerCreateEventQueue(manager *ASensorManager, looper *ALooper, ident int) *ASensorEventQueue {
|
||||||
|
ret := (*ASensorEventQueue)(C.ASensorManager_createEventQueue2((*C.ASensorManager)(manager), (*C.ALooper)(looper), (C.int)(ident)))
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
+969
-963
File diff suppressed because it is too large
Load Diff
@@ -132,14 +132,13 @@ import (
|
|||||||
var theJVM *C.JavaVM
|
var theJVM *C.JavaVM
|
||||||
|
|
||||||
func SetJVM() {
|
func SetJVM() {
|
||||||
h := app.PlatformHandle()
|
theJVM = (*C.JavaVM)(unsafe.Pointer(app.JavaVM()))
|
||||||
theJVM = (*C.JavaVM)(unsafe.Pointer(h.JVM))
|
|
||||||
dex := MustAsset("java/classes.dex")
|
dex := MustAsset("java/classes.dex")
|
||||||
RunInJVM(func(env *C.JNIEnv) {
|
RunInJVM(func(env *C.JNIEnv) {
|
||||||
labchan <- "Set up JVM"
|
labchan <- "Set up JVM"
|
||||||
C.SetupJVM(
|
C.SetupJVM(
|
||||||
env,
|
env,
|
||||||
(C.jobject)(h.Context),
|
(C.jobject)(app.AppContext()),
|
||||||
unsafe.Pointer(&dex[0]),
|
unsafe.Pointer(&dex[0]),
|
||||||
C.int(len(dex)),
|
C.int(len(dex)),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// +build !android
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
func SetJVM() {
|
func SetJVM() {
|
||||||
|
|||||||
+19
-12
@@ -5,8 +5,9 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"gioui.org/app"
|
"gioui.org/app"
|
||||||
"gioui.org/layout"
|
|
||||||
"gioui.org/io/system"
|
"gioui.org/io/system"
|
||||||
|
"gioui.org/layout"
|
||||||
|
"gioui.org/op"
|
||||||
"gioui.org/unit"
|
"gioui.org/unit"
|
||||||
"gioui.org/widget/material"
|
"gioui.org/widget/material"
|
||||||
|
|
||||||
@@ -17,6 +18,11 @@ var (
|
|||||||
labchan chan string
|
labchan chan string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
D = layout.Dimensions
|
||||||
|
C = layout.Context
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
labchan = make(chan string)
|
labchan = make(chan string)
|
||||||
go eventloop()
|
go eventloop()
|
||||||
@@ -24,14 +30,13 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func eventloop() {
|
func eventloop() {
|
||||||
gofont.Register()
|
|
||||||
w := app.NewWindow(app.Title("Dex"))
|
w := app.NewWindow(app.Title("Dex"))
|
||||||
th := material.NewTheme()
|
th := material.NewTheme(gofont.Collection())
|
||||||
gtx := &layout.Context{Queue: w.Queue()}
|
var ops op.Ops
|
||||||
|
|
||||||
sysinset := &layout.Inset{}
|
sysinset := &layout.Inset{}
|
||||||
margin := layout.UniformInset(unit.Dp(10))
|
margin := layout.UniformInset(unit.Dp(10))
|
||||||
labels := []material.Label{}
|
labels := []material.LabelStyle{}
|
||||||
list := &layout.List{Axis: layout.Vertical}
|
list := &layout.List{Axis: layout.Vertical}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
@@ -49,22 +54,24 @@ func eventloop() {
|
|||||||
|
|
||||||
for { select {
|
for { select {
|
||||||
case x := <-labchan:
|
case x := <-labchan:
|
||||||
labels = append(labels, th.Body1(x))
|
labels = append(labels, material.Body1(th, x))
|
||||||
|
w.Invalidate()
|
||||||
case e := <-w.Events():
|
case e := <-w.Events():
|
||||||
switch e := e.(type) {
|
switch e := e.(type) {
|
||||||
case system.DestroyEvent:
|
case system.DestroyEvent:
|
||||||
return
|
return
|
||||||
case system.FrameEvent:
|
case system.FrameEvent:
|
||||||
gtx.Reset(e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
resetSysinset(e.Insets)
|
resetSysinset(e.Insets)
|
||||||
sysinset.Layout(gtx, func() {
|
sysinset.Layout(gtx, func(gtx C) D {
|
||||||
margin.Layout(gtx, func() {
|
return margin.Layout(gtx, func(gtx C) D {
|
||||||
list.Layout(gtx, len(labels), func(i int) {
|
return list.Layout(gtx, len(labels), func(gtx C, i int) D {
|
||||||
labels[i].Layout(gtx)
|
return labels[i].Layout(gtx)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
e.Frame(gtx.Ops)
|
e.Frame(gtx.Ops)
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
|||||||
|
package st.wow.git.fragment;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.Fragment;
|
||||||
|
import android.app.FragmentTransaction;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
public class AFrag extends Fragment {
|
||||||
|
@Override public void onAttach(Context ctx) {
|
||||||
|
Log.d("AFrag", "onAttach()");
|
||||||
|
super.onAttach(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void register(View view) {
|
||||||
|
Log.d("AFrag", "register(): view = " + view.getClass().getCanonicalName());
|
||||||
|
Log.d("AFrag", "register(): Adding fragment");
|
||||||
|
Activity act = (Activity)view.getContext();
|
||||||
|
Log.d("AFrag", "register(): starting transaction");
|
||||||
|
FragmentTransaction ft = act.getFragmentManager().beginTransaction();
|
||||||
|
Log.d("AFrag", "register(): add this");
|
||||||
|
ft.add(this, "AFrag");
|
||||||
|
Log.d("AFrag", "register(): commit");
|
||||||
|
ft.commitNow();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo LDFLAGS: -landroid
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <jni.h>
|
||||||
|
#include <android/log.h>
|
||||||
|
|
||||||
|
static jobject gClassLoader;
|
||||||
|
static jmethodID gFindClassMethod;
|
||||||
|
|
||||||
|
void
|
||||||
|
SetLoader(JNIEnv* env, jobject context) {
|
||||||
|
jclass cclass = (*env)->GetObjectClass(env, context);
|
||||||
|
jmethodID gcl_id = (*env)->GetMethodID(env, cclass, "getClassLoader", "()Ljava/lang/ClassLoader;");
|
||||||
|
jobject loader = (*env)->CallObjectMethod(env, context, gcl_id);
|
||||||
|
gClassLoader = (*env)->NewGlobalRef(env, loader);
|
||||||
|
jclass lclass = (*env)->GetObjectClass(env, loader);
|
||||||
|
gFindClassMethod = (*env)->GetMethodID(env, lclass, "findClass", "(Ljava/lang/String;)Ljava/lang/Class;");
|
||||||
|
}
|
||||||
|
|
||||||
|
jclass
|
||||||
|
FindClass(JNIEnv* env, char* name) {
|
||||||
|
jstring strClassName = (*env)->NewStringUTF(env, name);
|
||||||
|
return (*env)->CallObjectMethod(env, gClassLoader, gFindClassMethod, strClassName);
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jobject
|
||||||
|
CreateObject(JNIEnv* env, jclass cls) {
|
||||||
|
jmethodID init = (*env)->GetMethodID(env, cls, "<init>", "()V");
|
||||||
|
return (*env)->NewObject(env, cls, init);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CallVoidMethod(JNIEnv *env, jobject obj, jmethodID methodID) {
|
||||||
|
(*env)->CallVoidMethod(env, obj, methodID);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CallVoidMethod1(JNIEnv *env, jobject obj, jmethodID methodID, jobject param) {
|
||||||
|
(*env)->CallVoidMethod(env, obj, methodID, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
jint CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID) {
|
||||||
|
return (*env)->CallIntMethod(env, obj, methodID);
|
||||||
|
}
|
||||||
|
|
||||||
|
jmethodID GetMethodID(JNIEnv *env, jclass clazz, const char *name, const char *sig) {
|
||||||
|
return (*env)->GetMethodID(env, clazz, name, sig);
|
||||||
|
}
|
||||||
|
|
||||||
|
jint GetEnv(JavaVM *vm, JNIEnv **env, jint version) {
|
||||||
|
return (*vm)->GetEnv(vm, (void **)env, version);
|
||||||
|
}
|
||||||
|
|
||||||
|
jint AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args) {
|
||||||
|
return (*vm)->AttachCurrentThread(vm, p_env, thr_args);
|
||||||
|
}
|
||||||
|
|
||||||
|
jint DetachCurrentThread(JavaVM *vm) {
|
||||||
|
return (*vm)->DetachCurrentThread(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
import "C"
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"runtime"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
var theJVM *C.JavaVM
|
||||||
|
type JNIEnv = C.JNIEnv
|
||||||
|
|
||||||
|
func SetJVM(jvm, context uintptr) {
|
||||||
|
log.Print("set theJVM")
|
||||||
|
theJVM = (*C.JavaVM)(unsafe.Pointer(jvm))
|
||||||
|
log.Printf("theJVM = %d", uintptr(unsafe.Pointer(theJVM)))
|
||||||
|
RunInJVM(func(env *C.JNIEnv) {
|
||||||
|
C.SetLoader(env, (C.jobject)(context))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func FindClass(env *C.JNIEnv, name string) C.jclass {
|
||||||
|
cname := C.CString(name)
|
||||||
|
defer C.free(unsafe.Pointer(cname))
|
||||||
|
return C.FindClass((*C.JNIEnv)(env), cname)
|
||||||
|
}
|
||||||
|
|
||||||
|
func JniCallVoidMethod(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID) {
|
||||||
|
C.CallVoidMethod(env, obj, methodID)
|
||||||
|
}
|
||||||
|
|
||||||
|
func JniCallVoidMethod1(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, param uintptr) {
|
||||||
|
C.CallVoidMethod1(env, obj, methodID, (C.jobject)(unsafe.Pointer(param)))
|
||||||
|
}
|
||||||
|
|
||||||
|
func JniCallIntMethod(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID) int {
|
||||||
|
return (int)(C.CallIntMethod(env, obj, methodID))
|
||||||
|
}
|
||||||
|
|
||||||
|
func JniGetMethodID(env *C.JNIEnv, cls C.jclass, name, sig string) C.jmethodID {
|
||||||
|
cname := C.CString(name)
|
||||||
|
defer C.free(unsafe.Pointer(cname))
|
||||||
|
csig := C.CString(sig)
|
||||||
|
defer C.free(unsafe.Pointer(csig))
|
||||||
|
return C.GetMethodID(env, cls, cname, csig)
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateObject(env *C.JNIEnv, cls C.jclass) C.jobject {
|
||||||
|
return C.CreateObject(env, (C.jclass)(cls))
|
||||||
|
}
|
||||||
|
|
||||||
|
func RunInJVM(f func(env *C.JNIEnv)) {
|
||||||
|
runtime.LockOSThread()
|
||||||
|
defer runtime.UnlockOSThread()
|
||||||
|
var env *C.JNIEnv
|
||||||
|
var detach bool
|
||||||
|
log.Printf("RunInJVM(): theJVM = %d", uintptr(unsafe.Pointer(theJVM)))
|
||||||
|
if res := C.GetEnv(theJVM, &env, C.JNI_VERSION_1_6); res != C.JNI_OK {
|
||||||
|
if res != C.JNI_EDETACHED {
|
||||||
|
panic(fmt.Errorf("JNI GetEnv failed with error %d", res))
|
||||||
|
}
|
||||||
|
if C.AttachCurrentThread(theJVM, &env, nil) != C.JNI_OK {
|
||||||
|
panic(errors.New("runInJVM: AttachCurrentThread failed"))
|
||||||
|
}
|
||||||
|
detach = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if detach {
|
||||||
|
defer func() {
|
||||||
|
C.DetachCurrentThread(theJVM)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
f(env)
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
// +build darwin linux
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"gioui.org/app"
|
||||||
|
"gioui.org/io/system"
|
||||||
|
"gioui.org/layout"
|
||||||
|
"gioui.org/op"
|
||||||
|
"gioui.org/unit"
|
||||||
|
"gioui.org/widget/material"
|
||||||
|
|
||||||
|
"gioui.org/font/gofont"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
labchan chan string
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
D = layout.Dimensions
|
||||||
|
C = layout.Context
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
labchan = make(chan string)
|
||||||
|
log.Print("Staring event loop")
|
||||||
|
go eventloop()
|
||||||
|
app.Main()
|
||||||
|
log.Print("app.Main() returned")
|
||||||
|
}
|
||||||
|
|
||||||
|
func eventloop() {
|
||||||
|
w := app.NewWindow(
|
||||||
|
app.Size(unit.Dp(400), unit.Dp(400)),
|
||||||
|
app.Title("Hello"))
|
||||||
|
th := material.NewTheme(gofont.Collection())
|
||||||
|
var ops op.Ops
|
||||||
|
|
||||||
|
sysinset := &layout.Inset{}
|
||||||
|
margin := layout.UniformInset(unit.Dp(10))
|
||||||
|
labels := []material.LabelStyle{}
|
||||||
|
list := &layout.List{Axis: layout.Vertical}
|
||||||
|
|
||||||
|
resetSysinset := func(x system.Insets) {
|
||||||
|
sysinset.Top = x.Top
|
||||||
|
sysinset.Bottom = x.Bottom
|
||||||
|
sysinset.Left = x.Left
|
||||||
|
sysinset.Right = x.Right
|
||||||
|
}
|
||||||
|
go func() {
|
||||||
|
labchan <- "Starting"
|
||||||
|
registerFragment(w)
|
||||||
|
}()
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case x := <-labchan:
|
||||||
|
labels = append(labels, material.Body1(th, x))
|
||||||
|
case e := <-w.Events():
|
||||||
|
switch e := e.(type) {
|
||||||
|
case system.DestroyEvent:
|
||||||
|
return
|
||||||
|
case system.FrameEvent:
|
||||||
|
gtx := layout.NewContext(&ops, e)
|
||||||
|
resetSysinset(e.Insets)
|
||||||
|
sysinset.Layout(gtx, func(gtx C) D {
|
||||||
|
return margin.Layout(gtx, func(gtx C) D {
|
||||||
|
return list.Layout(gtx, len(labels), func(gtx C, i int) D {
|
||||||
|
return labels[i].Layout(gtx)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
e.Frame(gtx.Ops)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
//go:generate javac -bootclasspath $ANDROID_HOME/platforms/android-29/android.jar AFrag.java
|
||||||
|
//go:generate jar cf AFrag.jar AFrag.class
|
||||||
|
//go:generate rm AFrag.class
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"gioui.org/app"
|
||||||
|
)
|
||||||
|
|
||||||
|
func registerFragment(w *app.Window) {
|
||||||
|
labchan <- "registerFragment()"
|
||||||
|
SetJVM(app.JavaVM(), app.AppContext())
|
||||||
|
|
||||||
|
w.Do(func(view uintptr) {
|
||||||
|
RunInJVM(func(env *JNIEnv) {
|
||||||
|
log.Print("finding class")
|
||||||
|
cls := FindClass(env, "st/wow/git/fragment/AFrag")
|
||||||
|
log.Print("getting methodID")
|
||||||
|
mth := JniGetMethodID(env, cls, "register", "(Landroid/view/View;)V");
|
||||||
|
if mth == nil {
|
||||||
|
labchan <- "nil method"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Print("creating object")
|
||||||
|
inst := CreateObject(env, cls)
|
||||||
|
log.Print("calling method")
|
||||||
|
JniCallVoidMethod1(env, inst, mth, view)
|
||||||
|
log.Print("got result")
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// +build !android
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
func registerFragment() {
|
||||||
|
labchan <- "nothing to do"
|
||||||
|
}
|
||||||
|
|
||||||
+16
-10
@@ -8,6 +8,7 @@ import (
|
|||||||
"gioui.org/app"
|
"gioui.org/app"
|
||||||
"gioui.org/io/system"
|
"gioui.org/io/system"
|
||||||
"gioui.org/layout"
|
"gioui.org/layout"
|
||||||
|
"gioui.org/op"
|
||||||
"gioui.org/unit"
|
"gioui.org/unit"
|
||||||
"gioui.org/widget/material"
|
"gioui.org/widget/material"
|
||||||
|
|
||||||
@@ -18,6 +19,11 @@ var (
|
|||||||
labchan chan string
|
labchan chan string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
D = layout.Dimensions
|
||||||
|
C = layout.Context
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
labchan = make(chan string)
|
labchan = make(chan string)
|
||||||
log.Print("Staring event loop")
|
log.Print("Staring event loop")
|
||||||
@@ -27,16 +33,15 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func eventloop() {
|
func eventloop() {
|
||||||
gofont.Register()
|
|
||||||
w := app.NewWindow(
|
w := app.NewWindow(
|
||||||
app.Size(unit.Dp(400), unit.Dp(400)),
|
app.Size(unit.Dp(400), unit.Dp(400)),
|
||||||
app.Title("Hello"))
|
app.Title("Hello"))
|
||||||
th := material.NewTheme()
|
th := material.NewTheme(gofont.Collection())
|
||||||
gtx := &layout.Context{Queue: w.Queue()}
|
var ops op.Ops
|
||||||
|
|
||||||
sysinset := &layout.Inset{}
|
sysinset := &layout.Inset{}
|
||||||
margin := layout.UniformInset(unit.Dp(10))
|
margin := layout.UniformInset(unit.Dp(10))
|
||||||
labels := []material.Label{}
|
labels := []material.LabelStyle{}
|
||||||
list := &layout.List{Axis: layout.Vertical}
|
list := &layout.List{Axis: layout.Vertical}
|
||||||
|
|
||||||
resetSysinset := func(x system.Insets) {
|
resetSysinset := func(x system.Insets) {
|
||||||
@@ -52,18 +57,19 @@ func eventloop() {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case x := <-labchan:
|
case x := <-labchan:
|
||||||
labels = append(labels, th.Body1(x))
|
labels = append(labels, material.Body1(th, x))
|
||||||
|
w.Invalidate()
|
||||||
case e := <-w.Events():
|
case e := <-w.Events():
|
||||||
switch e := e.(type) {
|
switch e := e.(type) {
|
||||||
case system.DestroyEvent:
|
case system.DestroyEvent:
|
||||||
return
|
return
|
||||||
case system.FrameEvent:
|
case system.FrameEvent:
|
||||||
gtx.Reset(e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
resetSysinset(e.Insets)
|
resetSysinset(e.Insets)
|
||||||
sysinset.Layout(gtx, func() {
|
sysinset.Layout(gtx, func(gtx C) D {
|
||||||
margin.Layout(gtx, func() {
|
return margin.Layout(gtx, func(gtx C) D {
|
||||||
list.Layout(gtx, len(labels), func(i int) {
|
return list.Layout(gtx, len(labels), func(gtx C, i int) D {
|
||||||
labels[i].Layout(gtx)
|
return labels[i].Layout(gtx)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -14,10 +14,11 @@ import (
|
|||||||
|
|
||||||
func callJni() {
|
func callJni() {
|
||||||
time.Sleep(time.Second/5)
|
time.Sleep(time.Second/5)
|
||||||
h := app.PlatformHandle()
|
jvm := app.JavaVM()
|
||||||
labchan <- fmt.Sprintf("JVM = %d", h.JVM)
|
ctx := app.AppContext()
|
||||||
labchan <- fmt.Sprintf("Context = %d", h.Context)
|
labchan <- fmt.Sprintf("JVM = %d", jvm)
|
||||||
SetJVM(h.JVM, h.Context)
|
labchan <- fmt.Sprintf("Context = %d", ctx)
|
||||||
|
SetJVM(jvm, ctx)
|
||||||
|
|
||||||
RunInJVM(func(env *JNIEnv) {
|
RunInJVM(func(env *JNIEnv) {
|
||||||
log.Print("finding class")
|
log.Print("finding class")
|
||||||
|
|||||||
@@ -3,5 +3,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
func callJni() {
|
func callJni() {
|
||||||
|
labchan <- "nothing to do"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+104
-11
@@ -3,23 +3,41 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"image/color"
|
||||||
"log"
|
"log"
|
||||||
|
"time"
|
||||||
|
|
||||||
"gioui.org/app"
|
"gioui.org/app"
|
||||||
|
"gioui.org/f32"
|
||||||
"gioui.org/io/system"
|
"gioui.org/io/system"
|
||||||
"gioui.org/layout"
|
"gioui.org/layout"
|
||||||
|
"gioui.org/op"
|
||||||
|
"gioui.org/op/clip"
|
||||||
|
"gioui.org/op/paint"
|
||||||
"gioui.org/unit"
|
"gioui.org/unit"
|
||||||
"gioui.org/widget/material"
|
"gioui.org/widget/material"
|
||||||
|
|
||||||
"gioui.org/font/gofont"
|
"gioui.org/font/gofont"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type vector struct {
|
||||||
|
x, y, z float64
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
labchan chan string
|
labchan chan string
|
||||||
|
senschan chan vector
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
D = layout.Dimensions
|
||||||
|
C = layout.Context
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
labchan = make(chan string)
|
labchan = make(chan string)
|
||||||
|
senschan = make(chan vector)
|
||||||
log.Print("Staring event loop")
|
log.Print("Staring event loop")
|
||||||
go eventloop()
|
go eventloop()
|
||||||
app.Main()
|
app.Main()
|
||||||
@@ -34,16 +52,16 @@ func diffInsets(x, y system.Insets) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func eventloop() {
|
func eventloop() {
|
||||||
gofont.Register()
|
|
||||||
w := app.NewWindow(
|
w := app.NewWindow(
|
||||||
app.Size(unit.Dp(400), unit.Dp(400)),
|
app.Size(unit.Dp(400), unit.Dp(400)),
|
||||||
app.Title("Hello"))
|
app.Title("Hello"))
|
||||||
th := material.NewTheme()
|
|
||||||
gtx := &layout.Context{Queue: w.Queue()}
|
th := material.NewTheme(gofont.Collection())
|
||||||
|
var ops op.Ops
|
||||||
|
|
||||||
sysinset := &layout.Inset{}
|
sysinset := &layout.Inset{}
|
||||||
margin := layout.UniformInset(unit.Dp(10))
|
margin := layout.UniformInset(unit.Dp(10))
|
||||||
labels := []material.Label{}
|
labels := []material.LabelStyle{}
|
||||||
list := &layout.List{Axis: layout.Vertical}
|
list := &layout.List{Axis: layout.Vertical}
|
||||||
|
|
||||||
resetSysinset := func(x system.Insets) {
|
resetSysinset := func(x system.Insets) {
|
||||||
@@ -56,23 +74,98 @@ func eventloop() {
|
|||||||
go func() {
|
go func() {
|
||||||
labchan <- "Starting"
|
labchan <- "Starting"
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
var accel vector
|
||||||
|
accel.y = 1
|
||||||
|
|
||||||
|
lablist := func(gtx C) D {
|
||||||
|
return list.Layout(gtx, len(labels), func(gtx C, i int) D {
|
||||||
|
return labels[i].Layout(gtx)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
vecview := func(gtx C) D {
|
||||||
|
f := layout.Flex{Axis: layout.Horizontal, Spacing: layout.SpaceEvenly}
|
||||||
|
return f.Layout(gtx,
|
||||||
|
layout.Rigid(func(gtx C) D {
|
||||||
|
return material.Body1(th, fmt.Sprintf("x = %f", accel.x)).Layout(gtx)
|
||||||
|
}),
|
||||||
|
layout.Rigid(func(gtx C) D {
|
||||||
|
return material.Body1(th, fmt.Sprintf("y = %f", accel.y)).Layout(gtx)
|
||||||
|
}),
|
||||||
|
layout.Rigid(func(gtx C) D {
|
||||||
|
return material.Body1(th, fmt.Sprintf("z = %f", accel.z)).Layout(gtx)
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
var cx, cy, cvx, cvy, cs float32 // circle position
|
||||||
|
cx = 200
|
||||||
|
cy = 200
|
||||||
|
cs = 50 // circle size (radius)
|
||||||
|
|
||||||
|
circle := func(gtx C, width, height float32) D {
|
||||||
|
// clip circle position and bounce off of the edges
|
||||||
|
if (cx < cs) { cx = cs; cvx = (-0.5) * cvx }
|
||||||
|
if (cy < cs) { cy = cs; cvy = (-0.5) * cvy }
|
||||||
|
if (cx > width - cs) { cx = width - cs; cvx = (-0.5) * cvx }
|
||||||
|
if (cy > height - cs) { cy = height - cs; cvy = (-0.5) * cvy }
|
||||||
|
|
||||||
|
blue := color.RGBA{0x3f, 0x51, 0xb5, 0x80}
|
||||||
|
r1 := f32.Rectangle{f32.Point{cx - cs, cy - cs}, f32.Point{cx + cs, cy + cs}}
|
||||||
|
clip.Rect{ Rect: r1, NE: cs, NW: cs, SE: cs, SW: cs}.Op(gtx.Ops).Add(gtx.Ops)
|
||||||
|
paint.ColorOp{Color: blue}.Add(gtx.Ops)
|
||||||
|
paint.PaintOp{Rect: r1}.Add(gtx.Ops)
|
||||||
|
|
||||||
|
var ret D
|
||||||
|
ret.Size.X = int(cs * 2)
|
||||||
|
ret.Size.Y = int(cs * 2)
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
ticker := time.NewTicker(time.Second / 60)
|
||||||
|
|
||||||
|
var t, told int64
|
||||||
|
t = time.Now().UnixNano()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
case <- ticker.C:
|
||||||
|
told = t
|
||||||
|
t = time.Now().UnixNano()
|
||||||
|
elapsed := float32((t - told) / 1000000)
|
||||||
|
|
||||||
|
cvx = cvx - float32(accel.x/1000) * elapsed
|
||||||
|
cvy = cvy + float32(accel.y/1000) * elapsed
|
||||||
|
|
||||||
|
cx = cx + cvx * elapsed
|
||||||
|
cy = cy + cvy * elapsed
|
||||||
|
w.Invalidate()
|
||||||
|
|
||||||
case x := <-labchan:
|
case x := <-labchan:
|
||||||
labels = append(labels, th.Body1(x))
|
labels = append(labels, material.Body1(th, x))
|
||||||
|
|
||||||
|
case x := <-senschan:
|
||||||
|
accel = x
|
||||||
|
|
||||||
case e := <-w.Events():
|
case e := <-w.Events():
|
||||||
switch e := e.(type) {
|
switch e := e.(type) {
|
||||||
case system.DestroyEvent:
|
case system.DestroyEvent:
|
||||||
return
|
return
|
||||||
case system.FrameEvent:
|
case system.FrameEvent:
|
||||||
gtx.Reset(e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
resetSysinset(e.Insets)
|
resetSysinset(e.Insets)
|
||||||
sysinset.Layout(gtx, func() {
|
sysinset.Layout(gtx, func(gtx C) D {
|
||||||
margin.Layout(gtx, func() {
|
ret := margin.Layout(gtx, func(gtx C) D {
|
||||||
list.Layout(gtx, len(labels), func(i int) {
|
f1 := layout.Flex{Axis: layout.Vertical}
|
||||||
labels[i].Layout(gtx)
|
ret := f1.Layout(gtx,
|
||||||
})
|
layout.Rigid(vecview),
|
||||||
|
layout.Flexed(1, lablist),
|
||||||
|
)
|
||||||
|
circle(gtx, float32(ret.Size.X), float32(ret.Size.Y))
|
||||||
|
return ret
|
||||||
})
|
})
|
||||||
|
return ret
|
||||||
})
|
})
|
||||||
e.Frame(gtx.Ops)
|
e.Frame(gtx.Ops)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"runtime"
|
||||||
|
"unsafe"
|
||||||
|
|
||||||
"gioui.org/app"
|
|
||||||
ndk "git.wow.st/gmp/android-go/android27"
|
ndk "git.wow.st/gmp/android-go/android27"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -13,55 +13,74 @@ var (
|
|||||||
tag *ndk.Char
|
tag *ndk.Char
|
||||||
)
|
)
|
||||||
|
|
||||||
func mkHomeDir() {
|
|
||||||
msg := ndk.CharWithGoString("getting datadir")
|
|
||||||
ndk.AndroidLogWrite(ndk.ANDROID_LOG_WARN, tag, msg)
|
|
||||||
msg.Free()
|
|
||||||
|
|
||||||
godir, _ := app.DataDir()
|
|
||||||
labchan <- fmt.Sprintf("DataDir is %s", godir)
|
|
||||||
|
|
||||||
msg = ndk.CharWithGoString("ok. calling mkdir")
|
|
||||||
ndk.AndroidLogWrite(ndk.ANDROID_LOG_WARN, tag, msg)
|
|
||||||
msg.Free()
|
|
||||||
|
|
||||||
if _, err := os.Stat(godir); !os.IsNotExist(err) {
|
|
||||||
labchan <- "already exists"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if err := os.MkdirAll(godir, 0700); err != nil {
|
|
||||||
fmt.Sprintf("Error creating directory: %s", err)
|
|
||||||
labchan <- fmt.Sprintf("Error creating directory: %s", err)
|
|
||||||
} else {
|
|
||||||
labchan <- "created"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func apiLevel() {
|
func apiLevel() {
|
||||||
msg := ndk.CharWithGoString("hello log world")
|
msg := ndk.CharWithGoString("hello log world")
|
||||||
ndk.AndroidLogWrite(ndk.ANDROID_LOG_WARN, tag, msg)
|
ndk.AndroidLogWrite(ndk.ANDROID_LOG_WARN, tag, msg)
|
||||||
msg.Free()
|
msg.Free()
|
||||||
|
|
||||||
apilevel := ndk.AndroidGetDeviceApiLevel()
|
apilevel := ndk.AndroidGetDeviceApiLevel()
|
||||||
message := fmt.Sprintf("API level is %d", apilevel)
|
message := fmt.Sprintf("API level is %d", apilevel)
|
||||||
labchan <- message
|
labchan <- message
|
||||||
|
|
||||||
msg = ndk.CharWithGoString(message)
|
msg = ndk.CharWithGoString(message)
|
||||||
ndk.AndroidLogWrite(ndk.ANDROID_LOG_WARN, tag, msg)
|
ndk.AndroidLogWrite(ndk.ANDROID_LOG_WARN, tag, msg)
|
||||||
msg.Free()
|
msg.Free()
|
||||||
}
|
}
|
||||||
|
|
||||||
func getSensors() {
|
func sensorLoop() {
|
||||||
pkg := ndk.CharWithGoString("st.wow.git.jni")
|
// the Android Looper is thread-local
|
||||||
sm := ndk.ASensorManagerGetInstanceForPackage(pkg)
|
runtime.LockOSThread()
|
||||||
|
|
||||||
|
pkg := ndk.CharWithGoString("st.wow.git.sensors")
|
||||||
|
manager := ndk.ASensorManagerGetInstanceForPackage(pkg)
|
||||||
pkg.Free()
|
pkg.Free()
|
||||||
sens := ndk.ASensorManagerGetDefaultSensor(sm, ndk.ASENSOR_TYPE_ACCELEROMETER)
|
|
||||||
|
sens := ndk.ASensorManagerGetDefaultSensor(manager, ndk.ASENSOR_TYPE_ACCELEROMETER)
|
||||||
stp := ndk.ASensorGetStringType(sens)
|
stp := ndk.ASensorGetStringType(sens)
|
||||||
labchan <- "sensor" + stp.String()
|
labchan <- "sensor" + stp.String()
|
||||||
|
|
||||||
|
var looper *ndk.ALooper
|
||||||
|
var queue *ndk.ASensorEventQueue
|
||||||
|
looper_id := 1
|
||||||
|
var rate ndk.Int32_t = 60
|
||||||
|
|
||||||
|
setup := func() {
|
||||||
|
looper = ndk.ALooperForThread()
|
||||||
|
if (looper == nil) {
|
||||||
|
labchan <- "no looper for thread"
|
||||||
|
looper = ndk.ALooperPrepare(ndk.ALOOPER_PREPARE_ALLOW_NON_CALLBACKS)
|
||||||
|
}
|
||||||
|
|
||||||
|
queue = ndk.ASensorManagerCreateEventQueue(manager, looper, looper_id)
|
||||||
|
|
||||||
|
ndk.ASensorEventQueueEnableSensor(queue, sens)
|
||||||
|
ndk.ASensorEventQueueSetEventRate(queue, sens, 1000000/rate) // microseconds
|
||||||
|
}
|
||||||
|
|
||||||
|
setup()
|
||||||
|
labchan <- "polling accelerometer"
|
||||||
|
for {
|
||||||
|
var zero ndk.Int
|
||||||
|
id := (int)(ndk.ALooperPollOnce(-1, &zero, &zero, (*unsafe.Pointer)(unsafe.Pointer(nil)))) // poll forever
|
||||||
|
if (id == ndk.ALOOPER_POLL_ERROR) { // set up a new looper
|
||||||
|
labchan <- "getting a new looper"
|
||||||
|
setup()
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if (id == looper_id) {
|
||||||
|
var event ndk.ASensorEvent
|
||||||
|
if (ndk.ASensorEventQueueGetEvents(queue, &event, 1) != 1) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
accel := (&event).Acceleration()
|
||||||
|
senschan <- vector{float64(accel.X()), float64(accel.Y()), float64(accel.Z())}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
tag = ndk.CharWithGoString("gio")
|
tag = ndk.CharWithGoString("gio")
|
||||||
log.Print("Android starting")
|
log.Print("Android starting")
|
||||||
go apiLevel()
|
go apiLevel()
|
||||||
go mkHomeDir()
|
go sensorLoop()
|
||||||
go getSensors()
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module git.wow.st/gmp/android-go
|
module git.wow.st/gmp/android-go
|
||||||
|
|
||||||
go 1.13
|
go 1.14
|
||||||
|
|
||||||
require gioui.org v0.0.0-20191031200634-4e71f195ab51
|
require gioui.org v0.0.0-20200619121558-88ced59dad93
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
gioui.org v0.0.0-20191031200634-4e71f195ab51 h1:Epxo/e6oPvbDMMB8rrpmUlBe6ELeDpRuLzFUGfT6kJM=
|
gioui.org v0.0.0-20191031200634-4e71f195ab51 h1:Epxo/e6oPvbDMMB8rrpmUlBe6ELeDpRuLzFUGfT6kJM=
|
||||||
gioui.org v0.0.0-20191031200634-4e71f195ab51/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
|
gioui.org v0.0.0-20191031200634-4e71f195ab51/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
|
||||||
|
gioui.org v0.0.0-20191112235626-1bf2c7ef293c h1:jhUehzf6xTCgEewbJyjd+WE2Kq5pvPIxq2MahDph0mg=
|
||||||
|
gioui.org v0.0.0-20191112235626-1bf2c7ef293c/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
|
||||||
|
gioui.org v0.0.0-20200611133933-6d5fbcba3f21 h1:VFB+0QxUPABMgEarfyJeHQvUNc++9TASnDVXcFgxLcA=
|
||||||
|
gioui.org v0.0.0-20200611133933-6d5fbcba3f21/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
|
||||||
|
gioui.org v0.0.0-20200619121558-88ced59dad93 h1:Llh4Tigdbu++FrRXL/KzqDHnH2Q5LPmAEk0djh6NLwk=
|
||||||
|
gioui.org v0.0.0-20200619121558-88ced59dad93/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
@@ -11,6 +17,8 @@ golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgn
|
|||||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=
|
golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=
|
||||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
|
golang.org/x/image v0.0.0-20200618115811-c13761719519 h1:1e2ufUJNM3lCHEY5jIgac/7UTjd6cgJNdatjPdFWf34=
|
||||||
|
golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
@@ -20,6 +28,7 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
|
|||||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
|||||||
Reference in New Issue
Block a user