1: #include <X/mit-copyright.h>
   2: 
   3: /* $Header: XStoreColor.c,v 10.4 86/02/01 15:40:08 tony Rel $ */
   4: /* Copyright    Massachusetts Institute of Technology    1985	*/
   5: 
   6: #include "XlibInternal.h"
   7: XStoreColor (def)
   8:     register Color *def;
   9: {
  10:     register Display *dpy;
  11:     register XReq *req;
  12:     ColorDef proto_def;
  13:     GetReq (X_StoreColors, 0);
  14:     req->param.s[0] = 1;  /* just one color to store */
  15: 
  16:     /* Color structure in library uses int for pixel,
  17: 	   but protocol's ColorDef wants a short;
  18: 	   thus, data must be copied */
  19: 
  20:         proto_def.pixel = def->pixel;
  21:     proto_def.red = def->red;
  22:     proto_def.green = def->green;
  23:     proto_def.blue = def->blue;
  24: 
  25:     Data (dpy, &proto_def, sizeof (ColorDef));
  26: }

Defined functions

Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 905
Valid CSS Valid XHTML 1.0 Strict