Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the GTK backend #103

Merged
merged 1 commit into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 2 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,42 +100,6 @@ jobs:
command: test
args: --manifest-path=Cargo.toml --features wayland --no-default-features

# we test the gtk backend as a separate job because gtk install takes
# a long time.
test-stable-gtk:
runs-on: ubuntu-latest
name: cargo clippy+test (gtk)
steps:
- uses: actions/checkout@v2

- name: install libgtk-3-dev
run: |
sudo apt update
sudo apt install libgtk-3-dev

- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.68
components: clippy
profile: minimal
override: true

- name: restore cache
uses: Swatinem/rust-cache@v1

- name: cargo clippy glazier
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=Cargo.toml --all-targets --features=gtk --no-default-features -- -D warnings

- name: cargo test glazier
uses: actions-rs/cargo@v1
with:
command: test
args: --features=gtk --no-default-features --manifest-path=Cargo.toml

# test-stable-wasm:
# runs-on: macOS-latest
# name: cargo test (wasm32)
Expand Down Expand Up @@ -264,10 +228,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: install libgtk-dev
- name: install dependencies
run: |
sudo apt update
sudo apt install libgtk-3-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt install libxkbcommon-dev libxkbcommon-x11-dev
if: contains(matrix.os, 'ubuntu')

- name: install stable toolchain
Expand Down
70 changes: 45 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,12 @@ default-target = "x86_64-pc-windows-msvc"

[features]
default = ["x11"]
gtk = ["cairo-rs", "gdk-sys", "glib-sys", "gtk-sys", "gtk-rs"]
x11 = [
"ashpd",
"bindgen",
"futures",
"nix",
"pkg-config",
"x11rb",
]
x11 = ["ashpd", "bindgen", "futures", "nix", "pkg-config", "x11rb"]
wayland = [
"wayland-client",
"wayland-protocols/client",
"wayland-protocols/unstable_protocols",
"nix",
"cairo-sys-rs",
"rand",
"calloop",
"wayland-cursor",
Expand Down Expand Up @@ -71,7 +62,6 @@ kurbo = "0.9.0"

tracing = { version = "0.1.22", features = ["log"] }
lazy_static = "1.4.0"
time = "0.3.0"
cfg-if = "1.0.0"
instant = { version = "0.1.6", features = ["wasm-bindgen"] }
anyhow = "1.0.32"
Expand All @@ -92,10 +82,29 @@ once_cell = "1"

[target.'cfg(target_os="windows")'.dependencies.winapi]
version = "0.3.9"
features = ["d2d1_1", "dwrite", "winbase", "libloaderapi", "errhandlingapi", "winuser",
"shellscalingapi", "shobjidl", "combaseapi", "synchapi", "dxgi1_3", "dcomp",
"d3d11", "dwmapi", "wincon", "fileapi", "processenv", "winbase", "handleapi",
"shellapi", "winnls"]
features = [
"d2d1_1",
"dwrite",
"winbase",
"libloaderapi",
"errhandlingapi",
"winuser",
"shellscalingapi",
"shobjidl",
"combaseapi",
"synchapi",
"dxgi1_3",
"dcomp",
"d3d11",
"dwmapi",
"wincon",
"fileapi",
"processenv",
"winbase",
"handleapi",
"shellapi",
"winnls",
]

[target.'cfg(target_os="macos")'.dependencies]
block = "0.1.6"
Expand All @@ -108,17 +117,20 @@ accesskit_macos = { version = "0.5.0", optional = true }

[target.'cfg(any(target_os = "freebsd", target_os="linux", target_os="openbsd"))'.dependencies]
ashpd = { version = "0.3.2", optional = true }
# TODO(x11/dependencies): only use feature "xcb" if using X11
cairo-rs = { version = "0.15.12", default_features = false, features = ["xcb"], optional = true }
cairo-sys-rs = { version = "0.15.1", default_features = false, optional = true }
futures = { version = "0.3.24", optional = true, features = ["executor"] }
gdk-sys = { version = "0.15.1", optional = true }
# `gtk` gets renamed to `gtk-rs` so that we can use `gtk` as the feature name.
gtk-rs = { version = "0.15.5", features = ["v3_22"], package = "gtk", optional = true }
glib-sys = { version = "0.15.10", optional = true }
gtk-sys = { version = "0.15.3", optional = true }

nix = { version = "0.25.0", optional = true }
x11rb = { version = "0.11.1", features = ["allow-unsafe-code", "present", "render", "randr", "xfixes", "xkb", "resource_manager", "cursor", "xinput"], optional = true }
x11rb = { version = "0.11.1", features = [
"allow-unsafe-code",
"present",
"render",
"randr",
"xfixes",
"xkb",
"resource_manager",
"cursor",
"xinput",
], optional = true }
wayland-client = { version = "0.29.5", optional = true }
wayland-protocols = { version = "0.29.5", optional = true }
wayland-cursor = { version = "0.29.5", optional = true }
Expand All @@ -133,7 +145,15 @@ js-sys = "0.3.44"

[target.'cfg(target_arch="wasm32")'.dependencies.web-sys]
version = "0.3.44"
features = ["Window", "MouseEvent", "CssStyleDeclaration", "WheelEvent", "KeyEvent", "KeyboardEvent", "Navigator"]
features = [
"Window",
"MouseEvent",
"CssStyleDeclaration",
"WheelEvent",
"KeyEvent",
"KeyboardEvent",
"Navigator",
]

[dev-dependencies]
pretty_env_logger = "0.4"
Expand Down
116 changes: 0 additions & 116 deletions src/backend/gtk/application.rs

This file was deleted.