home *** CD-ROM | disk | FTP | other *** search
- 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
- From: ori@marvin.technion.ac.il (Ori Degani)
- Newsgroups: fj.mail-lists.x-window
- Subject: Re: XGetRGBColormap
- Message-ID: <1992Dec31.135000.16666@sm.sony.co.jp>
- Date: 31 Dec 92 13:50:00 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: Heart of Gold Institute
- Lines: 51
- Approved: michael@sm.sony.co.jp
-
- Date: Thu, 31 Dec 1992 04:00:40 GMT
- Message-Id: <1992Dec31.040040.9934@discus.technion.ac.il>
- Newsgroups: comp.windows.x
- References: <1992Dec31.022155.8911@discus.technion.ac.il>
- Sender: xpert-request@expo.lcs.mit.edu
-
- Ori Degani (ori@marvin) wrote:
- : Page 225: /XGetRGB/
- : if (XGetRGBColoraps (dpy, win, &best_map_info, &no_of_cmaps,
- : XA_RGB_BEST_MAP) == 0) {
- : fprintf (stderr, "Error:\n");
- : exit(1);
- : }
- : Well the error it produces is (I'm using gcc if thats any help)
- : makeImage.c:97: warning: passing arg 3 of `XGetRGBColormaps' from incompatible pointer type
-
- : arg 3 is best_map_info, which is declared as:
- : (same as page 224)
- : XStandardColormap best_map_info;
-
- I'm still trying to figure this out.. but what I got till now is that
- The books has gotta be wrong, because thats not the parameter you
- need to send.
- It's looking for
- XStandardColormap **map_info_return
-
- So what I thought I should do is declare
-
- XStandardColormap **best_map_info;
-
- and call the function with (..., map_info_return, ...);
-
- That means that this is not a "best_map_info" but "all_map_infos"
- i.e. a vector of map_info's.
- So how do I know which one to use? Just use the first one,
- e.g. (*best_map_info)->blue_max, (*best_map_info)->colormap
- ???
- This seems very strange...
-
- : Ori
- : --
- : | ---- Ori Degani
- : | |___ ori@eddie.technion.ac.il (Ship Computer on the HOG)
- : | | ori@marvin.technion.ac.il (Who else)
- : | ---- s2973229@techst02.technion.ac.il (Ech..)
-
- --
- | ---- Ori Degani
- | |___ ori@eddie.technion.ac.il (Ship Computer on the HOG)
- | | ori@marvin.technion.ac.il (Who else)
- | ---- s2973229@techst02.technion.ac.il (Ech..)
-