larryo@gtenmc.UUCP (Larry Osterman) (09/21/90)
We are porting our application from Sun's Sunview window manager to the IBM AIX RS6000, running Motif window manager. We are trying to make an object "flash" by modifying the default color map. To make an object "flash", we first change its original color, e.g. green, to dark red. Then we set up a timer of every 1/2 second that calls a function that will change the index color of that dark red color to light red in the default color map. So every object that references that dark red and light red color, will simultaneously have its color toggled, which in turn gives the effect of "flashing". Sun's Sunview window manager would let us modify its color map, so the flashing of every object simultaneously works. But Motif window manager does not allow us to do that. So we're looking for some X lib calls (other than modifying the server source code), or any other way that would let us modify the default color map, and continue to let us modify it even when we switch focus to other windows. By the way, we are using V.I. Corporation's DVtools, but there doesn't seem to be any way to accomplish flashing (other than redrawing the object, which is downright ugly) with DVtools. Please reply by email. I will summarize if demand warrants. -- Larry Osterman / larryo@gtenmc.UUCP / (206) 487-8312
jimf@SABER.COM (09/21/90)
|We are porting our application from Sun's Sunview window manager |to the IBM AIX RS6000, running Motif window manager. We are trying |to make an object "flash" by modifying the default color map. [...] |Sun's Sunview window manager would let us modify its color map, |so the flashing of every object simultaneously works. But Motif |window manager does not allow us to do that. So we're looking for |some X lib calls (other than modifying the server source code), or |any other way that would let us modify the default color map, and |continue to let us modify it even when we switch focus to other |windows. How you would go about this depends on which graphics hardware is installed on your RIOS. It's pretty independent of which window manager you're running. Mine has the SGI-derived graphics board in it. I think this is the board you have since the lower-end board isn't color and only the highest-end RIOS's have the really fast board. The X server doesn't take much advantage of this board except with respect to colormaps. It allows a lot of private colormaps to be used simultaneously (I think up to 16 256-color colormaps) without doing virtual colormap swapping (which is what causes `technicolor' effects). What I would recommend that you do is allocate a private colormap and allocate your color cells read-write. You can then change the colors on the fly and achieve the effect that you want. (You can do this in the default colormap, too, but I'm not sure what the size of the default colormap is -- you should avoid allocating writable cells in it.) Hope this helps, jim frost saber software jimf@saber.com
marbru@auto-trol.UUCP (Martin Brunecky) (09/22/90)
In article <880@gtenmc.UUCP> larryo@gtenmc.UUCP (Larry Osterman) writes: >We are porting our application from Sun's Sunview window manager >to the IBM AIX RS6000, running Motif window manager. We are trying >to make an object "flash" by modifying the default color map. > >To make an object "flash", we first change its original color, >e.g. green, to dark red. Then we set up a timer of every 1/2 second >.... >Sun's Sunview window manager would let us modify its color map, >so the flashing of every object simultaneously works. But Motif >window manager does not allow us to do that. So we're looking for >some X lib calls.... ??? What THIS has to do with the window manager ? Except for the fact that Motif mwm 1.0.x does not deal with WM_COLORMAP_WINDOWS property right (only understands shells, not subwindows), there is nothing in any WM that would prevent changing colormap entries. So down to the toolkit. Assuming that IBM provides a REASONABLE visual by default (not a static xxx), you should be able to alloc writeable color cells, and do whatever pleases you to do with them. If you happen to use Xt and Widgets, you must allocate your color cell explicitly and set it in appropriate resource. If IBM's default cloromap (visual) is some flavor of static, you can still allocate a new colormap, asking for something like pseudo color visual, and do the color changes in there. The only case where you would have to REPAINT your object is if the system ONLY supports DIRECT color, but than again, it's system feature, not Motif. -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky marbru@auto-trol.COM (303) 252-2499 {...}ncar!ico!auto-trol!marbru Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404