/* GQuickDraw - quick&dirty graphic library for X11
   Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#include <stdio.h>
#include <assert.h>
#include <pthread.h>
#include <X11/Xlib.h>
#include <libguile.h>
#include <unistd.h>
#include "gquickdraw.h"

void test_gdraw ()
{
  gd_init_screen (640, 480, 1);

  puts ("Initscreen done");
  gd_clear_screen ();
  gd_draw_line (0, 0, 640, 480);
  gd_draw_line (640, 0, 0, 480);

  {
    int i;
    for (i = 0; i < 100; ++i)
      gd_draw_string (rand() % gd_get_width (), 
                      rand() % gd_get_height (), 
                      "Hello World");
  }
  gd_flip_screen ();
  
  while (1) { usleep (10000);  gd_flip_screen (); }
}

int main ()
{
  //scm_init_guile ();
  //init_gdraw ();  
  //scm_shell (0, NULL);

  test_gdraw ();

  return 0;
}

/* EOF */

