#include "EZ.h" 

static void icon_callback(EZ_Widget *i, void *);

main(int argc, char **argv)
{
  EZ_Widget *icon, *tmp;

  EZ_Initialize(argc,argv,0);       /* initialize EZWGL    */
  icon = EZ_CreateIcon();           /* create an icon      */
  EZ_ConfigureWidget(icon,
        EZ_BORDER_TYPE, EZ_BORDER_RAISED, /* raside border */
        EZ_BORDER_WIDTH, 2,               /* 2 pixels wide */
        EZ_ORIENTATION, EZ_VERTICAL,/* to arrange children */
        EZ_X, 5, EZ_Y, 5,              /* initial position */
        0);                           
  EZ_AddWidgetCallBack(icon,EZ_CALLBACK,/* reg. a callback */
		       icon_callback,NULL,0);

  tmp = EZ_CreateNWLabel(icon, NULL); /* a special label   */
  EZ_ConfigureWidget(tmp,             /* labeled by pixmap */
        EZ_PIXMAP_FILE, "xterm.xpm", 0);
  tmp = EZ_CreateNWLabel(icon,    /* another special label */
        "XTerm");
  EZ_DisplayWidget(icon);           /* display the icon    */
  EZ_EventMainLoop();               /* handle mouse inputs */
}

static void icon_callback(EZ_Widget *icon, void *data)
{
  system("xterm  -ls -sb -fn 10x20 -fg white -background DarkOliveGreen4 &");
}

