Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions crates/moon-gpui/examples/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# GPUI Examples

Examples can be run from the Zed repository root:
Examples can be run from the MoonUI repository root. The package name is
`moon-gpui`; there is no package named `gpui`.

```sh
cargo run -p gpui --example hello_world
cargo run -p moon-gpui --example hello_world
```

## Where to start
Expand All @@ -15,6 +16,8 @@ cargo run -p gpui --example hello_world
- `uniform_list` shows how to render a simple virtualized list.
- `testing` demonstrates `#[gpui::test]`, `TestAppContext`, actions, focus, and
window-based tests.
- `a11y` demonstrates AccessKit roles and actions on a heading, a spin button,
a switch, and a list.

## Layout and styling

Expand Down Expand Up @@ -47,6 +50,8 @@ cargo run -p gpui --example hello_world
- `image_gallery` demonstrates image caching and loading remote images.
- `image_loading` shows image loading states and asset loading.
- `painting` demonstrates custom drawing with paths and canvas.
- `gpu_canvas` shows a `gpu_canvas` element that requests a present on a timer
without dirtying the view.
- `svg` shows SVG rendering.

## Windows and application behavior
Expand Down
4 changes: 2 additions & 2 deletions crates/moon-gpui/examples/a11y.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Accessibility (AccessKit) demo app.
//!
//! Run with: `cargo run -p gpui --example a11y`
//! Run with: `cargo run -p moon-gpui --example a11y`
//!
//! Or on Linux: `cargo run -p gpui --features gpui_platform/wayland,gpui_platform/x11 --example a11y`
//! Or on Linux: `cargo run -p moon-gpui --features gpui_platform/wayland,gpui_platform/x11 --example a11y`
//!
//! This app uses GPUI's accessibility APIs to attach structured information to
//! the element tree, which allows assistive technology to see and interact with
Expand Down
2 changes: 1 addition & 1 deletion crates/moon-gpui/examples/move_entity_between_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! entity's *current* window rather than the window it was in at
//! registration time.
//!
//! To run: cargo run -p gpui --example move_entity_between_windows
//! To run: cargo run -p moon-gpui --example move_entity_between_windows

#![cfg_attr(target_family = "wasm", no_main)]

Expand Down
4 changes: 2 additions & 2 deletions crates/moon-gpui/examples/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//! When run normally, this displays an interactive counter window.
//! The tests below demonstrate various GPUI testing patterns.
//!
//! Run the app: cargo run -p gpui --example testing
//! Run tests: cargo test -p gpui --example testing --features test-support
//! Run the app: cargo run -p moon-gpui --example testing
//! Run tests: cargo test -p moon-gpui --example testing --features test-support

use gpui::{
App, Bounds, Context, FocusHandle, Focusable, Render, Task, Window, WindowBounds,
Expand Down
Loading