CS 349 Resources
- A tutorial, Basic Graphics Programming With The Xlib
Library (highly recommended):
Part I and
Part II.
-
The XLib
Manual: An HTML version of the documentation from the
X Consortium. There are
many copies of this basic work on the web, including here. The HTML
version is also available for download here (to your
personal computer, please). The equivalent document, for
X11R6.7, is available as a PDF here.
The document was automatically converted from Postscript; the
table of contents is at the END of the document for some
reason.
-
The X Window
System, by Robert W. Scheifler and Jim Gettys, in
ACM Transactions on Graphics, Vol. 5, No. 2, April 1986,
pages 79-109, outlines the basic design goals of the X window
system and gives an overview of its implementation.
- A sample program, hello.cpp.
-
xdemo_str.c, demo code illustrating
clipping and string drawing
-
xdemo_2.c, more X demo code
- A previous term's tutorial on C and X (recommended)
(pdf)
- Running X under Windows: see below.
- Some more technical references for X:
Cygwin is an easy way to get most of Unix running under Windows.
- The official Cygwin site.
- When you install Cygwin, be sure to include the following
packages:
- X11 package: X-startup-scripts, xorg-x11-base,
xorg-x11-bin-dlls, xorg-x11-devel, xorg-x11-etc,
xorg-x11-libs-data, xorg-x11-xwin, xterm
- Devel package: make, man, gcc-g++
- Net package: openssh
-
SSH (for secure communications)
- An introduction is at http://kimmo.suominen.com/docs/ssh/
- A local document on SSH Key
management. Use the second example. It allows you to
communicate securely within minimal use of passwords (but
if password is compromised you've got big trouble!).
- A local document to get
sshd running. It allows you to access files on your
Cygwin box from another computer.
- SSH can be used together with a newsreader such as
Thunderbird to post to UW newsgroups from off-campus. Click
here. I have the following alias in Cygwin's
.bashrc file. To read news, I open a
Cygwin window, type news and then
read/post using Thunderbird. alias news='echo
"Setting up to read news"; ssh -N -L
1190:news.uwaterloo.ca:119 rees.uwaterloo.ca'
- To compile an X program under Cygwin, you'll likely need to
include a library search path:
g++ -o hello hello.C -L/usr/X11R6/lib/ -lX11
This tells g++ where to search for the X11
library. You should confirm that /usr/X11R6/lib/
is the correct path for your installation and that the
directory has a file named libX11.dll.a.
- The X server needs to be running when you try to run your
program. One way to do this is to run the
startxwin.bat batch file. It should be in the
directory cygwin/usr/X11R6/bin/. It also sets the
DISPLAY environment variable.
- In using this setup, problems have been reported with using
XAutoRepeatOff when using "SSH -X server ...". Using "SSH -Y
server..." seems to be a fix for this problem (as noted by Nathan
Hoel).
- To get time to a fairly high degree of resolution, use
gettimeofday(struct timeval * tv , struct timezone * tz). Header is
<sys/time.h>
- To sleep with fairly high resolution, you can use
usleep(useconds_t useconds). Header is <unistd.h>
.NET
-
DelegateDemo.cs:
demonstration of creating custom delegates in .NET. The demo logs
errors to a number of places.
-
ErrorEventDemo.cs: code
illustrating the restrictions added by the "event" keyword.
- BoundsEventDemo.cs: another
example of custom delegates, but more complete than DelegateDemo.cs.
Mirrors many aspects of usage in a UI, but without the actual UI.
- ButtonEventDemo.cs: a
demonstration of delegates in a very minimalist UI involving a
single button.
Here's a PDF of the Subversion book for version 1.4. UW
is running version 1.4.x at the moment (I've asked for an upgrade).
1.5.x is on the VM. v1.6.1 just came out.
-
The Design of Everyday Things, by Donald A. Norman
(Basic Books, 1988 and 2002). Norman explores the design of
everyday things -- light switches, doors, telephones, cars, and
some computers. Along the way he delves into principles useful
to user interfaces as well as trying to develop a better
understanding of users.
-
The Humane Interface: New Directions for Designing
Interactive Systems, by Jef Raskin (Addison-Wesley, 2000).
Jef was the chief designer of the Apple Macintosh and ushered
in the current desktop metaphor.
-
The GUI Design Handbook, Susan Fowler and Victor
Stanwick.
This book is now out of print but is available on the web at
http://www.fast-consulting.com/desktop.htm.
It gives an overview of many different kinds of user interface
components with guidance on what they are good for, how they
are commonly misused, and helpful design guidelines. Not tied
to any particular api.
-
Designing from both sides of the screen, by Ellen Isaacs
and Alan Walendowski (New Riders Publishing, 2002). Ellen is an
interaction designer and Alan is a software engineer. They team
up to explain in very clear and readable language how they
designed a instant messaging system. They illustrate basic
principles very concretely.
-
GUI Bloopers: The Don'ts and Do's for Software Developers
and Web Designers, by Jeff Johnson (Morgan Kauffman, 2000).
This book compiles a lot of wisdom in an easily accessible
format. It's illustrated with both positive and negative
examples
Don't put too much weight on past exams :)