Creating Buttons

#include <stdio.h>
#include "graphapp.h"

void quit(Control *c)
{
  exit(0);
}

int main(int argc, char *argv[])
{
  App *app;
  Window *w;
  Control *b;

  app = new_app(argc, argv);
  w = new_window(app, rect(0,0,200,150), "Pizza", STANDARD_WINDOW);
  b = new_button(w, rect(10,10,80,30), "Quit", quit);
  show_window(w);
  main_loop(app);
  return 0;
}

Notes: