diff --git a/services/graphics-server/src/api/text.rs b/services/graphics-server/src/api/text.rs index 9e812561e..f3a92bed4 100644 --- a/services/graphics-server/src/api/text.rs +++ b/services/graphics-server/src/api/text.rs @@ -46,9 +46,6 @@ const TEXTVIEW_LEN: usize = 3072; #[derive(Copy, Clone, rkyv::Archive, rkyv::Unarchive)] pub struct TextView { - canvas: Gid, // GID of the canvas to draw on - pub clip_rect: Option, // this is set by the GAM to the canvas' clip_rect; needed by gfx for drawing. Note this is in screen coordinates. - // this is the operation as specified for the GAM. Note this is different from the "op" when sent to graphics-server // only the GAM should be sending TextViews to the graphics-server, and a different coding scheme is used for that link. operation: TextOp, @@ -65,6 +62,7 @@ pub struct TextView { pub dry_run: bool, // set to true if no drawing is desired and we just want to compute the bounds pub style: GlyphStyle, + pub text: xous::String::<3072>, pub cursor: Cursor, pub insertion: Option, // this is the insertion point offset, if it's to be drawn, on the string pub ellipsis: bool, @@ -78,7 +76,8 @@ pub struct TextView { // this field specifies the beginning and end of a "selected" region of text pub selected: Option<[u32; 2]>, - pub text: xous::String::<3072>, + canvas: Gid, // GID of the canvas to draw on + pub clip_rect: Option, // this is set by the GAM to the canvas' clip_rect; needed by gfx for drawing. Note this is in screen coordinates. } impl TextView { pub fn new(canvas: Gid, bounds_hint: TextBounds) -> Self {