#include "ui.h"

void simple_init(int x, int y, unsigned width, unsigned height)
{
  xwin_init();
  initapp(0, NULL, x, y, width, height);
}

void init_display(int argc, char ** argv, int x, int y, unsigned width, unsigned height)
{
  xwin_init();
  initapp(argc, argv, x, y, width, height);

}

void draw_rect(int x, int y) {
  XDrawRectangle(theDisplay, theMain, theGC, x, y, 2, 2);
  XFlush(theDisplay);
}  

void draw_point(int x,int y)
{
  XDrawPoint(theDisplay, theMain, theGC, x, y);
  XFlush(theDisplay);
}

    
void clear_display() {
  XClearWindow(theDisplay, theMain);
}


void close_display()
{
  XCloseDisplay(theDisplay);
}