diff options
author | Russ Cox <rsc@swtch.com> | 2008-01-30 10:29:17 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-01-30 10:29:17 -0500 |
commit | 0206bd5113e727870d4eb24fbd5f17843745237d (patch) | |
tree | 584bad99ee188d7582a5732d7ee106c022c9775f /src/cmd/rio/showevent/README | |
parent | 52abe8e13010b21ae13d05f1428caca05aa24bdf (diff) | |
download | plan9port-0206bd5113e727870d4eb24fbd5f17843745237d.tar.gz plan9port-0206bd5113e727870d4eb24fbd5f17843745237d.tar.bz2 plan9port-0206bd5113e727870d4eb24fbd5f17843745237d.zip |
rio: make full-screen work properly; add showevent
Diffstat (limited to 'src/cmd/rio/showevent/README')
-rw-r--r-- | src/cmd/rio/showevent/README | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cmd/rio/showevent/README b/src/cmd/rio/showevent/README new file mode 100644 index 00000000..b6429cb8 --- /dev/null +++ b/src/cmd/rio/showevent/README @@ -0,0 +1,28 @@ +I have edited this code to work on modern compilers. + +Russ Cox + +--- + +There are times during debugging when it would be real useful to be able to +print the fields of an event in a human readable form. Too many times I found +myself scrounging around in section 8 of the Xlib manual looking for the valid +fields for the events I wanted to see, then adding printf's to display the +numeric values of the fields, and then scanning through X.h trying to decode +the cryptic detail and state fields. After playing with xev, I decided to +write a couple of standard functions that I could keep in a library and call +on whenever I needed a little debugging verbosity. The first function, +GetType(), is useful for returning the string representation of the type of +an event. The second function, ShowEvent(), is used to display all the fields +of an event in a readable format. The functions are not complicated, in fact, +they are mind-numbingly boring - but that's just the point nobody wants to +spend the time writing functions like this, they just want to have them when +they need them. + +A simple, sample program is included which does little else but to demonstrate +the use of these two functions. These functions have saved me many an hour +during debugging and I hope you find some benefit to these. If you have any +comments, suggestions, improvements, or if you find any blithering errors you +can get it touch with me at the following location: + + ken@richsun.UUCP |