home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1999 March / PCShareware-3-99.iso / IMPLE / DJGPP.RAR / DJGPP2 / XLIB-SR0.ZIP / SRC / XLIBEMU / CRWINDO.C < prev    next >
C/C++ Source or Header  |  1994-02-20  |  761b  |  35 lines

  1. /* $Id: crwindo.c 1.1 1994/02/20 17:51:59 ulrich Exp $ */
  2. /*
  3.  * X library function XCreateSimpleWindow.
  4.  */
  5. #include "Xlibemu.h"
  6.  
  7. Window
  8. XCreateSimpleWindow (Display*        dpy,
  9.              Window        parent,
  10.              int        x,
  11.              int        y,
  12.              unsigned int    width,
  13.              unsigned int    height,
  14.              unsigned int    border_width,
  15.              unsigned long    border,
  16.              unsigned long    background)
  17. {
  18.   int screen;
  19.   XSetWindowAttributes xswa;
  20.  
  21.   if (dpy == None) {
  22.     return None;
  23.   }
  24.  
  25.   screen = DefaultScreen (dpy);
  26.   xswa.border_pixel = border;
  27.   xswa.background_pixel = background;
  28.  
  29.   return XCreateWindow (dpy, parent, x, y, width, height, border_width,
  30.             DisplayPlanes (dpy, screen),
  31.             InputOutput,
  32.             DefaultVisual (dpy, screen),
  33.             CWBorderPixel | CWBackPixel, &xswa);
  34. }
  35.