XLIB Programming Manual, Rel. 5, Third Edition

Book description

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.

    Table of contents

    1. XLIB Programming Manual, Rel. 5
      1. Preface
        1. About This Manual
        2. Summary of Contents
        3. How to Use This Manual
        4. Getting the Example Programs
          1. FTP
          2. FTPMAIL
          3. BITFTP
          4. UUCP
        5. Compiling the Example Programs
        6. Assumptions
        7. Font Conventions Used in This Manual
        8. Related Documents
        9. How to Contact Us
        10. Bulk Sales Information
        11. Acknowledgements
      2. 1. Introduction
        1. 1.1 Versions of X
        2. 1.2 X Window System Concepts
          1. 1.2.1 Displays and Screens
          2. 1.2.2 The Server-Client Model
          3. 1.2.3 Window Management
          4. 1.2.4 Events
          5. 1.2.5 Extensions to X
        3. 1.3 X Window System Software Architecture
        4. 1.4 Overview of Xlib
      3. 2. X Concepts
        1. 2.1 How Xlib Works
          1. 2.1.1 The X Protocol
          2. 2.1.2 Buffering
          3. 2.1.3 Resources
          4. 2.1.4 Properties and Atoms
          5. 2.1.5 The Window Manager
        2. 2.2 What are X Windows?
          1. 2.2.1 Window Characteristics
          2. 2.2.2 Window Hierarchy
          3. 2.2.3 Window Stacking Order
          4. 2.2.4 Mapping and Visibility
        3. 2.3 Introduction to X Graphics
          1. 2.3.1 Pixels and Colors
          2. 2.3.2 Pixels and Planes
          3. 2.3.3 Pixmaps and Drawables
          4. 2.3.4 Drawing and the Graphics Context
          5. 2.3.5 Tiles and Stipples
        4. 2.4 More on Window Characteristics
          1. 2.4.1 Window Attributes
          2. 2.4.2 Window Configuration
          3. 2.4.3 Class: InputOutput and InputOnly Windows
          4. 2.4.4 Depth and Visual
          5. 2.4.5 Icons
          6. 2.4.6 Special Characteristics of the Root Window
        5. 2.5 Introduction to Events
          1. 2.5.1 What is an Event?
          2. 2.5.2 Selection and Propagation of Events
          3. 2.5.3 The Event Queue
          4. 2.5.4 An Event Structure
          5. 2.5.5 The Event Loop
        6. 2.6 How to Program with Xlib
          1. 2.6.1 Designing an X Application
            1. 2.6.1.1 Design Requirements
            2. 2.6.1.2 The User Interface
          2. 2.6.2 Writing an X Application
            1. 2.6.2.1 Resources and User Customizability
            2. 2.6.2.2 Compiling and Linking X Programs
            3. 2.6.2.3 Naming Conventions
            4. 2.6.2.4 Using Structures, Symbols, and Masks
            5. 2.6.2.5 Performance Optimizing
            6. 2.6.2.6 ANSI-C and POSIX Portability
          3. 2.6.3 Debugging an X Application
            1. 2.6.3.1 Errors
            2. 2.6.3.2 The XErrorEvent Structure
            3. 2.6.3.3 Synchronizing Errors
            4. 2.6.3.4 Software Interrupts
      4. 3. Basic Window Program
        1. 3.1 Running the Program
        2. 3.2 The Main of basicwin
          1. 3.2.1 Include Files and Declarations
          2. 3.2.2 Connecting to a Server
          3. 3.2.3 Display Macros
          4. 3.2.4 Getting Window Information
          5. 3.2.5 Creating Windows
          6. 3.2.6 Color Strategy
          7. 3.2.7 Preparing an Icon Pixmap
          8. 3.2.8 Communicating with the Window Manager
          9. 3.2.9 Selecting Desired Event Types
          10. 3.2.10 Creating Server Resources
          11. 3.2.11 Window Mapping
          12. 3.2.12 Flushing the Output Buffer
          13. 3.2.13 Setting Up an Event-gathering Loop
            1. 3.2.13.1 Repainting the Window
          14. 3.2.14 When Can I Draw?
          15. 3.2.15 When Will My Drawing Appear?
          16. 3.2.16 Handling Resizing of the Window
          17. 3.2.17 Exiting the Program
          18. 3.2.18 Error Handling
          19. 3.2.19 Summary
          20. 3.2.20 Complete Code for basicwin
      5. 4. Window Attributes
        1. 4.1 Setting Window Attributes
        2. 4.2 The Window Attribute Structures
        3. 4.3 Settable Attributes
          1. 4.3.1 The Window Background
            1. 4.3.1.1 background_pixmap
            2. 4.3.1.2 background_pixel
          2. 4.3.2 The Window Border
            1. 4.3.2.1 border_pixmap
            2. 4.3.2.2 border_pixel
          3. 4.3.3 Bit Gravity
          4. 4.3.4 Window Gravity
          5. 4.3.5 Backing Store
          6. 4.3.6 Saving Under
          7. 4.3.7 Event Handling
          8. 4.3.8 Substructure Redirect Override
          9. 4.3.9 Colormap
          10. 4.3.10 Cursor
          11. 4.3.11 Default Attributes
        4. 4.4 Information from the XWindowAttributes Structure
      6. 5. The Graphics Context
        1. 5.1 Creating and Setting a Graphics Context
        2. 5.2 Switching Between Graphics Contexts
        3. 5.3 Controlling Pixel Selection
          1. 5.3.1 Line Characteristics
            1. 5.3.1.1 Line Width
            2. 5.3.1.2 Line Style
            3. 5.3.1.3 Cap Style
            4. 5.3.1.4 Join Style
            5. 5.3.1.5 Dash List and Offset
            6. 5.3.1.6 Example of Setting Line Characteristics
          2. 5.3.2 The Font
          3. 5.3.3 Fill Rule
          4. 5.3.4 Arc Mode (for Filling)
          5. 5.3.5 Clip Mask
        4. 5.4 Controlling Coloring and Patterning
          1. 5.4.1 Drawing in Foreground Only
          2. 5.4.2 Tiles
          3. 5.4.3 Stipples
          4. 5.4.4 Fill Style
          5. 5.4.5 Drawing in Foreground and Background
            1. 5.4.5.1 Tile and Stipple Sizes
        5. 5.5 Controlling Graphics Tricks
          1. 5.5.1 Logical Function
          2. 5.5.2 Plane Mask
        6. 5.6 Graphics Exposure
        7. 5.7 Subwindow Mode
        8. 5.8 Sharing GCs Between Clients
        9. 5.9 GCs and Server Efficiency
        10. 5.10 Querying the Graphics Context
        11. 5.11 The Default GC Versus Default Values of a GC
      7. 6. Drawing Graphics and Text
        1. 6.1 Drawing
          1. 6.1.1 The Request Size Limit
          2. 6.1.2 Scaling Graphics
          3. 6.1.3 Example of Drawing Graphics
          4. 6.1.4 Filling
          5. 6.1.5 Creating Bitmaps, Pixmaps, Tiles, and Stipples
          6. 6.1.6 Copying and Clearing Areas
        2. 6.2 Fonts and Text
          1. 6.2.1 Character Format
          2. 6.2.2 Loading Fonts
          3. 6.2.3 Font Naming
          4. 6.2.4 Character Metrics
            1. 6.2.4.1 The XCharStruct Structure
            2. 6.2.4.2 The XFontStruct Structure
          5. 6.2.5 Positioning of Text
          6. 6.2.6 Text-drawing Routines
          7. 6.2.7 The draw_text Routine
          8. 6.2.8 Vertical Text and Rotated Text
          9. 6.2.9 Font Properties
          10. 6.2.10 Setting the Font Path
        3. 6.3 Regions
          1. 6.3.1 Moving and Resizing Regions
          2. 6.3.2 Computations with Regions
          3. 6.3.3 Returning Region Information
        4. 6.4 Images
          1. 6.4.1 Manipulating Images
          2. 6.4.2 Examples Using Images
        5. 6.5 Cursors
          1. 6.5.1 The Standard Cursor Font
          2. 6.5.2 Creating a Pixmap Cursor
          3. 6.5.3 Loading and Changing Cursors
      8. 7. Color
        1. 7.1 Basic Color Terms and Concepts
        2. 7.2 Color Naming and Specification
          1. 7.2.1 The Server-side Color Name Database
          2. 7.2.2 Xcms Color Specification
          3. 7.2.3 The Client-side Color Name Database
          4. 7.2.4 Hexadecimal Color Specification
        3. 7.3 Differences in Display Hardware
          1. 7.3.1 Mid-range Color Displays
          2. 7.3.2 Monochrome and Gray Scale
          3. 7.3.3 High Performance Color Displays
          4. 7.3.4 How X Describes Color Support with Visuals
          5. 7.3.5 Shareability vs. Changeability
        4. 7.4 Allocating Shared Colors
          1. 7.4.1 The XColor Structure
          2. 7.4.2 Code to Allocate Read-only Colors
          3. 7.4.3 Highlighting in Two Colors
          4. 7.4.4 Choosing Default Colors
        5. 7.5 Allocating Private Colors
          1. 7.5.1 Allocating Read/Write Colorcells for Dynamic Colors
          2. 7.5.2 Allocating Read/Write Colorcells for Overlays
          3. 7.5.3 Using XAllocColorPlanes()
        6. 7.6 Getting Complete Visual Information
          1. 7.6.1 The XVisualInfo Structure
          2. 7.6.2 Example of Choosing a Visual
        7. 7.7 The GrayScale Visual
        8. 7.8 Standard Colormaps
          1. 7.8.1 The Standard Colormap Properties
          2. 7.8.2 The XStandardColormap Structure
          3. 7.8.3 The 3/3/2 Standard Colormap
          4. 7.8.4 Creating and Using a Standard Colormap
          5. 7.8.5 RGB-to-Pixel Conversion
        9. 7.9 Device-independent Color and Xcms
          1. 7.9.1 The Fundamentals of Color Representation
          2. 7.9.2 Screen Characterization and the XDCCC
          3. 7.9.3 The Xcms Programming Interface
            1. 7.9.3.1 Color and Colormap Functions
            2. 7.9.3.2 Color Conversion
            3. 7.9.3.3 Gamut-querying Functions
        10. 7.10 Creating and Installing Colormaps
          1. 7.10.1 Functions for Manipulating Colormaps
          2. 7.10.2 The ColormapNotify Event
          3. 7.10.3 The Required Colormap List
        11. 7.11 Miscellaneous Color-handling Functions
      9. 8. Events
        1. 8.1 Overview of Event Handling
        2. 8.2 Event Processing
          1. 8.2.1 The Event Structures
          2. 8.2.2 Event Types and XEvent Union
          3. 8.2.3 Xlib’s Event Queue
          4. 8.2.4 Writing the Event Loop
          5. 8.2.5 Printing the Event Type
          6. 8.2.6 Routines that Get Events
          7. 8.2.7 Predicate Procedures
        3. 8.3 Selecting Events
          1. 8.3.1 Correspondence Between Event Masks and Events
          2. 8.3.2 Propagation of Device Events
            1. 8.3.2.1 The Keyboard Focus Window
            2. 8.3.2.2 Keyboard and Pointer Grabbing
          3. 8.3.3 Event Masks
            1. 8.3.3.1 KeyPressMask and KeyReleaseMask
            2. 8.3.3.2 ButtonPressMask, ButtonReleaseMask, and OwnerGrabButtonMask
            3. 8.3.3.3 The Pointer Motion Masks
            4. 8.3.3.4 FocusChangeMask
            5. 8.3.3.5 EnterWindowMask and LeaveWindowMask
            6. 8.3.3.6 KeymapStateMask
            7. 8.3.3.7 ExposureMask
            8. 8.3.3.8 VisibilityChangeMask
            9. 8.3.3.9 ColormapChangeMask
            10. 8.3.3.10 PropertyChangeMask
            11. 8.3.3.11 StructureNotifyMask and SubstructureNotifyMask
            12. 8.3.3.12 SubstructureRedirectMask
            13. 8.3.3.13 ResizeRedirectMask
            14. 8.3.3.14 Automatically Selected Events
        4. 8.4 Sending Events
        5. 8.5 Where to Find More on Each Event
      10. 9. The Keyboard and Pointer
        1. 9.1 The Keyboard
          1. 9.1.1 Simple Keyboard Input
            1. 9.1.1.1 Getting a String — A Dialog Box
          2. 9.1.2 The Keyboard Mappings
            1. 9.1.2.1 Keysyms to Strings
            2. 9.1.2.2 The Modifier Keys
            3. 9.1.2.3 Keycodes to Keysyms
          3. 9.1.3 Background on Keysyms
            1. 9.1.3.1 The Design of Keysyms
            2. 9.1.3.2 Conventions for Keysym Meaning
          4. 9.1.4 Changing the Server-wide Keyboard Mappings
            1. 9.1.4.1 Changing the Keycode-to-Keysym Mapping
            2. 9.1.4.2 Changing Modifier Mapping
          5. 9.1.5 Other Keyboard-handling Routines
        2. 9.2 The Pointer
          1. 9.2.1 Tracking Pointer Motion
            1. 9.2.1.1 Getting All Motion Events
            2. 9.2.1.2 Using Pointer Motion Hints
            3. 9.2.1.3 Motion History
          2. 9.2.2 Handling Pointer Button Events
          3. 9.2.3 Changing the Pointer Button Mapping
          4. 9.2.4 Moving the Pointer
        3. 9.3 Border Crossing and Keyboard Focus Change Events
          1. 9.3.1 The KeymapNotify Event
        4. 9.4 Grabbing the Keyboard and Pointer
          1. 9.4.1 Implementing Type-ahead for Information Entry
        5. 9.5 Keyboard Preferences
          1. 9.5.1 Setting Keyboard Preferences
          2. 9.5.2 Getting Keyboard Preferences
        6. 9.6 Pointer Preferences
        7. 9.7 X Input Extension
      11. 10. Internationalization
        1. 10.1 An Overview of Internationalization
          1. 10.1.1 Internationalization with ANSI-C
          2. 10.1.2 Text Representation in an Internationalized Application
            1. 10.1.2.1 ISO8859-1 and Other Encodings
            2. 10.1.2.2 Multi-byte Strings and Wide-character Strings
          3. 10.1.3 Internationalization Using X
        2. 10.2 Locale Management in X
        3. 10.3 Internationalized Text Output in X
          1. 10.3.1 Creating and Manipulating Fontsets
          2. 10.3.2 Querying Fontset Metrics
          3. 10.3.3 Context Dependencies in Displayed Text
          4. 10.3.4 Measuring Strings
          5. 10.3.5 Drawing Internationalized Text
        4. 10.4 String Encoding Changes for Internationalization
        5. 10.5 Internationalized Interclient Communication
        6. 10.6 Localization of Resource Databases
        7. 10.7 Summary: Writing an Internationalized Application
      12. 11. Internationalized Text Input
        1. 11.1 Issues of Internationalized Text Input
        2. 11.2 Overview of the X Input Method Architecture
          1. 11.2.1 Input Methods and Input Servers
          2. 11.2.2 User Interaction with an Input Method
          3. 11.2.3 The X Input Method
          4. 11.2.4 The X Input Context
          5. 11.2.5 Input Context Focus Management
          6. 11.2.6 Preedit and Status Area Geometry Management
          7. 11.2.7 Preedit and Status Callbacks
          8. 11.2.8 Getting Composed Input
          9. 11.2.9 Filtering Events
          10. 11.2.10 The Big Picture
        3. 11.3 XIM Programming Interface
        4. 11.4 XIM Functions
          1. 11.4.1 Opening and Closing an Input Method
          2. 11.4.2 Querying Input Method Values
        5. 11.5 XIC Functions
          1. 11.5.1 Choosing an Interaction Style
          2. 11.5.2 Creating and Destroying Input Contexts
          3. 11.5.3 Querying and Modifying an XIC
          4. 11.5.4 Resetting an Input Context
          5. 11.5.5 Setting Input Context Focus
          6. 11.5.6 Input Context Utility Functions
        6. 11.6 Input Context Attributes
          1. 11.6.1 XNInputStyle
          2. 11.6.2 XNClientWindow
          3. 11.6.3 XNFocusWindow
          4. 11.6.4 XNResourceName and XNResourceClass
          5. 11.6.5 XNGeometryCallback
          6. 11.6.6 XNFilterEvents
          7. 11.6.7 XNPreeditAttributes and XNStatusAttributes
            1. 11.6.7.1 XNArea
            2. 11.6.7.2 XNAreaNeeded
            3. 11.6.7.3 XNSpotLocation
            4. 11.6.7.4 XNColormap
            5. 11.6.7.5 XNStdColormap
            6. 11.6.7.6 XNForeground
            7. 11.6.7.7 XNBackground
            8. 11.6.7.8 XNBackgroundPixmap
            9. 11.6.7.9 XNFontSet
            10. 11.6.7.10 XNLineSpacing
            11. 11.6.7.11 XNCursor
            12. 11.6.7.12 Preedit and Status Callbacks
        7. 11.7 Negotiating Preedit and Status Area Geometries
        8. 11.8 Geometry, Preedit, and Status Callbacks
          1. 11.8.1 The Geometry Callback
          2. 11.8.2 The PreeditStartCallback and the PreeditEndCallback
          3. 11.8.3 The PreeditDrawCallback
          4. 11.8.4 The PreeditCaretCallback
          5. 11.8.5 The StatusStartCallback and the StatusDoneCallback
          6. 11.8.6 The StatusDrawCallback
        9. 11.9 Filtering Events
        10. 11.10 Getting Composed Text
        11. 11.11 XIM Programming Checklist
      13. 12. Interclient Communication
        1. 12.1 Properties and Atoms
        2. 12.2 The Compound Text Encoding
        3. 12.3 Communicating with the Window Manager
          1. 12.3.1 Standard Properties for Window Manager
            1. 12.3.1.1 Application Name – XA_WM_NAME
            2. 12.3.1.2 Icon Name - XA_WM_ICON_NAME
            3. 12.3.1.3 Window Size Hints - XA_WM_NORMAL_HINTS
            4. 12.3.1.4 Additional Window Manager Hints – XA_WM_HINTS
              1. 12.3.1.4.1 Flags Field
              2. 12.3.1.4.2 Input Field and the Keyboard Focus
              3. 12.3.1.4.3 Initial State Field
              4. 12.3.1.4.4 Icon Hints Fields
              5. 12.3.1.4.5 Window Group Field
              6. 12.3.1.4.6 Transient Window Field
            5. 12.3.1.5 Application Class Name and Instance Name – XA_WM_CLASS
          2. 12.3.2 Standard Properties for Session Manager
            1. 12.3.2.1 Application Command and Arguments
            2. 12.3.2.2 Client Machine
          3. 12.3.3 Optional Properties for Window and Session Manager
            1. 12.3.3.1 Using Created Colormaps - WM_COLORMAP_WINDOWS
            2. 12.3.3.2 Window Manager Protocols - WM_PROTOCOLS
              1. 12.3.3.2.1 WM_TAKE_FOCUS
              2. 12.3.3.2.2 WM_SAVE_YOURSELF
              3. 12.3.3.2.3 WM_DELETE_WINDOW
          4. 12.3.4 Properties Set by the Window Manager
            1. 12.3.4.1 XA_WM_ICON_SIZE
            2. 12.3.4.2 WM_STATE
          5. 12.3.5 Text Properties
          6. 12.3.6 Constraints on Client Actions
            1. 12.3.6.1 Changing Application State
            2. 12.3.6.2 Reconfiguring the Top-level Window
        4. 12.4 Selections
          1. 12.4.1 The Selection Mechanism
          2. 12.4.2 An Example of Selection
          3. 12.4.3 Acquiring Selection Ownership
          4. 12.4.4 Responsibilities of the Selection Owner
          5. 12.4.5 Giving Up Selection Ownership
          6. 12.4.6 Requesting a Selection
          7. 12.4.7 Large Data Transfers
          8. 12.4.8 More on Selection Properties and Types
          9. 12.4.9 Target Atoms
        5. 12.5 Cut Buffers
      14. 13. Managing User Preferences
        1. 13.1 Using XGetDefault()
        2. 13.2 Using the Low-level Resource Manager Routines
          1. 13.2.1 Resource Files and Merging
          2. 13.2.2 Including Files in a Resource File
          3. 13.2.3 Resource Properties
          4. 13.2.4 The Low Level Xrm Routines
        3. 13.3 Standard Geometry
        4. 13.4 Resource Specification and Matching
          1. 13.4.1 Tight Bindings and Loose Bindings
          2. 13.4.2 Wildcarding Resource Component Names
          3. 13.4.3 The -name Option
          4. 13.4.4 Storage/Access Rules
          5. 13.4.5 Resource Manager Values and Representation Types
        5. 13.5 Other Resource Manager Routines
          1. 13.5.1 Putting Resources into the Database
          2. 13.5.2 Combining the Contents of Databases
          3. 13.5.3 Enumerating Database Entries
          4. 13.5.4 Associating a Resource Database with a Display
          5. 13.5.5 Getting the Locale of a Database
          6. 13.5.6 Quarks
      15. 14. A Complete Application
        1. 14.1 Description of basecalc
        2. 14.2 Include Files
        3. 14.3 The Main of basecalc
        4. 14.4 Getting User Preferences
          1. 14.4.1 User Defaults for basecalc
          2. 14.4.2 Parsing the Command Line
          3. 14.4.3 Getting the Databases
          4. 14.4.4 Getting Options from the Database
        5. 14.5 Printing a Usage Message
        6. 14.6 Initializing the Calculator
        7. 14.7 Making Windows
        8. 14.8 Selecting Events
        9. 14.9 Processing Events
        10. 14.10 Drawing a Pad
        11. 14.11 Routines Not Shown
      16. 15. Other Programming Techniques
        1. 15.1 Reading and Writing Properties
        2. 15.2 Screen Saver
        3. 15.3 Host Access and Security
          1. 15.3.1 The Host Access List
          2. 15.3.2 Enabling and Disabling Access Control
        4. 15.4 Getting the Window Hierarchy
        5. 15.5 Close Down Mode
        6. 15.6 Connection Close Operations
        7. 15.7 Data Management
          1. 15.7.1 The Context Manager
        8. 15.8 The After Function
        9. 15.9 Coordinate Transformation
        10. 15.10 ANSI-C and POSIX Portability
          1. 15.10.1 <X11/Xosdefs.h>
          2. 15.10.2 <X11/Xos.h>
          3. 15.10.3 <X11/Xfuncs.h>
          4. 15.10.4 <X11/Xfuncproto.h>
          5. 15.10.5 Other Symbols
        11. 15.11 Porting Programs to X
        12. 15.12 Programming for Multiple X Releases
        13. 15.13 Using Extensions to X
      17. 16. Window Management
        1. 16.1 Layout Policy
        2. 16.2 Substructure Redirection
        3. 16.3 Reparenting
          1. 16.3.1 Shadows
        4. 16.4 Window Save-set
        5. 16.5 Window Manager - Client Communications
          1. 16.5.1 Reading the Hints
          2. 16.5.2 Setting Icon Sizes
          3. 16.5.3 Window Manager Protocols
        6. 16.6 Window Management Functions
        7. 16.7 A Basic Window Manager
          1. 16.7.1 Operation of the Program
          2. 16.7.2 Description of the Code of main
          3. 16.7.3 Window Layering
          4. 16.7.4 Selecting Input
          5. 16.7.5 Handling Input
          6. 16.7.6 Inverting an Area
          7. 16.7.7 Cursors
          8. 16.7.8 Grabbing the Pointer
          9. 16.7.9 Painting the Menu
          10. 16.7.10 Circulating Windows
          11. 16.7.11 Raising and Lowering Windows
          12. 16.7.12 Moving and Resizing Windows
          13. 16.7.13 The draw_box Routine
          14. 16.7.14 (De)Iconifying Windows
          15. 16.7.15 Creating the Icons
          16. 16.7.16 Getting the Icon Size
          17. 16.7.17 Updating the Icon List
          18. 16.7.18 Removing Icons
          19. 16.7.19 Changing Keyboard Focus
          20. 16.7.20 Drawing the Focus Frame
          21. 16.7.21 Executing a Shell Command
      18. A. Specifying Fonts
        1. A.1 Font Specification
          1. A.1.1 Font Naming Conventions
          2. A.1.2 Font Name Wildcarding
          3. A.1.3 Font Name Aliasing
          4. A.1.4 Making the Server Aware of Aliases
          5. A.1.5 The fonts.dir Files
        2. A.2 Font Service
          1. A.2.1 Font Server Naming
          2. A.2.2 Font Server Configuration
        3. A.3 Scalable Fonts
          1. A.3.1 Finding Scalable Fonts
          2. A.3.2 Finding Derived Instances of Scalable Fonts
          3. A.3.3 Using Scalable Fonts
      19. B. X10 Compatibility
        1. B.1 XDraw and XDrawFilled()
        2. B.2 Association Tables
      20. C. Writing Extensions to X
        1. C.1 Basic Protocol Support Routines
          1. C.1.1 XListExtensions
          2. C.1.2 XFreeExtensionList
        2. C.2 Hooking into Xlib
          1. C.2.1 XInitExtension
          2. C.2.2 XAddExtension
          3. C.2.3 Hooks into the Library
            1. C.2.3.1 XESetCloseDisplay
            2. C.2.3.2 XESetCreateGC
            3. C.2.3.3 XESetCopyGC
            4. C.2.3.4 XESetFreeGC
            5. C.2.3.5 XESetCreateFont
            6. C.2.3.6 XESetFreeFont
          4. C.2.4 Defining New Events and Errors
            1. C.2.4.1 XESetWireToEvent
            2. C.2.4.2 _XSetLastRequestRead
            3. C.2.4.3 XESetEventToWire
            4. C.2.4.4 XESetWireToError
            5. C.2.4.5 XESetError
            6. C.2.4.6 XESetErrorString
            7. C.2.4.7 XESetPrintErrorValues
            8. C.2.4.8 XESetFlushGC
          5. C.2.5 Hooks onto Xlib Data Structures
            1. C.2.5.1 XEHeadOfExtensionList
            2. C.2.5.2 XAddToExtensionList
            3. C.2.5.3 XFindOnExtensionList
            4. C.2.5.4 XAllocID
        3. C.3 GC Caching
        4. C.4 Graphics Batching
        5. C.5 Writing Extension Stubs
          1. C.5.1 Requests, Replies, and Xproto.h
          2. C.5.2 Request Format
          3. C.5.3 Starting to Write a Stub Routine
          4. C.5.4 Locking Data Structures
          5. C.5.5 Sending the Protocol Request and Arguments
          6. C.5.6 Variable Length Arguments
          7. C.5.7 Replies
            1. C.5.7.1 _XRead16
            2. C.5.7.2 _XRead32
            3. C.5.7.3 _XRead16Pad
            4. C.5.7.4 _XReadPad
          8. C.5.8 Synchronous Calling
          9. C.5.9 Allocating and Deallocating Memory
          10. C.5.10 Portability Considerations
          11. C.5.11 Deriving the Correct Extension Opcode
      21. D. The basecalc Application
      22. E. Event Reference
        1. E.1 Meaning of Common Structure Elements
          1. ButtonPress,ButtonRelease
          2. CirculateNotify
          3. CirculateRequest
          4. ClientMessage
          5. ColormapNotify
          6. ConfigureNotify
          7. ConfigureRequest
          8. CreateNotify
          9. DestroyNotify
          10. EnterNotify,LeaveNotify
          11. Expose
          12. FocusIn,FocusOut
          13. GraphicsExpose,NoExpose
          14. GravityNotify
          15. KeymapNotify
          16. KeyPress,KeyRelease
          17. MapNotify,UnmapNotify
          18. MappingNotify
          19. MapRequest
          20. MotionNotify
          21. PropertyNotify
          22. ReparentNotify
          23. ResizeRequest
          24. SelectionClear
          25. SelectionNotify
          26. SelectionRequest
          27. VisibilityNotify
      23. F. The Xmu Library
        1. F.1 Atom Functions
        2. F.2 Error Handler Functions
        3. F.3 System Utility Functions
        4. F.4 Window Utility Functions
        5. F.5 Cursor Utility Functions
        6. F.6 Color Utilities
        7. F.7 Pixmap Utilities
        8. F.8 Graphics Functions
        9. F.9 Selection Functions
        10. F.10 Character Set Functions
        11. F.11 Compound Text Functions
        12. F.12 CloseDisplay Hook Functions
        13. F.13 Display Queue Functions
        14. F.14 Standard Colormap Functions
      24. G. Sources of Additional Information
        1. G.1 Getting the X Software
          1. G.1.1 Bug Fixes
            1. G.1.1.1 Notes
            2. G.1.1.2 Fairness
        2. G.2 Netnews
        3. G.3 Training, Consulting, and Support
        4. G.4 The X Consortium
        5. G.5 Finding Out for Yourself
      25. H. Release Notes
        1. H.1 Changes from Release 4 to Release 5
          1. H.1.1 Internationalization
          2. H.1.2 X Color Management System
          3. H.1.3 Resource Management
          4. H.1.4 Scalable Font Support
        2. H.2 Miscellaneous Xlib Changes
        3. H.3 Changes from Release 3 to Release 4
          1. H.3.1 New Routines
          2. H.3.2 Existing Interface Changes
            1. H.3.2.1 XOpenDisplay()
            2. H.3.2.2 Error Handlers
            3. H.3.2.3 Nonstandard Keysyms
            4. H.3.2.4 XReadBitmapFile()
            5. H.3.2.5 Resource Specification Syntax
            6. H.3.2.6 XrmParseCommand()
            7. H.3.2.7 Keyboard Groups
      26. Glossary
      27. References
      28. Index

    Product information

    • Title: XLIB Programming Manual, Rel. 5, Third Edition
    • Author(s): Adrian Nye
    • Release date: June 1994
    • Publisher(s): O'Reilly Media, Inc.
    • ISBN: 9781565920026