Skip to content
Basic Graphics Programming With The XCB Library
  1. Introduction
  2. The client and server model of the X window system
  3. GUI programming: the asynchronous model
  4. Basic XCB notions
    1. The X Connection
    2. Requests and replies: the Xlib killers
    3. The Graphics Context
    4. Object handles
    5. Memory allocation for XCB structures
    6. Events
  5. Using XCB-based programs
    1. Installation of XCB
    2. Compiling XCB-based programs
  6. Opening and closing the connection to an X server
  7. Checking basic information about a connection
  8. Creating a basic window - the "hello world" program
  9. Drawing in a window
    1. Allocating a Graphics Context
    2. Changing the attributes of a Graphics Context
    3. Drawing primitives: point, line, box, circle,...
  10. X Events
    1. Registering for event types using event masks
    2. Receiving events: writing the events loop
    3. Expose events
    4. Getting user input
      1. Mouse button press and release events
      2. Mouse movement events
      3. Mouse pointer enter and leave events
      4. The keyboard focus
      5. Keyboard press and release events
    5. X events: a complete example
  11. Handling text and fonts
    1. The Font structure
    2. Opening a Font
    3. Assigning a Font to a Graphic Context
    4. Drawing text in a drawable
    5. Complete example
  12. Windows hierarchy
    1. Root, parent and child windows
    2. Events propagation
  13. Interacting with the window manager
    1. Window properties
    2. Setting the window name and icon name
    3. Setting preferred window size(s)
    4. Setting miscellaneous window manager hints
    5. Setting an application's icon
    6. Obeying the delete-window protocol
  14. Simple window operations
    1. Mapping and unmapping a window
    2. Configuring a window
    3. Moving a window around the screen
    4. Resizing a window
    5. Changing windows stacking order: raise and lower
    6. Iconifying and de-iconifying a window
    7. Getting informations about a window
  15. Using colors to paint the rainbow
    1. Color maps
    2. Allocating and freeing Color Maps
    3. Allocating and freeing a color entry
    4. Drawing with a color
  16. X Bitmaps and Pixmaps
    1. What is a X Bitmap ? An X Pixmap ?
    2. Loading a bitmap from a file
    3. Drawing a bitmap in a window
    4. Creating a pixmap
    5. Drawing a pixmap in a window
    6. Freeing a pixmap
  17. Messing with the mouse cursor
    1. Creating and destroying a mouse cursor
    2. Setting a window's mouse cursor
    3. Complete example
  18. Translation of basic Xlib functions and macros
    1. Members of the Display structure
      1. ConnectionNumber
      2. DefaultScreen
      3. QLength
      4. ScreenCount
      5. ServerVendor
      6. ProtocolVersion
      7. ProtocolRevision
      8. VendorRelease
      9. DisplayString
      10. BitmapUnit
      11. BitmapBitOrder
      12. BitmapPad
      13. ImageByteOrder
    2. ScreenOfDisplay related functions
      1. ScreenOfDisplay
      2. DefaultScreenOfDisplay
      3. RootWindow / RootWindowOfScreen
      4. DefaultRootWindow
      5. DefaultVisual / DefaultVisualOfScreen
      6. DefaultGC / DefaultGCOfScreen
      7. BlackPixel / BlackPixelOfScreen
      8. WhitePixel / WhitePixelOfScreen
      9. DisplayWidth / WidthOfScreen
      10. DisplayHeight / HeightOfScreen
      11. DisplayWidthMM / WidthMMOfScreen
      12. DisplayHeightMM / HeightMMOfScreen
      13. DisplayPlanes / DefaultDepth / DefaultDepthOfScreen / PlanesOfScreen
      14. DefaultColormap / DefaultColormapOfScreen
      15. MinCmapsOfScreen
      16. MaxCmapsOfScreen
      17. DoesSaveUnders
      18. DoesBackingStore
      19. EventMaskOfScreen
    3. Miscellaneaous macros
      1. DisplayOfScreen
      2. DisplayCells / CellsOfScreen