Writing GNOME Applications

John R Sheets


Table of Contents
Preface
Preface
Prerequisites
Conventions
Resources
Acknowledgments
2. The GTK+/GNOME System
GLib
Simple Data Types
Namespaces
Logging
Containers
Other Toys
GDK
The GTK+ Connection
The Thin Wrapper
GDK Events
Drawing Primitives
Reference Counting
GTK+
Widgets
The GTK+ Type System
Object Classes
Object Properties
Signals
GNOME
Core Libraries
Graphics Libraries
Components
Gnome-xml
3. The GNOME Build Environment
The Configuration Script
Running configure
Inside the configure Script
Makefile Variable Substitution
Creating Your Own Configuration
Autoconf
The Configuration Header
Checking for Tools
Checking for Header Files
Custom Checks
Helper Tools
Generating Makefiles
GNU Makefile Standards
Using automake
Automake Variables
Conditional Compiling
Cutting a Distribution
Dealing with Libraries
Libtool Support
libtoolize
A Grumpy Example
Exploring the Results
A Note about Version Numbers
Adding GNOME
GNOME Macros
gnome-config
GNOME Makefile Variables
autogen.sh
Some Grumpy GNOME Examples
10. Graphics
Graphics in the X Window System
Frame Buffers
Color Maps
Visuals
Drawables
Images
The GDK Wrapper
Simpler API
Using Color in GDK
GdkRGB
The RGB Buffer
Drawing Functions
Color Management
Libart
Vector Paths
Bezier Paths
Sorted Vector Paths
Microtile Arrays
Affine Transformations
Pixel Buffers
Gdk-pixbuf
Creating
Rendering
Scaling
Progressive Loading
Autoconf Support
Gdk-pixbuf Application Example
11. The GNOME Canvas
The Canvas
Double-Buffered Drawing Surface
The Canvas Abstraction
Canvas Groups
Events
Coordinate Systems
World Coordinates
Item Coordinates
Canvas Coordinates
Window Coordinates
Using the Canvas
GDK versus AA
The Scrolling Region
Adding Canvas Items
Moving Canvas Items Around
Transformations
Canvas Items
Vector-Based Drawing Items
Line Styles
The Shape of the Item
Widgets in the Canvas
Text Canvas Items
Graphical Canvas Items
Canvas Events
The Event Callback
Clicks and Double Clicks
Mouse Motion
Rollovers
Keyboard Events
Grabbing Items
Dragging and Dropping Canvas Items
A. GNU Free Documentation License
0. PREAMBLE
1. APPLICABILITY AND DEFINITIONS
2. VERBATIM COPYING
3. COPYING IN QUANTITY
4. MODIFICATIONS
5. COMBINING DOCUMENTS
6. COLLECTIONS OF DOCUMENTS
7. AGGREGATION WITH INDEPENDENT WORKS
8. TRANSLATION
9. TERMINATION
10. FUTURE REVISIONS OF THIS LICENSE
Addendum
List of Figures
2-1. Singly and Doubly Linked Lists
2-2. Structure of a Hash Table
2-3. Structure of an N-ary Tree
2-4. The GNOME Dependency Tree
2-5. GDK Event Flow
2-6. Widget Appearances
3-1. Running the configure Script
3-2. Running aclocal
3-3. Four Grumpy Library Cases
10-1. Color Map Example
10-2. Relationships among X Visuals
10-3. Double Buffering with a Pixmap
10-4. RGB Row Strides
10-5. Array of ArtVpath Elements
10-6. Vector Paths of the Letters V and R
10-7. Microtile Arrays
10-8. Rendering an Alpha Channel to a Bitmap
10-9. Scaling Parameters
10-10. Image Composition with testpixbuf-scale
10-11. Screen Shot of Sample Gdk-pixbuf Application
11-1. The test-gnome Application
11-2. Maximizing the Viewing Space
11-3. Bitmaps for Stipple Masks
11-4. Stipple Mask Example
11-5. Arrow Shapes for GnomeCanvasLine Item
11-6. Rectangle and Ellipse Canvas Items with the Same Bounding Box