home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 19019 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  2.1 KB

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