Adrian Nye
Xlib Programming Manual, Rel. 5
Adrian Nye
Xlib Programming Manual, Rel. 5
- Broschiertes Buch
- Merkliste
- Auf die Merkliste
- Bewerten Bewerten
- Teilen
- Produkt teilen
- Produkterinnerung
- Produkterinnerung
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.…mehr
Andere Kunden interessierten sich auch für
- Chris TylerX Power Tools44,99 €
- W. Curtis PrestonBackup & Recovery48,99 €
- David A. KarpWindows 7 Annoyances36,99 €
- David PogueMac OS X: The Missing Manual, Tiger Edition43,99 €
- David PogueSwitching to the Mac: The Missing Manual, Snow Leopard Edition27,99 €
- David PogueSwitching to the Mac: The Missing Manual, El Capitan Edition27,99 €
- David PogueSwitching to the Mac: The Missing Manual, Mavericks Edition28,99 €
-
-
-
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.
Hinweis: Dieser Artikel kann nur an eine deutsche Lieferadresse ausgeliefert werden.
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.
Hinweis: Dieser Artikel kann nur an eine deutsche Lieferadresse ausgeliefert werden.
Produktdetails
- Produktdetails
- The Definitive Guides to the X Window System
- Verlag: O'Reilly Media
- 3rd ed. repr.
- Seitenzahl: 813
- Erscheinungstermin: 9. August 1994
- Englisch
- Abmessung: 234mm x 177mm x 45mm
- Gewicht: 1185g
- ISBN-13: 9781565920026
- ISBN-10: 1565920023
- Artikelnr.: 05171234
- Herstellerkennzeichnung
- Libri GmbH
- Europaallee 1
- 36244 Bad Hersfeld
- 06621 890
- The Definitive Guides to the X Window System
- Verlag: O'Reilly Media
- 3rd ed. repr.
- Seitenzahl: 813
- Erscheinungstermin: 9. August 1994
- Englisch
- Abmessung: 234mm x 177mm x 45mm
- Gewicht: 1185g
- ISBN-13: 9781565920026
- ISBN-10: 1565920023
- Artikelnr.: 05171234
- Herstellerkennzeichnung
- Libri GmbH
- Europaallee 1
- 36244 Bad Hersfeld
- 06621 890
Adrian Nye is the author or editor of several volumes in the X Window System Series from O'Reilly & Associates. Adrian has worked as a programmer writing educational software in C and as a mechanical engineer designing offshore oil spill cleanup equipment. He has interests in the environment and the impact of people and technology. He graduated from the Massachusetts Institute of Technology in 1984 with a B.S. in mechanical engineering.
Preface
About This Manual
Summary of Contents
How to Use This Manual
Getting the Example Programs
Compiling the Example Programs
Assumptions
Font Conventions Used in This Manual
Related Documents
How to Contact Us
Bulk Sales Information
Acknowledgements
Chapter 1: Introduction
1.1 1.1 Versions of X
1.2 1.2 X Window System Concepts
1.3 1.3 X Window System Software Architecture
1.4 1.4 Overview of Xlib
Chapter 2: X Concepts
2.1 2.1 How Xlib Works
2.2 2.2 What are X Windows?
2.3 2.3 Introduction to X Graphics
2.4 2.4 More on Window Characteristics
2.5 2.5 Introduction to Events
2.6 2.6 How to Program with Xlib
Chapter 3: Basic Window Program
3.1 3.1 Running the Program
3.2 3.2 The Main of basicwin
Chapter 4: Window Attributes
4.1 4.1 Setting Window Attributes
4.2 4.2 The Window Attribute Structures
4.3 4.3 Settable Attributes
4.4 4.4 Information from the XWindowAttributes Structure
Chapter 5: The Graphics Context
5.1 5.1 Creating and Setting a Graphics Context
5.2 5.2 Switching Between Graphics Contexts
5.3 5.3 Controlling Pixel Selection
5.4 5.4 Controlling Coloring and Patterning
5.5 5.5 Controlling Graphics Tricks
5.6 5.6 Graphics Exposure
5.7 5.7 Subwindow Mode
5.8 5.8 Sharing GCs Between Clients
5.9 5.9 GCs and Server Efficiency
5.10 5.10 Querying the Graphics Context
5.11 5.11 The Default GC Versus Default Values of a GC
Chapter 6: Drawing Graphics and Text
6.1 6.1 Drawing
6.2 6.2 Fonts and Text
6.3 6.3 Regions
6.4 6.4 Images
6.5 6.5 Cursors
Chapter 7: Color
7.1 7.1 Basic Color Terms and Concepts
7.2 7.2 Color Naming and Specification
7.3 7.3 Differences in Display Hardware
7.4 7.4 Allocating Shared Colors
7.5 7.5 Allocating Private Colors
7.6 7.6 Getting Complete Visual Information
7.7 7.7 The GrayScale Visual
7.8 7.8 Standard Colormaps
7.9 7.9 Device-independent Color and Xcms
7.10 7.10 Creating and Installing Colormaps
7.11 7.11 Miscellaneous Color-handling Functions
Chapter 8: Events
8.1 8.1 Overview of Event Handling
8.2 8.2 Event Processing
8.3 8.3 Selecting Events
8.4 8.4 Sending Events
8.5 8.5 Where to Find More on Each Event
Chapter 9: The Keyboard and Pointer
9.1 9.1 The Keyboard
9.2 9.2 The Pointer
9.3 9.3 Border Crossing and Keyboard Focus Change Events
9.4 9.4 Grabbing the Keyboard and Pointer
9.5 9.5 Keyboard Preferences
9.6 9.6 Pointer Preferences
9.7 9.7 X Input Extension
Chapter 10: Internationalization
10.1 10.1 An Overview of Internationalization
10.2 10.2 Locale Management in X
10.3 10.3 Internationalized Text Output in X
10.4 10.4 String Encoding Changes for Internationalization
10.5 10.5 Internationalized Interclient Communication
10.6 10.6 Localization of Resource Databases
10.7 10.7 Summary: Writing an Internationalized Application
Chapter 11: Internationalized Text Input
11.1 11.1 Issues of Internationalized Text Input
11.2 11.2 Overview of the X Input Method Architecture
11.3 11.3 XIM Programming Interface
11.4 11.4 XIM Functions
11.5 11.5 XIC Functions
11.6 11.6 Input Context Attributes
11.7 11.7 Negotiating Preedit and Status Area Geometries
11.8 11.8 Geometry, Preedit, and Status Callbacks
11.9 11.9 Filtering Events
11.10 11.10 Getting Composed Text
11.11 11.11 XIM Programming Checklist
Chapter 12: Interclient Communication
12.1 12.1 Properties and Atoms
12.2 12.2 The Compound Text Encoding
12.3 12.3 Communicating with the Window Manager
12.4 12.4 Selections
12.5 12.5 Cut Buffers
Chapter 13: Managing User Preferences
13.1 13.1 Using XGetDefault()
13.2 13.2 Using the Low-level Resource Manager Routines
13.3 13.3 Standard Geometry
13.4 13.4 Resource Specification and Matching
13.5 13.5 Other Resource Manager Routines
Chapter 14: A Complete Application
14.1 14.1 Description of basecalc
14.2 14.2 Include Files
14.3 14.3 The Main of basecalc
14.4 14.4 Getting User Preferences
14.5 14.5 Printing a Usage Message
14.6 14.6 Initializing the Calculator
14.7 14.7 Making Windows
14.8 14.8 Selecting Events
14.9 14.9 Processing Events
14.10 14.10 Drawing a Pad
14.11 14.11 Routines Not Shown
Chapter 15: Other Programming Techniques
15.1 15.1 Reading and Writing Properties
15.2 15.2 Screen Saver
15.3 15.3 Host Access and Security
15.4 15.4 Getting the Window Hierarchy
15.5 15.5 Close Down Mode
15.6 15.6 Connection Close Operations
15.7 15.7 Data Management
15.8 15.8 The After Function
15.9 15.9 Coordinate Transformation
15.10 15.10 ANSI-C and POSIX Portability
15.11 15.11 Porting Programs to X
15.12 15.12 Programming for Multiple X Releases
15.13 15.13 Using Extensions to X
Chapter 16: Window Management
16.1 16.1 Layout Policy
16.2 16.2 Substructure Redirection
16.3 16.3 Reparenting
16.4 16.4 Window Save-set
16.5 16.5 Window Manager - Client Communications
16.6 16.6 Window Management Functions
16.7 16.7 A Basic Window Manager
Specifying Fonts
A.1 Font Specification
A.2 Font Service
A.3 Scalable Fonts
X10 Compatibility
B.1 XDraw and XDrawFilled()
B.2 Association Tables
Writing Extensions to XThis appendix is lightly edited and reformatted from the original MIT material. Before attempting to write extensions, you should be intimately familiar with the X Window System Protocol, Version 11, by Robert Scheifler and Ron Newman, and with the server code.Unfortunately, this appendix does not currently provide sufficient tutorial or contextual information to allow you to build an extension. We intend to provide a more helpful description of how to write extensions in a forthcoming book about the server. In the meantime, several sample extensions are provided with the X core distribution which can be used as examples.
C.1 Basic Protocol Support Routines
C.2 Hooking into Xlib
C.3 GC Caching
C.4 Graphics Batching
C.5 Writing Extension Stubs
The basecalc Application
Event Reference
E.1 Meaning of Common Structure Elements
The Xmu Library
F.1 Atom Functions
F.2 Error Handler Functions
F.3 System Utility Functions
F.4 Window Utility Functions
F.5 Cursor Utility Functions
F.6 Color Utilities
F.7 Pixmap Utilities
F.8 Graphics Functions
F.9 Selection Functions
F.10 Character Set Functions
F.11 Compound Text Functions
F.12 CloseDisplay Hook Functions
F.13 Display Queue Functions
F.14 Standard Colormap Functions
Sources of Additional Information
G.1 Getting the X Software
G.2 Netnews
G.3 Training, Consulting, and Support
G.4 The X Consortium
G.5 Finding Out for Yourself
Release Notes
H.1 Changes from Release 4 to Release 5
H.2 Miscellaneous Xlib Changes
H.3 Changes from Release 3 to Release 4
Glossary
References
About This Manual
Summary of Contents
How to Use This Manual
Getting the Example Programs
Compiling the Example Programs
Assumptions
Font Conventions Used in This Manual
Related Documents
How to Contact Us
Bulk Sales Information
Acknowledgements
Chapter 1: Introduction
1.1 1.1 Versions of X
1.2 1.2 X Window System Concepts
1.3 1.3 X Window System Software Architecture
1.4 1.4 Overview of Xlib
Chapter 2: X Concepts
2.1 2.1 How Xlib Works
2.2 2.2 What are X Windows?
2.3 2.3 Introduction to X Graphics
2.4 2.4 More on Window Characteristics
2.5 2.5 Introduction to Events
2.6 2.6 How to Program with Xlib
Chapter 3: Basic Window Program
3.1 3.1 Running the Program
3.2 3.2 The Main of basicwin
Chapter 4: Window Attributes
4.1 4.1 Setting Window Attributes
4.2 4.2 The Window Attribute Structures
4.3 4.3 Settable Attributes
4.4 4.4 Information from the XWindowAttributes Structure
Chapter 5: The Graphics Context
5.1 5.1 Creating and Setting a Graphics Context
5.2 5.2 Switching Between Graphics Contexts
5.3 5.3 Controlling Pixel Selection
5.4 5.4 Controlling Coloring and Patterning
5.5 5.5 Controlling Graphics Tricks
5.6 5.6 Graphics Exposure
5.7 5.7 Subwindow Mode
5.8 5.8 Sharing GCs Between Clients
5.9 5.9 GCs and Server Efficiency
5.10 5.10 Querying the Graphics Context
5.11 5.11 The Default GC Versus Default Values of a GC
Chapter 6: Drawing Graphics and Text
6.1 6.1 Drawing
6.2 6.2 Fonts and Text
6.3 6.3 Regions
6.4 6.4 Images
6.5 6.5 Cursors
Chapter 7: Color
7.1 7.1 Basic Color Terms and Concepts
7.2 7.2 Color Naming and Specification
7.3 7.3 Differences in Display Hardware
7.4 7.4 Allocating Shared Colors
7.5 7.5 Allocating Private Colors
7.6 7.6 Getting Complete Visual Information
7.7 7.7 The GrayScale Visual
7.8 7.8 Standard Colormaps
7.9 7.9 Device-independent Color and Xcms
7.10 7.10 Creating and Installing Colormaps
7.11 7.11 Miscellaneous Color-handling Functions
Chapter 8: Events
8.1 8.1 Overview of Event Handling
8.2 8.2 Event Processing
8.3 8.3 Selecting Events
8.4 8.4 Sending Events
8.5 8.5 Where to Find More on Each Event
Chapter 9: The Keyboard and Pointer
9.1 9.1 The Keyboard
9.2 9.2 The Pointer
9.3 9.3 Border Crossing and Keyboard Focus Change Events
9.4 9.4 Grabbing the Keyboard and Pointer
9.5 9.5 Keyboard Preferences
9.6 9.6 Pointer Preferences
9.7 9.7 X Input Extension
Chapter 10: Internationalization
10.1 10.1 An Overview of Internationalization
10.2 10.2 Locale Management in X
10.3 10.3 Internationalized Text Output in X
10.4 10.4 String Encoding Changes for Internationalization
10.5 10.5 Internationalized Interclient Communication
10.6 10.6 Localization of Resource Databases
10.7 10.7 Summary: Writing an Internationalized Application
Chapter 11: Internationalized Text Input
11.1 11.1 Issues of Internationalized Text Input
11.2 11.2 Overview of the X Input Method Architecture
11.3 11.3 XIM Programming Interface
11.4 11.4 XIM Functions
11.5 11.5 XIC Functions
11.6 11.6 Input Context Attributes
11.7 11.7 Negotiating Preedit and Status Area Geometries
11.8 11.8 Geometry, Preedit, and Status Callbacks
11.9 11.9 Filtering Events
11.10 11.10 Getting Composed Text
11.11 11.11 XIM Programming Checklist
Chapter 12: Interclient Communication
12.1 12.1 Properties and Atoms
12.2 12.2 The Compound Text Encoding
12.3 12.3 Communicating with the Window Manager
12.4 12.4 Selections
12.5 12.5 Cut Buffers
Chapter 13: Managing User Preferences
13.1 13.1 Using XGetDefault()
13.2 13.2 Using the Low-level Resource Manager Routines
13.3 13.3 Standard Geometry
13.4 13.4 Resource Specification and Matching
13.5 13.5 Other Resource Manager Routines
Chapter 14: A Complete Application
14.1 14.1 Description of basecalc
14.2 14.2 Include Files
14.3 14.3 The Main of basecalc
14.4 14.4 Getting User Preferences
14.5 14.5 Printing a Usage Message
14.6 14.6 Initializing the Calculator
14.7 14.7 Making Windows
14.8 14.8 Selecting Events
14.9 14.9 Processing Events
14.10 14.10 Drawing a Pad
14.11 14.11 Routines Not Shown
Chapter 15: Other Programming Techniques
15.1 15.1 Reading and Writing Properties
15.2 15.2 Screen Saver
15.3 15.3 Host Access and Security
15.4 15.4 Getting the Window Hierarchy
15.5 15.5 Close Down Mode
15.6 15.6 Connection Close Operations
15.7 15.7 Data Management
15.8 15.8 The After Function
15.9 15.9 Coordinate Transformation
15.10 15.10 ANSI-C and POSIX Portability
15.11 15.11 Porting Programs to X
15.12 15.12 Programming for Multiple X Releases
15.13 15.13 Using Extensions to X
Chapter 16: Window Management
16.1 16.1 Layout Policy
16.2 16.2 Substructure Redirection
16.3 16.3 Reparenting
16.4 16.4 Window Save-set
16.5 16.5 Window Manager - Client Communications
16.6 16.6 Window Management Functions
16.7 16.7 A Basic Window Manager
Specifying Fonts
A.1 Font Specification
A.2 Font Service
A.3 Scalable Fonts
X10 Compatibility
B.1 XDraw and XDrawFilled()
B.2 Association Tables
Writing Extensions to XThis appendix is lightly edited and reformatted from the original MIT material. Before attempting to write extensions, you should be intimately familiar with the X Window System Protocol, Version 11, by Robert Scheifler and Ron Newman, and with the server code.Unfortunately, this appendix does not currently provide sufficient tutorial or contextual information to allow you to build an extension. We intend to provide a more helpful description of how to write extensions in a forthcoming book about the server. In the meantime, several sample extensions are provided with the X core distribution which can be used as examples.
C.1 Basic Protocol Support Routines
C.2 Hooking into Xlib
C.3 GC Caching
C.4 Graphics Batching
C.5 Writing Extension Stubs
The basecalc Application
Event Reference
E.1 Meaning of Common Structure Elements
The Xmu Library
F.1 Atom Functions
F.2 Error Handler Functions
F.3 System Utility Functions
F.4 Window Utility Functions
F.5 Cursor Utility Functions
F.6 Color Utilities
F.7 Pixmap Utilities
F.8 Graphics Functions
F.9 Selection Functions
F.10 Character Set Functions
F.11 Compound Text Functions
F.12 CloseDisplay Hook Functions
F.13 Display Queue Functions
F.14 Standard Colormap Functions
Sources of Additional Information
G.1 Getting the X Software
G.2 Netnews
G.3 Training, Consulting, and Support
G.4 The X Consortium
G.5 Finding Out for Yourself
Release Notes
H.1 Changes from Release 4 to Release 5
H.2 Miscellaneous Xlib Changes
H.3 Changes from Release 3 to Release 4
Glossary
References
Preface
About This Manual
Summary of Contents
How to Use This Manual
Getting the Example Programs
Compiling the Example Programs
Assumptions
Font Conventions Used in This Manual
Related Documents
How to Contact Us
Bulk Sales Information
Acknowledgements
Chapter 1: Introduction
1.1 1.1 Versions of X
1.2 1.2 X Window System Concepts
1.3 1.3 X Window System Software Architecture
1.4 1.4 Overview of Xlib
Chapter 2: X Concepts
2.1 2.1 How Xlib Works
2.2 2.2 What are X Windows?
2.3 2.3 Introduction to X Graphics
2.4 2.4 More on Window Characteristics
2.5 2.5 Introduction to Events
2.6 2.6 How to Program with Xlib
Chapter 3: Basic Window Program
3.1 3.1 Running the Program
3.2 3.2 The Main of basicwin
Chapter 4: Window Attributes
4.1 4.1 Setting Window Attributes
4.2 4.2 The Window Attribute Structures
4.3 4.3 Settable Attributes
4.4 4.4 Information from the XWindowAttributes Structure
Chapter 5: The Graphics Context
5.1 5.1 Creating and Setting a Graphics Context
5.2 5.2 Switching Between Graphics Contexts
5.3 5.3 Controlling Pixel Selection
5.4 5.4 Controlling Coloring and Patterning
5.5 5.5 Controlling Graphics Tricks
5.6 5.6 Graphics Exposure
5.7 5.7 Subwindow Mode
5.8 5.8 Sharing GCs Between Clients
5.9 5.9 GCs and Server Efficiency
5.10 5.10 Querying the Graphics Context
5.11 5.11 The Default GC Versus Default Values of a GC
Chapter 6: Drawing Graphics and Text
6.1 6.1 Drawing
6.2 6.2 Fonts and Text
6.3 6.3 Regions
6.4 6.4 Images
6.5 6.5 Cursors
Chapter 7: Color
7.1 7.1 Basic Color Terms and Concepts
7.2 7.2 Color Naming and Specification
7.3 7.3 Differences in Display Hardware
7.4 7.4 Allocating Shared Colors
7.5 7.5 Allocating Private Colors
7.6 7.6 Getting Complete Visual Information
7.7 7.7 The GrayScale Visual
7.8 7.8 Standard Colormaps
7.9 7.9 Device-independent Color and Xcms
7.10 7.10 Creating and Installing Colormaps
7.11 7.11 Miscellaneous Color-handling Functions
Chapter 8: Events
8.1 8.1 Overview of Event Handling
8.2 8.2 Event Processing
8.3 8.3 Selecting Events
8.4 8.4 Sending Events
8.5 8.5 Where to Find More on Each Event
Chapter 9: The Keyboard and Pointer
9.1 9.1 The Keyboard
9.2 9.2 The Pointer
9.3 9.3 Border Crossing and Keyboard Focus Change Events
9.4 9.4 Grabbing the Keyboard and Pointer
9.5 9.5 Keyboard Preferences
9.6 9.6 Pointer Preferences
9.7 9.7 X Input Extension
Chapter 10: Internationalization
10.1 10.1 An Overview of Internationalization
10.2 10.2 Locale Management in X
10.3 10.3 Internationalized Text Output in X
10.4 10.4 String Encoding Changes for Internationalization
10.5 10.5 Internationalized Interclient Communication
10.6 10.6 Localization of Resource Databases
10.7 10.7 Summary: Writing an Internationalized Application
Chapter 11: Internationalized Text Input
11.1 11.1 Issues of Internationalized Text Input
11.2 11.2 Overview of the X Input Method Architecture
11.3 11.3 XIM Programming Interface
11.4 11.4 XIM Functions
11.5 11.5 XIC Functions
11.6 11.6 Input Context Attributes
11.7 11.7 Negotiating Preedit and Status Area Geometries
11.8 11.8 Geometry, Preedit, and Status Callbacks
11.9 11.9 Filtering Events
11.10 11.10 Getting Composed Text
11.11 11.11 XIM Programming Checklist
Chapter 12: Interclient Communication
12.1 12.1 Properties and Atoms
12.2 12.2 The Compound Text Encoding
12.3 12.3 Communicating with the Window Manager
12.4 12.4 Selections
12.5 12.5 Cut Buffers
Chapter 13: Managing User Preferences
13.1 13.1 Using XGetDefault()
13.2 13.2 Using the Low-level Resource Manager Routines
13.3 13.3 Standard Geometry
13.4 13.4 Resource Specification and Matching
13.5 13.5 Other Resource Manager Routines
Chapter 14: A Complete Application
14.1 14.1 Description of basecalc
14.2 14.2 Include Files
14.3 14.3 The Main of basecalc
14.4 14.4 Getting User Preferences
14.5 14.5 Printing a Usage Message
14.6 14.6 Initializing the Calculator
14.7 14.7 Making Windows
14.8 14.8 Selecting Events
14.9 14.9 Processing Events
14.10 14.10 Drawing a Pad
14.11 14.11 Routines Not Shown
Chapter 15: Other Programming Techniques
15.1 15.1 Reading and Writing Properties
15.2 15.2 Screen Saver
15.3 15.3 Host Access and Security
15.4 15.4 Getting the Window Hierarchy
15.5 15.5 Close Down Mode
15.6 15.6 Connection Close Operations
15.7 15.7 Data Management
15.8 15.8 The After Function
15.9 15.9 Coordinate Transformation
15.10 15.10 ANSI-C and POSIX Portability
15.11 15.11 Porting Programs to X
15.12 15.12 Programming for Multiple X Releases
15.13 15.13 Using Extensions to X
Chapter 16: Window Management
16.1 16.1 Layout Policy
16.2 16.2 Substructure Redirection
16.3 16.3 Reparenting
16.4 16.4 Window Save-set
16.5 16.5 Window Manager - Client Communications
16.6 16.6 Window Management Functions
16.7 16.7 A Basic Window Manager
Specifying Fonts
A.1 Font Specification
A.2 Font Service
A.3 Scalable Fonts
X10 Compatibility
B.1 XDraw and XDrawFilled()
B.2 Association Tables
Writing Extensions to XThis appendix is lightly edited and reformatted from the original MIT material. Before attempting to write extensions, you should be intimately familiar with the X Window System Protocol, Version 11, by Robert Scheifler and Ron Newman, and with the server code.Unfortunately, this appendix does not currently provide sufficient tutorial or contextual information to allow you to build an extension. We intend to provide a more helpful description of how to write extensions in a forthcoming book about the server. In the meantime, several sample extensions are provided with the X core distribution which can be used as examples.
C.1 Basic Protocol Support Routines
C.2 Hooking into Xlib
C.3 GC Caching
C.4 Graphics Batching
C.5 Writing Extension Stubs
The basecalc Application
Event Reference
E.1 Meaning of Common Structure Elements
The Xmu Library
F.1 Atom Functions
F.2 Error Handler Functions
F.3 System Utility Functions
F.4 Window Utility Functions
F.5 Cursor Utility Functions
F.6 Color Utilities
F.7 Pixmap Utilities
F.8 Graphics Functions
F.9 Selection Functions
F.10 Character Set Functions
F.11 Compound Text Functions
F.12 CloseDisplay Hook Functions
F.13 Display Queue Functions
F.14 Standard Colormap Functions
Sources of Additional Information
G.1 Getting the X Software
G.2 Netnews
G.3 Training, Consulting, and Support
G.4 The X Consortium
G.5 Finding Out for Yourself
Release Notes
H.1 Changes from Release 4 to Release 5
H.2 Miscellaneous Xlib Changes
H.3 Changes from Release 3 to Release 4
Glossary
References
About This Manual
Summary of Contents
How to Use This Manual
Getting the Example Programs
Compiling the Example Programs
Assumptions
Font Conventions Used in This Manual
Related Documents
How to Contact Us
Bulk Sales Information
Acknowledgements
Chapter 1: Introduction
1.1 1.1 Versions of X
1.2 1.2 X Window System Concepts
1.3 1.3 X Window System Software Architecture
1.4 1.4 Overview of Xlib
Chapter 2: X Concepts
2.1 2.1 How Xlib Works
2.2 2.2 What are X Windows?
2.3 2.3 Introduction to X Graphics
2.4 2.4 More on Window Characteristics
2.5 2.5 Introduction to Events
2.6 2.6 How to Program with Xlib
Chapter 3: Basic Window Program
3.1 3.1 Running the Program
3.2 3.2 The Main of basicwin
Chapter 4: Window Attributes
4.1 4.1 Setting Window Attributes
4.2 4.2 The Window Attribute Structures
4.3 4.3 Settable Attributes
4.4 4.4 Information from the XWindowAttributes Structure
Chapter 5: The Graphics Context
5.1 5.1 Creating and Setting a Graphics Context
5.2 5.2 Switching Between Graphics Contexts
5.3 5.3 Controlling Pixel Selection
5.4 5.4 Controlling Coloring and Patterning
5.5 5.5 Controlling Graphics Tricks
5.6 5.6 Graphics Exposure
5.7 5.7 Subwindow Mode
5.8 5.8 Sharing GCs Between Clients
5.9 5.9 GCs and Server Efficiency
5.10 5.10 Querying the Graphics Context
5.11 5.11 The Default GC Versus Default Values of a GC
Chapter 6: Drawing Graphics and Text
6.1 6.1 Drawing
6.2 6.2 Fonts and Text
6.3 6.3 Regions
6.4 6.4 Images
6.5 6.5 Cursors
Chapter 7: Color
7.1 7.1 Basic Color Terms and Concepts
7.2 7.2 Color Naming and Specification
7.3 7.3 Differences in Display Hardware
7.4 7.4 Allocating Shared Colors
7.5 7.5 Allocating Private Colors
7.6 7.6 Getting Complete Visual Information
7.7 7.7 The GrayScale Visual
7.8 7.8 Standard Colormaps
7.9 7.9 Device-independent Color and Xcms
7.10 7.10 Creating and Installing Colormaps
7.11 7.11 Miscellaneous Color-handling Functions
Chapter 8: Events
8.1 8.1 Overview of Event Handling
8.2 8.2 Event Processing
8.3 8.3 Selecting Events
8.4 8.4 Sending Events
8.5 8.5 Where to Find More on Each Event
Chapter 9: The Keyboard and Pointer
9.1 9.1 The Keyboard
9.2 9.2 The Pointer
9.3 9.3 Border Crossing and Keyboard Focus Change Events
9.4 9.4 Grabbing the Keyboard and Pointer
9.5 9.5 Keyboard Preferences
9.6 9.6 Pointer Preferences
9.7 9.7 X Input Extension
Chapter 10: Internationalization
10.1 10.1 An Overview of Internationalization
10.2 10.2 Locale Management in X
10.3 10.3 Internationalized Text Output in X
10.4 10.4 String Encoding Changes for Internationalization
10.5 10.5 Internationalized Interclient Communication
10.6 10.6 Localization of Resource Databases
10.7 10.7 Summary: Writing an Internationalized Application
Chapter 11: Internationalized Text Input
11.1 11.1 Issues of Internationalized Text Input
11.2 11.2 Overview of the X Input Method Architecture
11.3 11.3 XIM Programming Interface
11.4 11.4 XIM Functions
11.5 11.5 XIC Functions
11.6 11.6 Input Context Attributes
11.7 11.7 Negotiating Preedit and Status Area Geometries
11.8 11.8 Geometry, Preedit, and Status Callbacks
11.9 11.9 Filtering Events
11.10 11.10 Getting Composed Text
11.11 11.11 XIM Programming Checklist
Chapter 12: Interclient Communication
12.1 12.1 Properties and Atoms
12.2 12.2 The Compound Text Encoding
12.3 12.3 Communicating with the Window Manager
12.4 12.4 Selections
12.5 12.5 Cut Buffers
Chapter 13: Managing User Preferences
13.1 13.1 Using XGetDefault()
13.2 13.2 Using the Low-level Resource Manager Routines
13.3 13.3 Standard Geometry
13.4 13.4 Resource Specification and Matching
13.5 13.5 Other Resource Manager Routines
Chapter 14: A Complete Application
14.1 14.1 Description of basecalc
14.2 14.2 Include Files
14.3 14.3 The Main of basecalc
14.4 14.4 Getting User Preferences
14.5 14.5 Printing a Usage Message
14.6 14.6 Initializing the Calculator
14.7 14.7 Making Windows
14.8 14.8 Selecting Events
14.9 14.9 Processing Events
14.10 14.10 Drawing a Pad
14.11 14.11 Routines Not Shown
Chapter 15: Other Programming Techniques
15.1 15.1 Reading and Writing Properties
15.2 15.2 Screen Saver
15.3 15.3 Host Access and Security
15.4 15.4 Getting the Window Hierarchy
15.5 15.5 Close Down Mode
15.6 15.6 Connection Close Operations
15.7 15.7 Data Management
15.8 15.8 The After Function
15.9 15.9 Coordinate Transformation
15.10 15.10 ANSI-C and POSIX Portability
15.11 15.11 Porting Programs to X
15.12 15.12 Programming for Multiple X Releases
15.13 15.13 Using Extensions to X
Chapter 16: Window Management
16.1 16.1 Layout Policy
16.2 16.2 Substructure Redirection
16.3 16.3 Reparenting
16.4 16.4 Window Save-set
16.5 16.5 Window Manager - Client Communications
16.6 16.6 Window Management Functions
16.7 16.7 A Basic Window Manager
Specifying Fonts
A.1 Font Specification
A.2 Font Service
A.3 Scalable Fonts
X10 Compatibility
B.1 XDraw and XDrawFilled()
B.2 Association Tables
Writing Extensions to XThis appendix is lightly edited and reformatted from the original MIT material. Before attempting to write extensions, you should be intimately familiar with the X Window System Protocol, Version 11, by Robert Scheifler and Ron Newman, and with the server code.Unfortunately, this appendix does not currently provide sufficient tutorial or contextual information to allow you to build an extension. We intend to provide a more helpful description of how to write extensions in a forthcoming book about the server. In the meantime, several sample extensions are provided with the X core distribution which can be used as examples.
C.1 Basic Protocol Support Routines
C.2 Hooking into Xlib
C.3 GC Caching
C.4 Graphics Batching
C.5 Writing Extension Stubs
The basecalc Application
Event Reference
E.1 Meaning of Common Structure Elements
The Xmu Library
F.1 Atom Functions
F.2 Error Handler Functions
F.3 System Utility Functions
F.4 Window Utility Functions
F.5 Cursor Utility Functions
F.6 Color Utilities
F.7 Pixmap Utilities
F.8 Graphics Functions
F.9 Selection Functions
F.10 Character Set Functions
F.11 Compound Text Functions
F.12 CloseDisplay Hook Functions
F.13 Display Queue Functions
F.14 Standard Colormap Functions
Sources of Additional Information
G.1 Getting the X Software
G.2 Netnews
G.3 Training, Consulting, and Support
G.4 The X Consortium
G.5 Finding Out for Yourself
Release Notes
H.1 Changes from Release 4 to Release 5
H.2 Miscellaneous Xlib Changes
H.3 Changes from Release 3 to Release 4
Glossary
References