From 6a407f52ac4f85f07c7d28e99bcd55a14e6e9176 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 21 Feb 2025 17:50:49 +0800 Subject: [PATCH] repl: use platform-neutral ux-api instead of graphics-server --- apps/repl/Cargo.toml | 3 ++- apps/repl/src/repl.rs | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/repl/Cargo.toml b/apps/repl/Cargo.toml index 03197acdd..81f59e427 100644 --- a/apps/repl/Cargo.toml +++ b/apps/repl/Cargo.toml @@ -16,7 +16,8 @@ log-server = { package = "xous-api-log", version = "0.1.63" } ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.63" } xous-names = { package = "xous-api-names", version = "0.9.65" } gam = { path = "../../services/gam" } -graphics-server = { path = "../../services/graphics-server" } +ux-api = { path = "../../libs/ux-api" } +blitstr2 = { path = "../../libs/blitstr2" } trng = { path = "../../services/trng" } locales = { path = "../../locales" } ime-plugin-api = { path = "../../services/ime-plugin-api" } diff --git a/apps/repl/src/repl.rs b/apps/repl/src/repl.rs index e49192557..bb2d93895 100644 --- a/apps/repl/src/repl.rs +++ b/apps/repl/src/repl.rs @@ -1,9 +1,10 @@ use core::fmt::Write; +use blitstr2::GlyphStyle; use gam::UxRegistration; -use graphics_server::api::GlyphStyle; -use graphics_server::{DrawStyle, Gid, PixelColor, Point, Rectangle, TextBounds, TextView}; use locales::t; +use ux_api::minigfx::*; +use ux_api::service::api::*; use xous::MessageEnvelope; use super::*; @@ -36,7 +37,7 @@ pub(crate) struct Repl { margin: Point, // margin to edge of canvas bubble_margin: Point, // margin of text in bubbles bubble_radius: u16, - bubble_space: i16, // spacing between text bubbles + bubble_space: isize, // spacing between text bubbles // command environment env: CmdEnv,