shiny: add go.mod file

The shiny package is not related to other exp packages.
Put it in a separate module.

This package uses a modified copy of github.com/BurntSushi/xgb.
Move that out of the vendor directory, so that current go commands work.

For golang/go#37175

Change-Id: Ib3bad0823d2651ff90a9651e405ed7bcd9de94b6
Reviewed-on: https://go-review.googlesource.com/c/exp/+/383197
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Trust: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/shiny/driver/x11driver/buffer.go b/shiny/driver/x11driver/buffer.go
index a905928..c49cbfd 100644
--- a/shiny/driver/x11driver/buffer.go
+++ b/shiny/driver/x11driver/buffer.go
@@ -12,10 +12,11 @@
 	"sync"
 	"unsafe"
 
-	"github.com/BurntSushi/xgb"
-	"github.com/BurntSushi/xgb/render"
-	"github.com/BurntSushi/xgb/shm"
-	"github.com/BurntSushi/xgb/xproto"
+	"golang.org/x/exp/shiny/internal/xgb"
+	"golang.org/x/exp/shiny/internal/xgb/render"
+	"golang.org/x/exp/shiny/internal/xgb/shm"
+	"golang.org/x/exp/shiny/internal/xgb/xproto"
+
 	"golang.org/x/exp/shiny/driver/internal/swizzle"
 )
 
diff --git a/shiny/driver/x11driver/buffer_fallback.go b/shiny/driver/x11driver/buffer_fallback.go
index bfdd9c7..e8545f1 100644
--- a/shiny/driver/x11driver/buffer_fallback.go
+++ b/shiny/driver/x11driver/buffer_fallback.go
@@ -8,8 +8,9 @@
 	"image"
 	"sync"
 
-	"github.com/BurntSushi/xgb"
-	"github.com/BurntSushi/xgb/xproto"
+	"golang.org/x/exp/shiny/internal/xgb"
+	"golang.org/x/exp/shiny/internal/xgb/xproto"
+
 	"golang.org/x/exp/shiny/driver/internal/swizzle"
 )
 
diff --git a/shiny/driver/x11driver/screen.go b/shiny/driver/x11driver/screen.go
index 0d0374b..e62d86a 100644
--- a/shiny/driver/x11driver/screen.go
+++ b/shiny/driver/x11driver/screen.go
@@ -12,10 +12,10 @@
 	"log"
 	"sync"
 
-	"github.com/BurntSushi/xgb"
-	"github.com/BurntSushi/xgb/render"
-	"github.com/BurntSushi/xgb/shm"
-	"github.com/BurntSushi/xgb/xproto"
+	"golang.org/x/exp/shiny/internal/xgb"
+	"golang.org/x/exp/shiny/internal/xgb/render"
+	"golang.org/x/exp/shiny/internal/xgb/shm"
+	"golang.org/x/exp/shiny/internal/xgb/xproto"
 
 	"golang.org/x/exp/shiny/driver/internal/x11key"
 	"golang.org/x/exp/shiny/screen"
diff --git a/shiny/driver/x11driver/texture.go b/shiny/driver/x11driver/texture.go
index 8ca4759..96212b3 100644
--- a/shiny/driver/x11driver/texture.go
+++ b/shiny/driver/x11driver/texture.go
@@ -11,8 +11,8 @@
 	"math"
 	"sync"
 
-	"github.com/BurntSushi/xgb/render"
-	"github.com/BurntSushi/xgb/xproto"
+	"golang.org/x/exp/shiny/internal/xgb/render"
+	"golang.org/x/exp/shiny/internal/xgb/xproto"
 
 	"golang.org/x/exp/shiny/screen"
 	"golang.org/x/image/math/f64"
diff --git a/shiny/driver/x11driver/window.go b/shiny/driver/x11driver/window.go
index f77b876..12ac215 100644
--- a/shiny/driver/x11driver/window.go
+++ b/shiny/driver/x11driver/window.go
@@ -12,9 +12,9 @@
 	"image/draw"
 	"sync"
 
-	"github.com/BurntSushi/xgb"
-	"github.com/BurntSushi/xgb/render"
-	"github.com/BurntSushi/xgb/xproto"
+	"golang.org/x/exp/shiny/internal/xgb"
+	"golang.org/x/exp/shiny/internal/xgb/render"
+	"golang.org/x/exp/shiny/internal/xgb/xproto"
 
 	"golang.org/x/exp/shiny/driver/internal/drawer"
 	"golang.org/x/exp/shiny/driver/internal/event"
diff --git a/shiny/driver/x11driver/x11driver.go b/shiny/driver/x11driver/x11driver.go
index 1ba227e..e8c60a6 100644
--- a/shiny/driver/x11driver/x11driver.go
+++ b/shiny/driver/x11driver/x11driver.go
@@ -13,9 +13,9 @@
 import (
 	"fmt"
 
-	"github.com/BurntSushi/xgb"
-	"github.com/BurntSushi/xgb/render"
-	"github.com/BurntSushi/xgb/shm"
+	"golang.org/x/exp/shiny/internal/xgb"
+	"golang.org/x/exp/shiny/internal/xgb/render"
+	"golang.org/x/exp/shiny/internal/xgb/shm"
 
 	"golang.org/x/exp/shiny/driver/internal/errscreen"
 	"golang.org/x/exp/shiny/screen"
diff --git a/shiny/go.mod b/shiny/go.mod
new file mode 100644
index 0000000..ae1f22c
--- /dev/null
+++ b/shiny/go.mod
@@ -0,0 +1,11 @@
+module golang.org/x/exp/shiny
+
+go 1.18
+
+require (
+	dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037
+	github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4
+	golang.org/x/image v0.0.0-20190802002840-cff245a6509b
+	golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f
+	golang.org/x/sys v0.0.0-20211019181941-9d821ace8654
+)
diff --git a/shiny/go.sum b/shiny/go.sum
new file mode 100644
index 0000000..3139081
--- /dev/null
+++ b/shiny/go.sum
@@ -0,0 +1,33 @@
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037 h1:+PdD6GLKejR9DizMAKT5DpSAkKswvZrurk1/eEt9+pw=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 h1:estk1glOnSVeJ9tdEZZc5mAMDZk5lNJNyJ6DvrBkTEU=
+golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
+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/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
+golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f h1:kgfVkAEEQXXQ0qc6dH7n6y37NAYmTFmz0YRwrRjgxKw=
+golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4=
+golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
+golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/AUTHORS b/shiny/internal/xgb/AUTHORS
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/AUTHORS
rename to shiny/internal/xgb/AUTHORS
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/CONTRIBUTORS b/shiny/internal/xgb/CONTRIBUTORS
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/CONTRIBUTORS
rename to shiny/internal/xgb/CONTRIBUTORS
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/LICENSE b/shiny/internal/xgb/LICENSE
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/LICENSE
rename to shiny/internal/xgb/LICENSE
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/README b/shiny/internal/xgb/README
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/README
rename to shiny/internal/xgb/README
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/README.vendor b/shiny/internal/xgb/README.vendor
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/README.vendor
rename to shiny/internal/xgb/README.vendor
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/auth.go b/shiny/internal/xgb/auth.go
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/auth.go
rename to shiny/internal/xgb/auth.go
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/conn.go b/shiny/internal/xgb/conn.go
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/conn.go
rename to shiny/internal/xgb/conn.go
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/cookie.go b/shiny/internal/xgb/cookie.go
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/cookie.go
rename to shiny/internal/xgb/cookie.go
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/doc.go b/shiny/internal/xgb/doc.go
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/doc.go
rename to shiny/internal/xgb/doc.go
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/help.go b/shiny/internal/xgb/help.go
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/help.go
rename to shiny/internal/xgb/help.go
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/render/render.go b/shiny/internal/xgb/render/render.go
similarity index 99%
rename from shiny/vendor/github.com/BurntSushi/xgb/render/render.go
rename to shiny/internal/xgb/render/render.go
index f90065b..0731c96 100644
--- a/shiny/vendor/github.com/BurntSushi/xgb/render/render.go
+++ b/shiny/internal/xgb/render/render.go
@@ -4,9 +4,9 @@
 // This file is automatically generated from render.xml. Edit at your peril!
 
 import (
-	"github.com/BurntSushi/xgb"
+	"golang.org/x/exp/shiny/internal/xgb"
 
-	"github.com/BurntSushi/xgb/xproto"
+	"golang.org/x/exp/shiny/internal/xgb/xproto"
 )
 
 // Init must be called before using the RENDER extension.
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/shm/shm.go b/shiny/internal/xgb/shm/shm.go
similarity index 99%
rename from shiny/vendor/github.com/BurntSushi/xgb/shm/shm.go
rename to shiny/internal/xgb/shm/shm.go
index e5841ca..e50be1c 100644
--- a/shiny/vendor/github.com/BurntSushi/xgb/shm/shm.go
+++ b/shiny/internal/xgb/shm/shm.go
@@ -4,9 +4,9 @@
 // This file is automatically generated from shm.xml. Edit at your peril!
 
 import (
-	"github.com/BurntSushi/xgb"
+	"golang.org/x/exp/shiny/internal/xgb"
 
-	"github.com/BurntSushi/xgb/xproto"
+	"golang.org/x/exp/shiny/internal/xgb/xproto"
 )
 
 // Init must be called before using the MIT-SHM extension.
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/sync.go b/shiny/internal/xgb/sync.go
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/sync.go
rename to shiny/internal/xgb/sync.go
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/xgb.go b/shiny/internal/xgb/xgb.go
similarity index 100%
rename from shiny/vendor/github.com/BurntSushi/xgb/xgb.go
rename to shiny/internal/xgb/xgb.go
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/xproto/xproto.go b/shiny/internal/xgb/xproto/xproto.go
similarity index 99%
rename from shiny/vendor/github.com/BurntSushi/xgb/xproto/xproto.go
rename to shiny/internal/xgb/xproto/xproto.go
index 728f85f..f41e656 100644
--- a/shiny/vendor/github.com/BurntSushi/xgb/xproto/xproto.go
+++ b/shiny/internal/xgb/xproto/xproto.go
@@ -4,7 +4,7 @@
 // This file is automatically generated from xproto.xml. Edit at your peril!
 
 import (
-	"github.com/BurntSushi/xgb"
+	"golang.org/x/exp/shiny/internal/xgb"
 )
 
 // Setup parses the setup bytes retrieved when
diff --git a/shiny/vendor/github.com/BurntSushi/xgb/xproto/xproto_test.go b/shiny/internal/xgb/xproto/xproto_test.go
similarity index 99%
rename from shiny/vendor/github.com/BurntSushi/xgb/xproto/xproto_test.go
rename to shiny/internal/xgb/xproto/xproto_test.go
index 30ec533..56dc417 100644
--- a/shiny/vendor/github.com/BurntSushi/xgb/xproto/xproto_test.go
+++ b/shiny/internal/xgb/xproto/xproto_test.go
@@ -27,7 +27,7 @@
 	"testing"
 	"time"
 
-	"github.com/BurntSushi/xgb"
+	"golang.org/x/exp/shiny/internal/xgb"
 )
 
 // The X connection used throughout testing.