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-10-02 22:16:08 -0700
commit95a96dbdc483d9dc6371f52a9e41771a64d23aed (patch)
tree53119d09cf830c4846d6247b65e66b6a69e1e47d /prtype.c
parent9a8ad93043569c2717bd88f0264e0d3a28b56a74 (diff)
downloadxscope-95a96dbdc483d9dc6371f52a9e41771a64d23aed.tar.gz
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 9abdd3b..9117ae0 100644
--- a/prtype.c
+++ b/prtype.c
@@ -1046,6 +1046,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