The Official GGI Book
This book contains the full documentation for the GGI project.
Table of Contents
Preface
I.
Introduction
1.
What is GGI?
Synopsis
Organisation of the book
2.
GGI Design
The GGI concept of display
What makes GGI so good
Organization of the GGI libraries
II.
User documentation
3.
Installation
Getting GGI
Required packages
Building from sources
4.
Runtime configuration
Environment variables
Configuration files
III.
Developer documentation
5.
Visual management
Introduction on GGI visual
Mode management
Working with visuals
6.
Drawing with GGI
Color, palette and pixel format
Graphic context
Drawing primitives
7.
DirectBuffer
Types of Buffers
Buffer layouts
Accessing the Buffer
8.
Event Management
LibGII layer
Input sources
Event model
Event processing
IV.
API references
I.
LibGII API
giiInit
-- Initialize and uninitialize LibGII
giiMTInit
-- Make LibGII thread-safe
giiPanic
-- Exit LibGII programs for fatal errors
giiOpen
-- Open, join, split and close inputs
giiSetEventMask
-- Set the types of events queued
giiEventPoll
-- wait for and receive events
giiEventSend
-- inject an event into the input
giiQueryDeviceInfo
-- get information about a given GII input source
giiQueryValInfo
-- Get data about valuators
gii_event
-- LibGII event structures
gii_key_event
-- LibGII key events
gii_pmove_event
-- LibGII pointer movement events
gii_pbutton_event
-- LibGII pointer button events
gii_cmd_event
-- LibGII commands and information events
gii_valuator_event
-- LibGII valuator events
gii_expose_event
-- LibGII expose events
II.
LibGGI API
ggiInit
-- Initialize and uninitialize LibGGI
ggiPanic
-- Exit LibGGI programs for fatal errors
ggiOpen
-- Open and close a visual
ggiCheckMode
-- Check or negotiate a text/graphics mode on a visual
ggiSetMode
-- Set or get a mode on a visual
ggiParseMode
-- Parse and print formatted strings specifying LibGGI modes
ggiSetDisplayFrame
-- Set or get the current frame for display, writing and reading
ggiMapColor
-- Convert from ggi_color(s) to ggi_pixel(s) and vice versa
ggiSetPalette
-- Manipulate the palette of a visual
ggiSetColorfulPalette
-- Set a palette with a full range of all colors
ggiSetGamma
-- Manipulate the gamma maps and the gamma correction of a visual
ggiGetPixelFormat
-- Get a structure describing the format of a pixelvalue from a visual
ggiSetGCForeground
-- Set or get the foreground and background colors used in drawing operations in a visual
ggiSetGCClipping
-- Set or get the clipping rectangle for a visual
ggiDrawPixel
-- Draw, put, and get a single pixel from a visual
ggiDrawHLine
-- Draw, put, and get a horizontal line from a visual
ggiDrawVLine
-- Draw, put, and get a vertical line from a visual
ggiDrawBox
-- Draw, put, and get a rectangle from a visual
ggiFillscreen
-- Fills the entire virtual screen
ggiDrawLine
-- Draw a line on a visual
ggiCopyBox
-- Copy a rectangular area
ggiCrossBlit
-- Copy a rectangular area between two visuals
ggiSetOrigin
-- Set and get origin of virtual screen
ggiPutc
-- Draw one or more characters on visual
ggiSetFlags
-- Set or get flags affecting operation on a visual
ggiFlush
-- Flush pending output
ggiResourceAcquire
-- Acquire and release a LibGGI resource
ggiDBGetBuffer
-- Get DirectBuffers from a visual
ggiEventPoll
-- Event management for LibGGI visual
ggiGetInput
-- Functions to translate from GGI visuals to GII input
ggiEventSend
-- Send commands and events to a LibGGI visual
ggiGetc
-- Convenience functions for simplistic keyboard input
ggi_pixelformat
-- LibGGI pixel format description
ggi_directbuffer
-- LibGGI direct buffer structure description
V.
Module references
III.
LibGII Reference
libgii
-- A flexible library for input handling
input-linux-kbd
-- Linux console keyboard input
input-linux-mouse
-- Direct mouse input
input-mouse
-- Read mouse protocol data from file
input-lk201
-- LK201/LK401 keyboard input
input-linux-evdev
-- Linux event interface input
input-tcp
-- TCP event filter input
filter-save
-- Event saver
filter-tcp
-- TCP/IP event repeater
filter-keytrans
-- Generic key event translator
filter-mouse
-- Generic mouse event translator
IV.
LibGGI Reference
libggi
-- A fast, simple, small and flexible user-space graphics library
display-x
-- Displays in an X window
display-dga
-- Display using XFree86-DGA extension
display-aa
-- Display using AAlib
display-fbdev
-- Display using Linux kernel framebuffer devices
display-file
-- Render display into image file
display-directx
-- DirectX (WIN32)
display-glide
-- Display using Glide library
display-memory
-- Display on buffer in main memory
display-svgalib
-- Display fullscreen using SVGAlib
display-vcsa
-- Display using Linux virtual console text device
display-monotext
-- Emulate palettized modes on text-mode visuals
display-multi
-- Duplicate visual operations onto multiple visuals
display-palemu
-- Emulate palettized modes on visuals of other mode schemes
display-tile
-- Divide display into tiles similar to a video wall
display-trueemu
-- Emulate truecolor modes
display-vgl
-- FreeBSD/i386 console display
display-sub
-- Make a child visual that is a window to the parent
VI.
Frequently Asked Questions
9.
GII Frequently Asked Questions
10.
GGI Frequently Asked Questions
List of Tables
1.
Event masks
List of Examples
1-1.
A simple example
4-1.
Setting env on a csh-like shell
4-2.
Setting env on a bash-like shell
5-1.
Opening a visual
1.
Initialize and uninitialize LibGII
1.
An unrecoverable error
1.
Event-polling loop
1.
Input handling for applications expecting absolute pointer position
1.
evExpose
handling skeleton
1.
Initialize and uninitialize LibGGI
1.
An unrecoverable error
1.
Open and closing default visual
2.
Open and closing a memory visual
1.
Try a 320x200x8 mode
1.
Pan from the top to the bottom of the virtual screen
1.
Setting up asynchronous mode
1.
Using DirectBuffers
1.
How to obtain a DirectBuffer
1.
Mapping a symbol
1.
A set of mouse translation rules
1.
Example
GGI_DISPLAY
settings
2.
Example
GGI_INPUT
strings
3.
Examples of
GGI_DEFMODE
strings
Prev
Home
Next
GGI Project Documentation
Preface