EZWGL consists of two parts, a widget library and a
graphics library. The widget library implements about a twenty or
so commonly used widgets, including button, label,
frame, entry, text-widget, listbox,
slider, notebook, combox, menu,
work-area, spin-button, gradient-bar,
histogram, spread-sheet and 3D-canvas.
The widget library also implements a drag-and-drop
mechanism and a resource management scheme.
The graphics library implements
about 100 OpenGL(TM) like graphics functions 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
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 */
static void doexit(EZ_Widget *w, void *d)
main(int argc, char **argv)
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_AddWidgetCallBack(hello, /* register call back */
EZ_CALLBACK, doexit, NULL, 0);
EZ_DisplayWidget(hello); /* show the button */
EZ_EventMainLoop(); /* handle mouse inputs */