summaryrefslogtreecommitdiff
path: root/prtype.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-15 01:32:49 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-09-06 23:22:21 -0700
commite2ea9f4c3647e9f77027fb59a9ada7c964c1f62d (patch)
tree6a03f01466093c6b5925cfa04122e77ff89ae1f4 /prtype.c
parent93c8c0a8813b1a3971cfe9c2712f4afb68d33a44 (diff)
Create PrintPropertyValues function for property requests
Currently used for core protocol window properties, but will be used for extensions that have similar property handling requests in the future. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'prtype.c')
-rw-r--r--prtype.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/prtype.c b/prtype.c
index 38b44c6..e5d26a7 100644
--- a/prtype.c
+++ b/prtype.c
@@ -1030,6 +1030,24 @@ PrintTextList16(const unsigned char *buf, int length, const char *name)
/* */
/* ************************************************************ */
+/* Several extensions have grown property requests mimicing the
+ core protocol Window properties, and share this code for printing
+ lists of property values */
+int
+PrintPropertyValues(const unsigned char *buf, uint32_t type /* atom */,
+ uint8_t unit, uint32_t num, const char *name)
+{
+ if (type == 31 /* string */)
+ PrintString8(buf, num * unit, name);
+ else
+ PrintBytes(buf, num * unit, name);
+}
+
+/* ************************************************************ */
+/* */
+/* */
+/* ************************************************************ */
+
#define MAXline 78
void