about summary refs log tree commit diff stats
path: root/071print.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-25 09:31:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-25 09:31:08 -0700
commit596490f46834f99c35bc42f6c5878ccee19b7c63 (patch)
tree46e3c8a4b730d7a4d0c0301c2b79724216f91da6 /071print.mu
parent48bb86278826a08e2550f2c49e695167fb137957 (diff)
downloadmu-596490f46834f99c35bc42f6c5878ccee19b7c63.tar.gz
1656 - smooth refresh done
Had to take control of tb_present() after all. Termbox was wise.
Diffstat (limited to '071print.mu')
-rw-r--r--071print.mu26
1 files changed, 26 insertions, 0 deletions
diff --git a/071print.mu b/071print.mu
index a5cb191b..0f9db476 100644
--- a/071print.mu
+++ b/071print.mu
@@ -559,6 +559,32 @@ recipe show-cursor [
   reply x:address:screen
 ]
 
+recipe hide-screen [
+  default-space:address:array:location <- new location:type, 30:literal
+  x:address:screen <- next-ingredient
+  # if x exists (not real display), do nothing
+  {
+    break-unless x:address:screen
+    reply x:address:screen
+  }
+  # otherwise, real screen
+  hide-display
+  reply x:address:screen
+]
+
+recipe show-screen [
+  default-space:address:array:location <- new location:type, 30:literal
+  x:address:screen <- next-ingredient
+  # if x exists (not real display), do nothing
+  {
+    break-unless x:address:screen
+    reply x:address:screen
+  }
+  # otherwise, real screen
+  show-display
+  reply x:address:screen
+]
+
 recipe print-string [
   default-space:address:array:location <- new location:type, 30:literal
   x:address:screen <- next-ingredient