From a24db618cec568a33119f236c281e5e80d0a2db0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Fri, 26 Dec 1997 21:55:04 +0100
Subject: [PATCH] Added CreateGC and PolyFillRectangle.

Rev: lib/modules/Protocols.pmod/X.pmod/Requests.pmod:1.2
---
 .../Protocols.pmod/X.pmod/Requests.pmod       | 37 ++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
index c5c9285e5f..51c4da4f9e 100644
--- a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
+++ b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod
@@ -2,7 +2,7 @@
  *
  */
 
-#define error(x) throw( ({ (x), backtrace() }) )
+#include "error.h"
 
 class request
 {
@@ -106,3 +106,38 @@ class MapWindow
   inherit ResourceReq;
   constant type = 8;
 }
+
+class CreateGC
+{
+  inherit request;
+  constant type = 55;
+
+  int gid;
+  int drawable;
+  mapping attributes = ([ ]);
+
+  string to_string()
+  {
+    return build_request(sprintf("%4c%4c%s", gid, drawable,
+				 build_value_list(attributes,
+						  _Xlib.gc_attributes)));
+  }
+}
+
+
+class PolyFillRectangle
+{
+  inherit request;
+  constant type = 70;
+
+  int drawable;
+  int gid;
+
+  array rectangles;
+
+  string to_string()
+  {
+    return build_request(sprintf("%4c%4c%@s", drawable, gid,
+				 rectangles->to_string()));
+  }
+}
-- 
GitLab