Building Applications - a Tutorial

Gamma/GTK: Using Gamma™ with GTK, Version 0.9
Prev |  | Next

# Chapter 3. Building Applications - a Tutorial

Here is a tutorial that introduces some of the basic features of Gamma and GTK, such as creating widgets, attaching callbacks, ect.

# 3.1. Create a Window

    #!/usr/cogent/bin/gamma

    /* Example: Make a window.
     * This example loads the Gamma/GTK widget library,
     * creates and displays a blank window, and enters the
     * GTK main processing loop.
     */

    /* Initialize Cogent interprocess communication, which is
     * necessary for using Gamma/GTK.
     */
    init_ipc("a", "aq");

    /* Create a new instance of a GtkWindow object. */
    window = new(GtkWindow);

    /* Show the window. */
    window.show();

    /* Enter the GTK main processing loop. */
    gtk_main();

Prev | Home | Next
GTK_TYPE_`STRUCTURENAME` | Up | Add a Button with a Callback

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.