/*
 * -- $Header: /cec/src/nestor/servers/R3/shXlib/XCrPixmap.c,v 1.1.1.1
 * 90/04/23 09:54:58 spanachi Exp $
 */

#include "copyright.h"

/* $XConsortium: XCrPixmap.c,v 11.6 88/09/06 16:06:02 jim Exp $ */
/* Copyright    Massachusetts Institute of Technology    1986	 */

/* -- MULTIPLEX Extension -- */

#include "Xlibint.h"

/* -- additional includes -- */
#include "resources.h"

Pixmap
XCreatePixmap (dpy, d, width, height, depth)
  register Display *dpy;
  Drawable d;
  unsigned int width, height, depth;
{
  Pixmap pid;
  register xCreatePixmapReq *req;

  LockDisplay (dpy);
  GetReq (CreatePixmap, req);
  req->drawable = d;
  req->width = width;
  req->height = height;
  req->depth = depth;
  pid = req->pid = XAllocID (dpy);

  /* -- store the new resource if created by the client -- */
  if (XmuXStoreResources (dpy))
    XmuXInsertPixmapInfo (dpy, pid, d, depth);

  UnlockDisplay (dpy);
  SyncHandle ();
  return (pid);
}
