Skip to content

Commit 5dd19f4

Browse files
v0.1.3
1 parent 493aa1a commit 5dd19f4

File tree

680 files changed

+94400
-11991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

680 files changed

+94400
-11991
lines changed

.github/workflows/coverage.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
profile: minimal
2828
default: true
2929

30-
- name: Install Clutter
31-
run: sudo apt-get update && sudo apt-get install libclutter-1.0-dev libpango1.0-dev
30+
- name: Install udev
31+
run: sudo apt-get install libudev-dev
3232

3333
- name: Restore cache
3434
uses: Swatinem/rust-cache@v1

.github/workflows/tests.yml

+34-15
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,46 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
7+
name: Build and test
88
runs-on: ubuntu-latest
9-
109
steps:
11-
- uses: actions/checkout@v1
12-
- name: Install Clutter
13-
run: sudo apt-get update && sudo apt-get install libclutter-1.0-dev libpango1.0-dev
14-
- name: Build
15-
run: cargo build --verbose
16-
- name: Run tests
17-
run: cargo test --verbose
10+
- name: Checkout repository
11+
uses: actions/checkout@v2
1812

19-
clippy_check:
13+
- name: Install Rust
14+
uses: actions-rs/toolchain@v1
15+
with:
16+
toolchain: nightly
17+
profile: minimal
18+
default: true
19+
components: rustfmt, clippy
2020

21-
runs-on: ubuntu-latest
21+
- name: Install udev
22+
run: sudo apt-get install libudev-dev
23+
24+
- name: Build
25+
run: cargo build --verbose
26+
- name: Run tests
27+
run: cargo test --verbose
2228

29+
clippy_check:
30+
name: Clippy check
31+
runs-on: ubuntu-latest
2332
steps:
24-
- uses: actions/checkout@v1
25-
- run: rustup component add clippy
26-
- name: Install Clutter
27-
run: sudo apt-get update && sudo apt-get install libclutter-1.0-dev libpango1.0-dev
33+
- name: Checkout repository
34+
uses: actions/checkout@v2
35+
36+
- name: Install Rust
37+
uses: actions-rs/toolchain@v1
38+
with:
39+
toolchain: nightly
40+
profile: minimal
41+
default: true
42+
components: rustfmt, clippy
43+
44+
- name: Install udev
45+
run: sudo apt-get install libudev-dev
46+
2847
- uses: actions-rs/clippy-check@v1
2948
with:
3049
token: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ux-components"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
authors = ["Victor Dudochkin <[email protected]>"]
55
readme = "README.md"
66
homepage = "https://angular-rust.github.io/ux-components"
@@ -22,32 +22,35 @@ name = "components"
2222
features = ["dox"]
2323

2424
[features]
25-
dox = ["ux-animate/dox", "ux-charts/dox", "ux-dx/dox", "gobject-sys/dox", "pango/dox"]
26-
# , "x11/dox"
25+
dox = ["ux-dx/dox"]
26+
# "ux-charts/dox"
27+
# "ux-animate/dox", "x11/dox", "gobject-sys/dox", , "pango/dox"
2728

2829
[dependencies]
2930
log = "0.4"
3031
bitflags = "1.0"
31-
ruex = "0.1"
32+
rand = "0.8"
3233
ux-macro = "0.1"
33-
ux-dx = "0.1"
34+
ux-dx = "0.2"
3435
ux-dataflow = "0.1"
35-
ux-animate = "0.1"
36-
ux-charts = "0.1"
37-
once_cell = "1.7.2"
38-
intmap = "0.7.0"
39-
url = "2.2.1"
40-
fontdue = "0.5.0"
36+
# ux-animate = "0.1"
37+
# ux-charts = "0.1"
38+
once_cell = "1.7"
39+
intmap = "0.7"
40+
url = "2.2"
41+
fontdue = "0.7.2"
42+
cgmath = "0.18"
43+
structopt = "0.3"
44+
stretch = "0.3.2"
4145
# ux-css = "0"
46+
crossbeam = "0.8.1"
47+
bytes = "1.1.0"
48+
futures = "0.3.21"
4249

4350
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
44-
png = "0.16"
45-
gobject-sys = "0.10"
46-
glib = "0.10"
47-
pango = "0.9"
48-
# x11 = "2.18"
49-
cairo-rs = { version = "0.9", features = ["png"] }
50-
gio = { version = "0.9", features = ["v2_58"] }
51+
# png = "0.16"
52+
# pango = "0.9"
53+
# cairo-rs = { version = "0.9", features = ["png"] }
5154

5255
# starup notifications
5356
notify-rust = "4"
@@ -57,7 +60,7 @@ wasm-bindgen = "0.2"
5760
js-sys = "0.3"
5861
wasm-bindgen-futures = "0.4"
5962
wasm-logger = "0.2"
60-
gloo = "0.2"
63+
gloo = "0.3"
6164
wasm-bindgen-test = "0.3"
6265

6366
[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]

README.md

+1-12
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,7 @@
2929

3030
**UX Components** is a free, open source, cross-platform widget toolkit for building a GUI for Rust. This project is inspired by Mx GUI Library, Clutter Project, Meego and Moblin.
3131

32-
> **work in progress**
33-
34-
**Angular Rust** is a high productivity, `platform-agnostic` frontend framework for the [Rust language](https://www.rust-lang.org/). It now supports desktop and web development. Angular Rust currently uses Clutter for desktop development and WebAssembly for web development. We are planning to add support for mobile development.
35-
36-
![Angular Rust structure](https://dudochkin-victor.github.io/assets/angular-rust/structure.svg)
37-
38-
## Features
39-
40-
![UX Components structure](https://dudochkin-victor.github.io/assets/ux-components/structure.svg)
41-
42-
- [x] Graphic abstraction for cairo and web canvas, implemented in [UX Animate](https://github.com/angular-rust/ux-animate)
43-
32+
**Angular Rust** is a high productivity, `platform-agnostic` frontend framework for the [Rust language](https://www.rust-lang.org/). It now supports desktop and web development. Angular Rust currently uses OpenGL ES 2.0+ for desktop development and WebAssembly for web development. We are planning to add support for mobile development.
4433

4534
## Quick Start
4635

TODO.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Curves
2+
GestureDetector
3+
StatelessWidget
4+
DefaultTabController
5+
SingleChildScrollView
6+
BouncingScrollPhysics
7+
SafeArea
8+
TabBarIndicatorSize
9+
UnderlineTabIndicator
10+
ScaffoldState
11+
PopupMenuButton
12+
InputDecoration
13+
InputBorder
14+
TextEditingController
15+
16+
17+
# InWork
18+
19+
# Done
20+
AnimationController
21+
Animation
22+
CircleAvatar
23+
CustomPainter
24+
DragStartDetails
25+
DragUpdateDetails
26+
DragEndDetails
27+
FittedBox
28+
InkWell
29+
Opacity
30+
MediaQuery
31+
RoundedRectangleBorder
32+
Flexible
33+
kToolbarHeight
34+
ClipPath
35+
ClipOval
36+
MaterialPageRoute

examples/main.rs.bak

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
use components::prelude::*;
2+
use components::{Spinner, Window};
3+
4+
#[derive(Default, Application)]
5+
struct Application {
6+
window: Window,
7+
}
8+
9+
impl Application {
10+
fn new() -> Self {
11+
let app: Self = Default::default();
12+
app.window
13+
.set_window_size(512, 512)
14+
.set_title("Sample window")
15+
.show()
16+
.connect_destroy(move |_win| {
17+
println!("GOT {}", _win.test_check());
18+
Application::quit()
19+
});
20+
21+
app.window.set_background_color(Some(color::TEAL_9));
22+
23+
let spinner = Spinner::new();
24+
app.window.set_child(&spinner);
25+
26+
app
27+
}
28+
}
29+
30+
fn main() {
31+
Application::run();
32+
}
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pub mod getters;
2-
pub mod run;
2+
pub mod run;
File renamed without changes.

macro/src/lib.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
use proc_macro::TokenStream;
22
use syn::{parse_macro_input, DeriveInput};
3-
43
use quote::quote;
54

6-
mod macros;
7-
use macros::getters::expand_getters;
5+
mod application;
6+
7+
use application::getters::expand_getters;
8+
9+
//
10+
// Application related things
11+
//
812

913
#[proc_macro_derive(Getters)]
1014
pub fn getters(input: TokenStream) -> TokenStream {
@@ -47,6 +51,10 @@ pub fn writable_template_derive(input: TokenStream) -> TokenStream {
4751
TokenStream::from(expanded)
4852
}
4953

54+
//
55+
// Inspect related things
56+
//
57+
5058
#[cfg(test)]
5159
mod tests {
5260
#[test]

src/animation/animation.rs

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
use super::AnimationStatus;
2+
3+
pub struct Animation<T> {
4+
// Whether this animation is stopped at the end.
5+
pub is_completed: bool,
6+
7+
// Whether this animation is stopped at the beginning.
8+
pub is_dismissed: bool,
9+
10+
// The current status of this animation.
11+
pub status: AnimationStatus,
12+
13+
// The current value of the animation.
14+
pub value: T,
15+
}
16+
17+
impl<T> Animation<T> {
18+
// Calls the listener every time the value of the animation changes.
19+
// addListener(VoidCallback listener) → void
20+
21+
// Calls listener every time the status of the animation changes.
22+
// addStatusListener(AnimationStatusListener listener) → void
23+
24+
// Chains a Tween (or CurveTween) to this Animation.
25+
// drive<U>(Animatable<U> child) → Animation<U>
26+
27+
// Stop calling the listener every time the value of the animation changes.
28+
// removeListener(VoidCallback listener) → void
29+
30+
// Stops calling the listener every time the status of the animation changes.
31+
// removeStatusListener(AnimationStatusListener listener) → void
32+
}

0 commit comments

Comments
 (0)