home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20658 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.8 KB  |  57 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!das.wang.com!wang!news
  3. From: ori@marvin.technion.ac.il (Ori Degani)
  4. Subject: Re: XGetRGBColormap
  5. Organization: Heart of Gold Institute
  6. Date: Thu, 31 Dec 1992 04:00:40 GMT
  7. Message-ID: <1992Dec31.040040.9934@discus.technion.ac.il>
  8. References: <1992Dec31.022155.8911@discus.technion.ac.il>
  9. Sender: news@wang.com
  10. Lines: 45
  11.  
  12. Ori Degani (ori@marvin) wrote:
  13. : Page 225: /XGetRGB/
  14. : if (XGetRGBColoraps (dpy, win, &best_map_info, &no_of_cmaps,
  15. : XA_RGB_BEST_MAP) == 0) {
  16. :     fprintf (stderr, "Error:\n");
  17. :     exit(1);
  18. : }
  19. : Well the error it produces is (I'm using gcc if thats any help)
  20. :     makeImage.c:97: warning: passing arg 3 of `XGetRGBColormaps' from incompatible pointer type
  21.  
  22. : arg 3 is best_map_info, which is declared as:
  23. : (same as page 224)
  24. : XStandardColormap best_map_info;
  25.  
  26. I'm still trying to figure this out.. but what I got till now is that
  27. The books has gotta be wrong, because thats not the parameter you
  28. need to send.
  29. It's looking for 
  30.   XStandardColormap **map_info_return
  31.  
  32. So what I thought I should do is declare
  33.  
  34. XStandardColormap **best_map_info;
  35.  
  36. and call the function with (..., map_info_return, ...);
  37.  
  38. That means that this is not a "best_map_info" but "all_map_infos"
  39. i.e. a vector of map_info's.
  40. So how do I know which one to use?  Just use the first one,
  41. e.g. (*best_map_info)->blue_max, (*best_map_info)->colormap 
  42. ???
  43. This seems very strange...
  44.  
  45. : Ori
  46. : --
  47. :    |  ----      Ori Degani
  48. :    |  |___      ori@eddie.technion.ac.il   (Ship Computer on the HOG)
  49. :    |  |         ori@marvin.technion.ac.il  (Who else) 
  50. :    |  ----      s2973229@techst02.technion.ac.il (Ech..)   
  51.  
  52. --
  53.    |  ----      Ori Degani
  54.    |  |___      ori@eddie.technion.ac.il   (Ship Computer on the HOG)
  55.    |  |         ori@marvin.technion.ac.il  (Who else) 
  56.    |  ----      s2973229@techst02.technion.ac.il (Ech..)   
  57.