From f34aac94218bc8350900002d30a53827136d5afc Mon Sep 17 00:00:00 2001
From: Marcus Comstedt <marcus@mc.pp.se>
Date: Mon, 9 Feb 1998 22:59:53 +0100
Subject: [PATCH] 16bit text.

Rev: lib/modules/Protocols.pmod/X.pmod/Requests.pmod:1.19
Rev: lib/modules/Protocols.pmod/X.pmod/Types.pmod:1.22
---
 .../Protocols.pmod/X.pmod/Requests.pmod       | 17 +++++++++++++++++
 lib/modules/Protocols.pmod/X.pmod/Types.pmod  | 19 +++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
index aa9d8f8916..604add1631 100644
--- a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
+++ b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
@@ -707,6 +707,23 @@ class ImageText8
   }
 }
 
+class ImageText16
+{
+  inherit request;
+  constant reqType = 77;
+
+  int drawable;
+  int gc;
+  int x, y;
+  string str;
+
+  string to_string()
+  {
+    return build_request(sprintf("%4c%4c%2c%2c%s",
+				 drawable, gc, x, y, str), sizeof(str)/2);
+  }
+}
+
 class CreateColormap
 {
   inherit request;
diff --git a/lib/modules/Protocols.pmod/X.pmod/Types.pmod b/lib/modules/Protocols.pmod/X.pmod/Types.pmod
index 11b5528d6d..4a99298f1b 100644
--- a/lib/modules/Protocols.pmod/X.pmod/Types.pmod
+++ b/lib/modules/Protocols.pmod/X.pmod/Types.pmod
@@ -336,6 +336,25 @@ class Drawable
     object req = ImageText8_req(gc->id, x, y, str);
     display->send_request(req);    
   }
+
+  object ImageText16_req(int gc, int x, int y, string str)
+  {
+    object req = Requests.ImageText16();
+    req->drawable = id;
+    req->gc = gc;
+    req->x = x;
+    req->y = y;
+    req->str = str;
+    return req;
+  }
+
+  void ImageText16(object gc, int x, int y, string str)
+  {
+    if(sizeof(str)>510)
+      error("ImageText16: string to long\n");
+    object req = ImageText16_req(gc->id, x, y, str);
+    display->send_request(req);    
+  }
 }
 
 class Pixmap
-- 
GitLab