From 6257fb4640155eef691cb3cd7ad56677df2fa737 Mon Sep 17 00:00:00 2001 From: Jeanie Date: Sun, 22 Dec 2024 17:12:23 +0900 Subject: [PATCH] placeholders for example images, small docs update --- services/graphics-server/src/lib.rs | 111 +++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/services/graphics-server/src/lib.rs b/services/graphics-server/src/lib.rs index 625de568e..73fbb5b9f 100644 --- a/services/graphics-server/src/lib.rs +++ b/services/graphics-server/src/lib.rs @@ -33,6 +33,13 @@ impl Gfx { /// Draws a line. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/line.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, Line, Point}; @@ -57,6 +64,13 @@ impl Gfx { /// Draws a circle. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/circle.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Circle, Gfx, Point}; @@ -81,6 +95,13 @@ impl Gfx { /// Draws a rectangle. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/rectangle.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, Point, Rectangle}; @@ -105,6 +126,13 @@ impl Gfx { /// Draws a rounded rectangle. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/rounded_rectangle.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, Point, Rectangle, RoundedRectangle}; @@ -148,6 +176,13 @@ impl Gfx { /// /// This function sends a message to the graphics server to draw the sleep screen. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/sleepscreen.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::Gfx; @@ -165,6 +200,13 @@ impl Gfx { /// This function sends a message to the graphics server to draw the boot logo. /// The boot logo is typically displayed during the device's startup sequence. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/boot_logo.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::Gfx; @@ -240,6 +282,13 @@ impl Gfx { /// truncated. /// Text that overflows the bounds of the `TextView` will be clipped. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/textview.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, TextView}; @@ -272,6 +321,13 @@ impl Gfx { /// This function sends a message to the graphics server to draw the specified `Line` within the specified /// `Rectangle` clip area. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/line_clipped.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, Line, Point, Rectangle}; @@ -293,6 +349,12 @@ impl Gfx { /// This function sends a message to the graphics server to draw the specified `Line` within the specified /// `Rectangle` clip area using XOR mode. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/line_clipped_xor.png?raw=true) /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, Line, Point, Rectangle}; @@ -313,6 +375,13 @@ impl Gfx { /// This function sends a message to the graphics server to draw the specified `Circle` within the /// specified `Rectangle` clip area. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/circle_clipped.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Circle, Gfx, Point, Rectangle}; @@ -333,6 +402,13 @@ impl Gfx { /// This function sends a message to the graphics server to draw the specified `Rectangle` /// within the specified `ClipRect` clip area. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/rectangle_clipped.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, Point, Rectangle}; @@ -353,6 +429,13 @@ impl Gfx { /// This function sends a message to the graphics server to draw the specified `RoundedRectangle` /// within the specified `ClipRect` clip area. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/rounded_rectangle_clipped.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{Gfx, Point, Rectangle, RoundedRectangle}; @@ -385,6 +468,13 @@ impl Gfx { /// This function sends a message to the graphics server to draw the specified list of objects /// within the specified `ClipRect` clip area. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/object_list_clipped.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{ClipObjectList, Gfx, Point, Rectangle}; @@ -412,6 +502,10 @@ impl Gfx { /// Sets the developer boot mode. /// /// This function sends a message to the graphics server to enable or disable the developer boot mode. + /// The purpose of this call is to let users be aware of who signed their kernel. Kernels signed with the + /// developer signature can boot, but this API call ensures that a small dashed line appears through the + /// status bar, so there is an obvious indicator that the kernel has yet to be self-signed. Self-signed + /// kernels do not have this signature. /// /// # Example /// ``` @@ -430,7 +524,8 @@ impl Gfx { /// /// Instead of implementing the read in the library, we hand the raw opcode to the caller. /// This allows the caller to re-use the bulk read data structure across multiple reads - /// instead of it being re-allocated and re-initialized every single call. + /// instead of it being re-allocated and re-initialized every single call. This is used by the security + /// system to inspect the font maps for integrity. /// /// # Example /// ``` @@ -465,6 +560,13 @@ impl Gfx { /// This function sends a message to the graphics server to display a test pattern for a specified /// duration. The test pattern is typically used to verify the functionality of the graphics hardware. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/selftest.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::Gfx; @@ -515,6 +617,13 @@ impl Gfx { /// The stashed state can be restored using this function after it has been saved using the `stash` /// function. This is useful for reverting to a previous state after making temporary changes. /// + ///
+ /// Example Image + /// + /// ![Example Image](https://github.com/betrusted-io/xous-core/blob/main/docs/images/graphics-server/pop.png?raw=true) + /// + ///
+ /// /// # Example /// ``` /// use graphics_server::{DrawStyle, Gfx, Line, PixelColor, Point, Rectangle};