# include "Ximage.h"

int main (int argc, char **argv) {

  Graphic graphic;
  Layout  layout;
  
  args (&argc, argv);

  bzero (&graphic, sizeof(Graphic));
  bzero (&layout, sizeof(Layout));

  if (USE_XWINDOW) SetUpDisplay (&graphic, &argc, argv);
  if (USE_XWINDOW) {
    SetUpWindow (&graphic, &argc, argv);
  } else {
    graphic.x = 10;
    graphic.y = 10;
    graphic.dx = 512 + 2*PAD1 + PAD1 + ZOOM_X;
    graphic.dy = 512 + 2*PAD1 + PAD2 + COLORPAD;
  }

  DefineLayout (&layout, &graphic, argc, argv);
  EventLoop (&graphic, &layout);

  if (USE_XWINDOW) CloseDisplay (&graphic);
  exit (0);
}

