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_popups.c,v < prev    next >
Text File  |  1989-05-09  |  2KB  |  153 lines

  1. head     2.2;
  2. access   ;
  3. symbols  pre-merge:2.0;
  4. locks    ; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 2.2
  9. date     89.05.09.17.21.38;  author joel;  state Exp;
  10. branches ;
  11. next     2.1;
  12.  
  13. 2.1
  14. date     89.05.03.14.17.48;  author joel;  state Exp;
  15. branches ;
  16. next     2.0;
  17.  
  18. 2.0
  19. date     89.01.31.17.05.30;  author erik;  state Exp;
  20. branches ;
  21. next     1.2;
  22.  
  23. 1.2
  24. date     89.01.31.17.05.30;  author joel;  state Exp;
  25. branches ;
  26. next     1.1;
  27.  
  28. 1.1
  29. date     88.06.17.17.19.54;  author joel;  state Exp;
  30. branches ;
  31. next     ;
  32.  
  33.  
  34. desc
  35. @@
  36.  
  37.  
  38. 2.2
  39. log
  40. @Merged into do_windows.c awhile back
  41. @
  42. text
  43. @@
  44.  
  45.  
  46. 2.1
  47. log
  48. @Massive changes, I'm not going to go into details.
  49. @
  50. text
  51. @a0 58
  52. #include "x11perf.h"
  53.  
  54. static Window w;
  55. static rows, columns;
  56.  
  57. static void CreateSubs(d)
  58.     Display *d;
  59. {
  60.     int     x, y, i;
  61.     int     child;
  62.  
  63.     child = 0;
  64.     for (x = 0; x < COLS; x++)
  65.     for (y = 0; y < rows; y++) {
  66.         (void) XCreateSimpleWindow (
  67.             d, w, x*20 + 10, y*20 + 10, 10, 10, 0, bgPixel, fgPixel);
  68.         if ((++child) == 200)
  69.             return ;
  70.     }
  71. }
  72.  
  73. Boolean InitPopups(d, p)
  74.     Display *d;
  75.     Parms p;
  76. {
  77.     int i, x, y;
  78.  
  79.     if (p->objects < 50) {
  80.     rows = 1;
  81.     columns = p->objects;
  82.     }
  83.     else {
  84.     columns = COLS;
  85.     rows = p->objects/COLS;
  86.     }
  87.     p->objects = rows * columns;
  88.     CreatePerfStuff(d, 1, WIDTH, HEIGHT, &w, NULL, NULL);
  89.     CreateSubs(d);
  90.     return True;
  91. }
  92.  
  93. void DoPopsUps(d, p)
  94.     Display *d;
  95.     Parms p;
  96. {
  97.     int i;
  98.     Window popup;
  99.  
  100.     popup =  XCreateSimpleWindow (
  101.         d, RootWindow(d, 0), 30, 40, 200, 200, 0, bgPixel, fgPixel);
  102.     for (i = 0; i < p->objects; i++)
  103.     {
  104.         XMapWindow(d, popup);
  105.     XUnmapWindow(d, popup);
  106.     }
  107.     XDestroyWindow(d, popup);        
  108. }
  109.  
  110. @
  111.  
  112.  
  113. 2.0
  114. log
  115. @version from /usr/src/pmax
  116. @
  117. text
  118. @d22 1
  119. a22 1
  120. void InitPopups(d, p)
  121. d39 1
  122. a39 1
  123.  
  124. @
  125.  
  126.  
  127. 1.2
  128. log
  129. @Added -fg -bg capabilities
  130. @
  131. text
  132. @@
  133.  
  134.  
  135. 1.1
  136. log
  137. @Initial revision
  138. @
  139. text
  140. @a10 2
  141.     int     wp = WhitePixel (d, 0);
  142.     int     bp = BlackPixel (d, 0);
  143. d16 1
  144. a16 1
  145.             d, w, x*20 + 10, y*20 + 10, 10, 10, 0, wp, bp);
  146. a45 2
  147.     int     wp = WhitePixel (d, 0);
  148.     int     bp = BlackPixel (d, 0);
  149. d50 1
  150. a50 1
  151.         d, RootWindow(d, 0), 30, 40, 200, 200, 0, wp, bp);
  152. @
  153.