/*
 * Compile with
 * gcc -o example-subsurface -g -O0 example-subsurface.c `pkg-config --libs --cflags gtk+-3.0`
 */

#include <gtk/gtk.h>
#include "gdk/gdkwayland.h"
//#include "mozcontainer.h"

gboolean
expose_event_cb(GtkWidget *widget, cairo_t *cr)
{
    gdk_flush();
    return FALSE;
}

int
main (int argc, char *argv[])
{
  GtkWidget *window, *widget;

  gtk_init (NULL, NULL);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
  gtk_window_resize (GTK_WINDOW (window), 100, 100);

//  widget = moz_container_new();
  widget = gtk_drawing_area_new ();
  gtk_container_add(GTK_CONTAINER(window), widget);
  g_signal_connect(G_OBJECT(widget), "draw",
                   G_CALLBACK(expose_event_cb), NULL);


  gtk_widget_show_all (window);
  gtk_widget_show_all (widget);

  gtk_main ();

  return 0;
}

