Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Florian Blasius
OrbRender
Commits
3c1893b6
Commit
3c1893b6
authored
Jan 01, 2019
by
Florian Blasius
🤘
Browse files
Refactoring data types and examples.
parent
be574696
Pipeline
#2402
passed with stage
in 2 minutes and 22 seconds
Changes
26
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.vscode/launch.json
View file @
3c1893b6
...
...
@@ -8,9 +8,9 @@
"type"
:
"lldb"
,
"request"
:
"launch"
,
"name"
:
"Debug minimal"
,
"program"
:
"${workspaceFolder}/
examples/
target/debug/minimal"
,
"program"
:
"${workspaceFolder}/target/debug/
examples/
minimal"
,
"cwd"
:
"${workspaceFolder}"
,
"preLaunchTask"
:
"build-
minimal
"
,
"preLaunchTask"
:
"build-
examples
"
,
"sourceLanguages"
:
[
"rust"
]
...
...
@@ -19,9 +19,20 @@
"type"
:
"lldb"
,
"request"
:
"launch"
,
"name"
:
"Debug drawing"
,
"program"
:
"${workspaceFolder}/
examples/
target/debug/drawing"
,
"program"
:
"${workspaceFolder}/target/debug/
examples/
drawing"
,
"cwd"
:
"${workspaceFolder}"
,
"preLaunchTask"
:
"build-drawing"
,
"preLaunchTask"
:
"build-examples"
,
"sourceLanguages"
:
[
"rust"
]
},
{
"type"
:
"lldb"
,
"request"
:
"launch"
,
"name"
:
"Debug dragging"
,
"program"
:
"${workspaceFolder}/target/debug/examples/dragging"
,
"cwd"
:
"${workspaceFolder}"
,
"preLaunchTask"
:
"build-examples"
,
"sourceLanguages"
:
[
"rust"
]
...
...
.vscode/tasks.json
View file @
3c1893b6
...
...
@@ -4,15 +4,12 @@
"version"
:
"2.0.0"
,
"tasks"
:
[
{
"label"
:
"build-
minimal
"
,
"label"
:
"build-
examples
"
,
"command"
:
"cargo"
,
"type"
:
"shell"
,
"args"
:
[
"build"
,
"--manifest-path"
,
"examples/Cargo.toml"
,
"--bin"
,
"minimal"
"--examples"
],
"presentation"
:
{
"reveal"
:
"always"
,
...
...
@@ -24,15 +21,16 @@
}
},
{
"label"
:
"
build-drawing
"
,
"label"
:
"
run web examples
"
,
"command"
:
"cargo"
,
"type"
:
"shell"
,
"args"
:
[
"build"
,
"--manifest-path"
,
"examples/Cargo.toml"
,
"--bin"
,
"drawing"
"web"
,
"start"
,
"--target=wasm32-unknown-unknown"
,
"----auto-reload"
,
"--example"
,
"dragging"
],
"presentation"
:
{
"reveal"
:
"always"
,
...
...
@@ -42,6 +40,6 @@
"kind"
:
"build"
,
"isDefault"
:
true
}
}
}
,
]
}
\ No newline at end of file
Cargo.lock
View file @
3c1893b6
...
...
@@ -89,7 +89,7 @@ name = "orbclient"
version = "0.3.20"
source = "git+https://gitlab.redox-os.org/redox-os/orbclient.git#9df7d2c8b82b231dae7fe5f5e8a5e041d837e214"
dependencies = [
"redox_syscall 0.1.
49
(registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.
50
(registry+https://github.com/rust-lang/crates.io-index)",
"sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -140,7 +140,7 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.1.
49
"
version = "0.1.
50
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
...
...
@@ -197,12 +197,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "1.0.8
3
"
version = "1.0.8
4
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
version = "1.0.8
3
"
version = "1.0.8
4
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
...
...
@@ -212,12 +212,12 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.3
3
"
version = "1.0.3
4
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -232,8 +232,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.3
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.3
4
(registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-internal-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
...
...
@@ -246,8 +246,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -259,9 +259,9 @@ dependencies = [
"base-x 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.3
3
(registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.3
4
(registry+https://github.com/rust-lang/crates.io-index)",
"sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -325,7 +325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
"checksum redox_syscall 0.1.
49
(registry+https://github.com/rust-lang/crates.io-index)" = "
f22c50afdcf3f0a31ebb6b47697f6a7c5e5a24967e842858118bce0615f0afad
"
"checksum redox_syscall 0.1.
50
(registry+https://github.com/rust-lang/crates.io-index)" = "
52ee9a534dc1301776eff45b4fa92d2c39b1d8c3d3357e6eb593e0d795506fc2
"
"checksum rust-cairo 0.1.0 (git+https://gitlab.redox-os.org/redox-os/rust-cairo.git)" = "<none>"
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
...
...
@@ -333,9 +333,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum serde 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)" = "
157e12af46859e968da75dea9845530e13d03bcab2009a41b9b7bb3cf4eb3ec2
"
"checksum serde_derive 1.0.8
3
(registry+https://github.com/rust-lang/crates.io-index)" = "
9469829702497daf2daf3c190e130c3fa72f719920f73c86
160d
43e8f8d76951
"
"checksum serde_json 1.0.3
3
(registry+https://github.com/rust-lang/crates.io-index)" = "
c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811
"
"checksum serde 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)" = "
0e732ed5a5592c17d961555e3b552985baf98d50ce418b7b655f31f6ba7eb1b7
"
"checksum serde_derive 1.0.8
4
(registry+https://github.com/rust-lang/crates.io-index)" = "
b4d6115a3ca25c224e409185325afc
16
a
0d
5aaaabc15c42b09587d6f1ba39a5b
"
"checksum serde_json 1.0.3
4
(registry+https://github.com/rust-lang/crates.io-index)" = "
bdf540260cfee6da923831f4776ddc495ada940c30117977c70f1313a6130545
"
"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
"checksum stdweb 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b84f9c829ef7d2e6abf1965393b231c0fd495f0293d612f32dbadd637e91fd0d"
"checksum stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e21ebd9179de08f2300a65454268a17ea3de204627458588c84319c4def3930"
...
...
examples/.DS_Store
deleted
100644 → 0
View file @
be574696
File deleted
examples/Cargo.lock
deleted
100644 → 0
View file @
be574696
[[package]]
name = "base-x"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitflags"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitflags"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cfg-if"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "discard"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "dragging"
version = "0.1.0"
dependencies = [
"orbrender 0.1.0",
"time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "drawing"
version = "0.1.0"
dependencies = [
"orbrender 0.1.0",
"time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "itoa"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazy_static"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "minimal"
version = "0.1.0"
dependencies = [
"orbrender 0.1.0",
]
[[package]]
name = "num"
version = "0.1.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-integer"
version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-iter"
version = "0.1.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-traits"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "orbclient"
version = "0.3.20"
source = "git+https://gitlab.redox-os.org/redox-os/orbclient.git#9df7d2c8b82b231dae7fe5f5e8a5e041d837e214"
dependencies = [
"redox_syscall 0.1.49 (registry+https://github.com/rust-lang/crates.io-index)",
"sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "orbrender"
version = "0.1.0"
dependencies = [
"orbclient 0.3.20 (git+https://gitlab.redox-os.org/redox-os/orbclient.git)",
"rust-cairo 0.1.0 (git+https://gitlab.redox-os.org/redox-os/rust-cairo.git)",
"stdweb 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "proc-macro2"
version = "0.4.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quote"
version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rand"
version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rand"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "redox_syscall"
version = "0.1.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rust-cairo"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/rust-cairo.git#1482cdb320e19618fc8624163ca3e1606d4ae00a"
[[package]]
name = "rustc_version"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ryu"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "sdl2"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sdl2-sys"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "semver"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "semver-parser"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_json"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sha1"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "stdweb"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-internal-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "stdweb-derive"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "stdweb-internal-macros"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"base-x 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "stdweb-internal-runtime"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "syn"
version = "0.15.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "time"
version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.49 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum base-x 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5cda5d0f5584d129112ad8bf4775b9fd2b9f1e30738c7b1a25314ba2244d6a51"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
"checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74"
"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e"
"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
"checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124"
"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1"
"checksum orbclient 0.3.20 (git+https://gitlab.redox-os.org/redox-os/orbclient.git)" = "<none>"
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
"checksum redox_syscall 0.1.49 (registry+https://github.com/rust-lang/crates.io-index)" = "f22c50afdcf3f0a31ebb6b47697f6a7c5e5a24967e842858118bce0615f0afad"
"checksum rust-cairo 0.1.0 (git+https://gitlab.redox-os.org/redox-os/rust-cairo.git)" = "<none>"
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
"checksum sdl2 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a74c2a98a354b20713b90cce70aef9e927e46110d1bc4ef728fd74e0d53eba60"
"checksum sdl2-sys 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c543ce8a6e33a30cb909612eeeb22e693848211a84558d5a00bb11e791b7ab7"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum serde 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)" = "157e12af46859e968da75dea9845530e13d03bcab2009a41b9b7bb3cf4eb3ec2"
"checksum serde_derive 1.0.83 (registry+https://github.com/rust-lang/crates.io-index)" = "9469829702497daf2daf3c190e130c3fa72f719920f73c86160d43e8f8d76951"
"checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811"
"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
"checksum stdweb 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b84f9c829ef7d2e6abf1965393b231c0fd495f0293d612f32dbadd637e91fd0d"
"checksum stdweb-derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e21ebd9179de08f2300a65454268a17ea3de204627458588c84319c4def3930"
"checksum stdweb-internal-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d60e306bddd5d213f86f7b417b6cdcefbf742917414ac9dda6e9750ef4553dce"
"checksum stdweb-internal-runtime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a2a2f4a2eb556337b2d1a302630bbddf989ae383c70393e89b48152b9896cbda"
"checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc"
"checksum time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "847da467bf0db05882a9e2375934a8a55cffdc9db0d128af1518200260ba1f6c"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
examples/Cargo.toml
deleted
100644 → 0
View file @
be574696
[workspace]
members
=
[
"dragging"
,
"drawing"
,
"minimal"
]
examples/dragging
/src/main
.rs
→
examples/dragging.rs
View file @
3c1893b6
use
orbrender
;
use
orbrender
::
backend
::
Runner
;
use
orbrender
::
prelude
::
*
;
use
time
::
PreciseTime
;
//
use time::PreciseTime;
use
std
::
sync
::
atomic
::{
self
,
AtomicBool
};
use
std
::
sync
::
Arc
;
struct
State
{
pub
mouse_delta
:
(
f
32
,
f
32
),
pub
mouse_position
:
(
f
32
,
f
32
),
pub
rect
:
(
f
32
,
f
32
,
f
32
,
f
32
),
pub
mouse_delta
:
(
f
64
,
f
64
),
pub
mouse_position
:
(
f
64
,
f
64
),
pub
rect
:
(
f
64
,
f
64
,
f
64
,
f
64
),
pub
rect_pressed
:
bool
,
pub
rect_index
:
usize
,
}
...
...
@@ -35,7 +35,7 @@ fn main() {
Rectangle
::
default
()
.with_size
(
Size
::
new
(
example_state
.rect
.2
,
example_state
.rect
.3
))
.with_position
(
Point
::
new
(
example_state
.rect
.0
,
example_state
.rect
.1
))
.with_background
(
Color
::
rgb
(
255
,
0
,
0
)),
.with_background
(
Color
::
rgb
(
100
,
123
,
145
)),
);
window
.push_text
(
...
...
@@ -68,12 +68,25 @@ fn main() {
&&
pos
.1
<=
rect
.1
+
rect
.3
{
example_state
.rect_pressed
=
true
;
if
let
Some
(
rect
)
=
window
.get_mut_rectangle
(
example_state
.rect_index
)
{
rect
.background
=
Some
(
Color
::
rgb
(
248
,
222
,
97
));
update
.store
(
true
,
atomic
::
Ordering
::
Release
);
}
}
else
{
example_state
.rect_pressed
=
false
;
example_state
.mouse_delta
=
(
0.0
,
0.0
);
}
}
else
if
button
==
MouseButton
::
Left
&&
state
==
ElementState
::
Released
{
if
example_state
.rect_pressed
{
if
let
Some
(
rect
)
=
window
.get_mut_rectangle
(
example_state
.rect_index
)
{
rect
.background
=
Some
(
Color
::
rgb
(
100
,
123
,
145
));
update
.store
(
true
,
atomic
::
Ordering
::
Release
);
}
}
example_state
.rect_pressed
=
false
;
}
}
MouseEvent
::
Move
(
point
)
=>
{
...
...
examples/dragging/Cargo.toml
deleted
100644 → 0
View file @
be574696
[package]
name
=
"dragging"
version
=
"0.1.0"
authors
=
[
"Florian Blasius <flovanpt@posteo.de>"
]
edition
=
"2018"
[dependencies]
time
=
"0.1.41"
orbrender
=
{
path
=
"../.."
}
\ No newline at end of file
examples/drawing
/src/main
.rs
→
examples/drawing.rs
View file @
3c1893b6
use
orbrender
;
use
orbrender
::
backend
::
Runner
;