home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / x / x11p-13.zip / RCS / do_tilewin.c,v < prev    next >
Text File  |  1989-05-03  |  3KB  |  170 lines

  1. head     2.1;
  2. access   ;
  3. symbols  pre-merge:2.0;
  4. locks    ; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 2.1
  9. date     89.05.03.14.18.08;  author joel;  state Exp;
  10. branches ;
  11. next     2.0;
  12.  
  13. 2.0
  14. date     89.01.31.17.07.37;  author erik;  state Exp;
  15. branches ;
  16. next     1.3;
  17.  
  18. 1.3
  19. date     89.01.31.17.07.37;  author joel;  state Exp;
  20. branches ;
  21. next     1.2;
  22.  
  23. 1.2
  24. date     88.12.31.17.17.29;  author joel;  state Exp;
  25. branches ;
  26. next     1.1;
  27.  
  28. 1.1
  29. date     88.10.13.14.00.50;  author todd;  state Exp;
  30. branches ;
  31. next     ;
  32.  
  33.  
  34. desc
  35. @tiles big window
  36. @
  37.  
  38.  
  39. 2.1
  40. log
  41. @Massive changes, I'm not going to go into details.
  42. @
  43. text
  44. @#include "x11perf.h"
  45. #ifndef VMS
  46. #include <X11/X.h>
  47. #include <X11/Xlib.h>
  48. #else
  49. #include <decw$include/X.h>
  50. #include <decw$include/Xlib.h>
  51. #endif
  52.  
  53. static Window w;
  54. static Window w2;
  55. static Pixmap pix;
  56. static unsigned char back_lsb[] = {0x01, 0x00, 0x00, 0x00,
  57.                    0x00, 0x00, 0x01, 0x00,
  58.                    0x00, 0x01, 0x00, 0x00,
  59.                    0x00, 0x00, 0x00, 0x01};
  60. static XImage    *image;
  61. static GC    gc;
  62.  
  63.  
  64. Bool InitTileWins(d, parms)
  65.     Display *d;
  66.     Parms parms;
  67. {
  68.  
  69.     w = CreatePerfWindow(d, 0, 0, 1024, 864);
  70.     /* Create window */
  71.     w2 = XCreateSimpleWindow(d, w, 2, 1, 1022, 860, 1, fgPixel, bgPixel);
  72.     /* Create tile Pixmap */
  73.     image = XCreateImage(d, DefaultVisual(d, 0), 8, ZPixmap, 0, back_lsb,
  74.     4, 4, 32, 4);
  75.     pix = XCreatePixmap(d, w2, 4, 4, 8);
  76.     gc = XCreateGC(d, root, 0, NULL);
  77.     XPutImage(d, pix, gc, image, 0, 0, 0, 0, 4, 4);
  78.  
  79.     /* set window background tile to be tile */
  80.     XSetWindowBackgroundPixmap(d, w2, pix);
  81.     XSync(d, 0);
  82.     parms->reps = 100;
  83.     parms->objects = 1;
  84.     return True;
  85. }
  86.  
  87. void DoTileWins(d, p)
  88.     Display *d;
  89.     Parms p;
  90. {
  91.     int     x, y, i;
  92.     int     child;
  93.  
  94.     for(i = 0; i < 100; i++)
  95.     {
  96.     XMapWindow(d, w2);
  97.     XFlush(d);
  98.     XUnmapWindow(d, w2);
  99.     XFlush(d);
  100.     }
  101. }
  102.  
  103. void EndTileWins(d, p)
  104.     Display *d;
  105.     Parms p;
  106. {
  107.     XDestroyWindow(d, w2);
  108.     XDestroyImage(image);
  109.     XDestroyWindow(d, w);
  110. }
  111.  
  112. @
  113.  
  114.  
  115. 2.0
  116. log
  117. @version from /usr/src/pmax
  118. @
  119. text
  120. @d21 1
  121. a21 1
  122. void InitTileWins(d, parms)
  123. a31 1
  124.     XSync(d, 0);
  125. a32 1
  126.     XSync(d, 0);
  127. a33 1
  128.     XSync(d, 0);
  129. a34 1
  130.     XSync(d, 0);
  131. d41 1
  132. a41 1
  133.  
  134. @
  135.  
  136.  
  137. 1.3
  138. log
  139. @Added -fg -bg capabilities
  140. @
  141. text
  142. @@
  143.  
  144.  
  145. 1.2
  146. log
  147. @Make compilable on VMS
  148. @
  149. text
  150. @d28 1
  151. a28 2
  152.     w2 = XCreateSimpleWindow(d, w, 2, 1, 1022, 860, 1,
  153.     BlackPixel(d, 0), WhitePixel(d, 0));
  154. a53 2
  155.     int     wp = WhitePixel (d, 0);
  156.     int     bp = BlackPixel (d, 0);
  157. @
  158.  
  159.  
  160. 1.1
  161. log
  162. @Initial revision
  163. @
  164. text
  165. @d2 7
  166. a8 2
  167. #include "X11/X.h"
  168. #include "X11/Xlib.h"
  169. @
  170.