#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include "Surface.h"
#include "surCon.h"

void AtCvtIntToSurface (args, num_args, from, to)
XrmValue *args;
Cardinal *num_args;
XrmValue *from;
XrmValue *to;
{
  static Surface value;
  
  if (*num_args != 0)
    XtErrorMsg("cvtIntToSurface","wrong Parameters","XtToolkitError",
	       "Int to Surface conversion takes no arguments", (int *)NULL,
	       (Cardinal *)NULL);
  
  
  to->size = (unsigned int) sizeof(Surface);
  to->addr = (caddr_t)from->addr;
}

void AtRegisterSurfaceConverter()
{
  static Boolean registered = False;
  
  if (registered == False) {
    XtAddConverter(XtRInt, XtRSurface, AtCvtIntToSurface, NULL, 0);
    registered = True;
  }
}
