You are on page 1of 4

Chapter 1

Your Workstation and X

From Apple Macintoshes and 80x86 PCs at the low end to Sun, Hewlett-
Packard, IBM, and DEC workstations at the high end, graphics work-
sration~ have changed the way people interact with computers. Built-in'
graphics capabilities have made graphical user interfaces such as the
Macintosh User Interface and Microsoft Windows possible. With these
interfaces, instead of entering commands from the keyboard, you can use
the mouse pointing device to run programs and to edit, copy, and delete
files. Additionally a hical interfaces divide the h sical dis la screen

The difficulty of creating readily transferable appli~tions also plagued


high-end graphics workstations, many of which used to come with built-
in proprietary windowing systems that are invariably different"~lii~~
each window s stem can be ro rammed by caHin routines from a
1 r ' ve hen t e same
capability exists on all systems, the routine names usually differ. This situ-
ation has proven troublesome for those who ~ant to write applications
Chapter 1

Your Workstation and X

From Apple Macintoshes and 80x86 PCs at the low end to Sun, Hewlett-
Packard, IBM, and DEC workstations at the high end, graphics work-
stations have change~ the way people interact with computers. Built-in
graphics capabilities have made graphical user interfaces such as the
Macintosh User Interface and Microsoft Windows possible. With these
interfaces, instead of entering commands from the keyboard, you can use
the mouse pointing device to run programs and to edit, copy, and delete
files. Additionally a hical interfaces divide the h sical dis la screen

The difficulty of creating readily transferable applications also plagued


high-end graphics workstations, many of which used to come with built-
in proprietary windowing systems that are invariably different.
each window s stem can be ro rammed by caHin routines from a
1m en en e same
capability exists on all systems, the routine names usually differ. This situ-
ation has proven "troublesome for those who ~ant to write applications
that work on many different workstation . The X Window S
of the need for a windowin s stem that

Graphics disp~ys have two distinct compOnents:


.• Video monitor, the terminal where the output ~ppears
, "
.• Video controller, the circuitry that ca~ the output to appear by sending the
appropriate signals to the monitor

rn a bitmapped graphics display) the monitor displays an array of dots (known as pixels),
and ~e appearance of each pixel corresponds to the c09tents of a memory location in the
video' cOntroller. For a black-ana-white display in which each pixd. is either bright or dim"
_ a single bit of memory can store the'state of a pixel. The term bitrnilppea refers to this
, corresponden~ of each bit in memory to a pixel on the ,screen: '

Raster graphics is another common name for bitmap~ ~hics 'because the graphi<:s
displa.yappearing on the monitor is consiructedfrom a large num~r, ofhorizoniallines
known as raster lines. Raster lines are generated in the monitor by an decrron beam
-sweepiJ;lgback and forth on a.phosphor<oated screen. Becanse each dot of phosphor.
~nding to a pixel, glows in proportion to1the intensity of the beam, each line of the
~ can be generated by controlling the intensity of the beam as it scans acrQSSthe
By drawing the raster lines repeatedly, die illusion of a sttkdy image is created.
I VJt PL-~
ref) ~~! 'cv t(

to-t station t rou


RS-i32e conneCtIon.

ecause0
thatwill

If this ,summary description of X is too terse for you, don't despair-there is much more to come.
This book is designed to help 'You become familiar with X, see how rypical X applications work,
and learn how to write your own X applications using the C routines in Xlib and other libraries
such as Xt and Motif. This chapter introduces you, the prospective X programmer, to the X Win-
dow System and gives an overview of its capabilities and benefits. Chapter 2, "Clients, Servers, and
Window Managers," shows how to set up and use X on a workstation and how to run X applica-
tions; it also explains {he terminology used to describe the X Window System. Chapter 3, "Explor-
ing X Applications," walks you through a number of common X applications to g' e you a feel for
the windowing system and prepare you to learn how to create similar applications. The final chap-
ter in Part One, Chapter 4, "Graphical User Interfaces and X," describes Motif and OPEN LOOK-
two graphical user interfaces built on top ofXlib, the C-callable library of routine~ that represent
he
basiac
t tcaPlasbiIX"",.OfX. ~

Wh f' ~ "1?}~iGOttoV\
. a combination..of-sc,¥er thin S' the-X- -ro~ol, X dis la' sety:et..x diems, and Xlib..-routines
Jtsc lemsJlre applic~ons ha: IlseIheworkstation's displa¥..J,~t's start by taking a 00
picture.

You might also like