Advanced Search
Start Your Free Trial

Overview

Covering X11 Release 5, the Xlib Programming Manual is a complete guide to programming the X library (Xlib), the lowest level of programming interface to X. It includes introductions to internationalization, device-independent color, font service, and scalable fonts. Includes chapters on:

  • X Window System concepts

  • A simple client application

  • Window attributes

  • The graphics context

  • Graphics in practice

  • Color

  • Events

  • Interclient communication

  • Internationalization

  • The Resource Manager

  • A complete client application

  • Window management

This manual is a companion to Volume 2, Xlib Reference Manual.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 4.0 out of 5 rating Based on 7 Ratings

Unfortunately there are no alternatives.. - 2002-09-29
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This book is a basic introduction to programming X11 directly with Xlib. It is not obvious that Adrian Nye is the best expert to learn from. Often it seems like he wrote the book in an attempt to try to make sense of the X11 system himself. Parts of it are extremely unclear, but at least we should give him credit for trying to explain everything, even those parts he wasn't entirely sure about.

It would probably be a good idea if O'Reilly made a revised edition, rewriting some of the bad parts (which should probably be clear in Adrians head by now), and updating some material for X11R6.

On the good side, there are plenty of code-examples, and while they aren't exactly showing good style, at least they are complete, you can type them in and run them. And they are all small enough to understand without further refactoring. And while not every explanation Adrian makes is crystal clear, it is definitely necessary to have some understanding of basic X11 concepts before you move on to the reference manuals.

If you want a programming manual, and not simply a reference for Xlib, this is the only book available. And while it is far from perfect, it will be much better to learn from than e.g. Scheifler & Gettys. But you'd better order that one as well.

this book is awful! - 1999-09-21
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
you'll never get past page 100. this book is simply unreadable. after reading a few chapters, you'll find that you've learned a lot, but understand very little. and certainly won't be able to DO anything with it. the book is guilty (amoung other things) of giving VERY technical definitions which is fine, but no attempt is made to give a better understanding of the term in basic, frank language that everyone can understand. in addition, the book is way too long. it attempts to be a treatiste on the subject of xlib. if you want to learn xlib (or anything, for that matter), you want a basic book, not a treatiste.

Before the animal books there were the "X Books" - 2006-11-29
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
O'Reilly and Associates was born as a publisher of technical books when Tim O'Reilly printed out copies of the first edition of this manual and was practically mobbed at a technical convention by eager customers in 1988. This is an extremely well written book on programming with Xlib, an X Window System protocol client library in the C programming language. Xlib contains functions for interacting with an X server that allow programmers to write programs without knowing the details of the protocol. Few applications use Xlib directly anymore. Instead, they employ other libraries that use Xlib functions to provide widget toolkits such as Xt, Xaw, Motif, GTK+, and Qt. However, if you are going to need to program in Xlib directly, this is an essential book. The table of contents is as follows:

Chapter 1 Introduction - This chapter gives the big picture: what X is all about and some fundamentals of how it works.

Chapter 2 X Concepts - This chapter introduces the concepts that underlie X programming. You should read this chapter even if you are the type of person who likes to jump right into coding.

Chapter 3 Basic Window Program - Every Xlib program has a similar structure. This chapter shows a simple calculator program that puts up a window and handles events in that window. You can use this simple application as a template for your own more complex applications. All clients will use the techniques described and demonstrated here.

Chapter 4 Window Attributes - The window attributes control a window's background and border pattern or color, the events that should be queued for it, and so on. This chapter describes how to set and get window attributes and provides a detailed description of each attribute.

Chapter 5 The Graphics Context - The graphics primitives supplied with X are quite simple. Most of the details about how graphics are to be drawn are stored in a resource called a graphics context (GC). GCs are stored in the server, thus reducing the amount of information that needs to be transmitted for each graphics request. This chapter describes how to use GCs and provides details on each member of the XGCValues structure.

Chapter 6 Drawing Graphics and Text - This chapter describes the routines used to draw lines, geometrical figures, and text. It also discusses the use of the pixmaps, images, and regions.

Chapter 7 Color - This chapter describes how to use color in your programs. Color handling in X can be more complex than in other graphics systems because of the need for portability to many different types of displays. This chapter starts with the basics, and gradually moves to more advanced topics, including R5 device-independent color.

Chapter 8 Events - Events are central to X. The fundamental framework for handling events was given in Chapter 3, but this chapter gives much more detail, both on selecting events for a window and on handling them when they arrive. It discusses each of the masks used to select events; for a description of the event structures themselves, see Appendix E.

Chapter 9 The Keyboard and Pointer - This chapter not only describes how to handle keyboard and pointer events but also describes many other topics related to these two input devices. In particular, it discusses X's use of keysyms as portable symbols for character encoding, keyboard remapping, keyboard and pointer "grabs," and keyboard and pointer preferences.

Chapter 10 Internationalization - This chapter begins with a detailed overview of the goals, concepts, and techniques of internationalization, starting with ANSI-C internationalization and progressing to the R5 internationalization features. After the overview, each section covers an individual topic in X internationalization.

Chapter 11 Internationalized Text Input - The first two sections provide an overview of the internationalized text input model used by R5, and are valuable to any programmer writing internationalized applications. The remaining sections describe the Xlib functions and datatypes for internationalized text input, and are quite detailed.

Chapter 12 Interclient Communication - As a multi-window environment, X must support a mechanism for communication between applications. There are three: properties, selections, and cut buffers, all of which are described in this chapter. The special case of communication between an application and the window manager is also covered here.

Chapter 13 Managing User Preferences - It is a fundamental part of the X philosophy that the user, not the application, should be in control of the way things work. For this reason, applications should allow the user to specify window geometry and many other characteristics both via command line options and in a file that specifies default preferences. This chapter discusses the use of the resource manager, which helps an application to evaluate and merge its own default with user preferences.

Chapter 14 A Complete Application - This chapter describes and demonstrates these techniques with a real application, basecalc. The basecalc application is a programmer's calculator that allows integer calculations in binary, octal, decimal, and hexadecimal and conversions between these bases.

Chapter 15 Other Programming Techniques - This chapter discusses a few orphaned techniques that didn't quite fit in anywhere else. The routines and techniques described here will not be needed in most programs. The end of the chapter contains information about porting and portability.

Chapter 16 Window Management - This chapter discusses the design of a simple window manager, not so you will be able to write one, but so you will know what to expect from one. A window manager is a program implemented with Xlib to control the layout of windows on the screen, responding to user requests to move, resize, raise, lower, or iconify windows.

Appendix A Specifying Fonts
Appendix B X10 Compatibility
Appendix C Writing Extensions to X
Appendix D The basecalc Application
Appendix E Event Reference
Appendix F The Xmu Library
Appendix G Sources of Additional Information
Appendix H Release Notes

Buyer Beware! - 2007-12-12
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
In this listing, Amazon has listed two separate publications under a single ISBN. 0937175269 is the ISBN of Volume One - The Xlib Programming Manual.
Volume Two is the Xlib Reference Manual, and the ISBN of that book is 0937175277.
At this time, Amazon does not have a listing under the ISBN of Volume Two, but simply lists both titles under a single ISBN. But, since O'Reilly sold the two volumes separately, and Amazon lists the ISBN of only the Programming Manual, it's unclear what you would get if you were to order from this listing. Since books are uniquely identified only by the ISBN (and not by title), the buyer should probably expect to get the volume that is identified by the specified ISBN (The Programming Manual).

X11 programming is complex, this book helps - 2004-12-12
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Unfortunately, X11 programming is extremely complex. This book is not perfect, but does guide you through the labyrinth. If you are going to program in X11, you need to get this book.

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2010 Safari Books Online. All rights reserved.