4
Chap  ter 1 Your Workstation and X From Apple Macintoshes and 80x86 PCs at the low end to Sun, Hewlett- Pack ard, 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 interf aces 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 devic e t o run programs and to edit, copy, and delete files. Additionally a hical i nter face s divide th e h si ca l d is la screen The diffi culty of creating readily transferable appli~ tions also plagued high-e nd graph ics work stations, many of which used to come with built- in proprietary windowing systems that are invariably diffe rent "~lii~~ ea ch w in dow s ste m can be ro ra mmed by c aHin r ou ti nes fr om a 1 r ' ve hen t e same capa bility exis ts on all syste ms, the routine name s usual ly diff er . This situ- ation has prove n troub lesome for thos e who ~ant to wri te applica tions

x Windows 0001

Embed Size (px)

Citation preview

8/7/2019 x Windows 0001

http://slidepdf.com/reader/full/x-windows-0001 1/4

Chap ter 1

Your Workstation and X

From Apple Macintoshes and 80x86 PCs at the low end to Sun, Hewlett-

Pack ard, 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 interf aces 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 work stations, 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

8/7/2019 x Windows 0001

http://slidepdf.com/reader/full/x-windows-0001 2/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-

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

8/7/2019 x Windows 0001

http://slidepdf.com/reader/full/x-windows-0001 3/4

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:

.• V ideo m onitor, the terminal where the output ~ppears, "

.• Video contro ller , the circuitry that ca~ the output to appear by sending the

appropriate signals to the monitor

r n 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 t

video' cOntroller. For a black-ana-white display in which each pixd. is either bright or d

_ 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: '

 R aster grap hics 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

~ can be generated by controlling the intensity of the beam as it scans acrQSSthe

B y drawing the raster lines repeatedly, die illusion of a sttkdy image is created.

8/7/2019 x Windows 0001

http://slidepdf.com/reader/full/x-windows-0001 4/4

use0

atwill

I VJ t  PL-~

r e f ) ~~! 'c v t(

to-t station t rou

 RS-i32e conneCtIon.

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 'Youbecome familiar with X, see how rypical X applications workand learn how to write your own X applications using the C routines in Xlib and other librarie

such asXt 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 fo

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 represen

Wh

the

basiactcaPlasbiIX"",.OfX. ~

f'~ "1?}~iGOttoV\

. a combination..of-sc, ¥ er thin S' the-X- -ro~ol, X dis la' sety:et..x diems, and Xlib..-routine

Jtsc lemsJlre applic~ons ha: IlseIhework station's displa ¥ ..J,~t's start by taking a 00

picture.