EZ(3)

NAME
EZ - introduction to the EZWGL library

SYNOPSIS

The EZ widget and graphics library (EZWGL) is a library of about 400 C functions written on top of Xlib. It is designed for developing graphics user interface under the X window system programming environment.

DESCRIPTION
EZWGL consists of two independent pieces, a widget library and a graphics library. The widget library implements about a dozen or so commonly used widgets, including button, label, frame, entry, text-widget, listbox, slider, notebook, combox, menu, file-selector, list-tree, 3D-canvas and row-column. The widget library also implements a drag-and-drop mechanism. The graphics library implements about 100 OpenGL(TM) like graphics functions and procedures that provides high level support for 3D graphics, including features like zbuffer, double-buffer and lighting.

An EZWGL application consists of following components.

1. Include the one and only header file "EZ.h"

2. Initialize the library by calling EZ_Initialize

3. Create widgets using EZ_CreateWidget

4. Register widget callbacks and event handlers using EZ_AddWidgetCallBack and EZ_AddEventHandler

5. Map widgets by invoking EZ_DisplayWidget on your toplevel widgets

6. Processing events using EZ_EventMainLoop or EZ_ServiceEvents or EZ_WaitAndServiceNextEvent

Here is a simple example that demonstrates these steps.

#include "EZ.h"                     /* the header file      */
extern   void exit();
main(int argc, char **argv)
{
  EZ_Widget *hello;
  EZ_Initialize(argc,argv,0);       /* initialize EZWGL    */
          /* create a button and set its foreground red    */
  hello = EZ_CreateWidget(EZ_WIDGET_NORMAL_BUTTON, NULL,
                          EZ_LABEL_STRING, "Hello World",
                          EZ_FOREGROUND,   "red",
                          0);
  EZ_AddWidgetCallBack(hello,       /* register call back  */
        EZ_CALLBACK, exit, NULL, 0);
  EZ_DisplayWidget(hello);          /* show the button     */
  EZ_EventMainLoop();               /* handle mouse inputs */
}

SEE ALSO
EZ_Initialize(3), EZ_CreateWidget(3), EZ_DisplayWidget(3), EZ_Shutdown(3)