# To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
> I've RTFM (which I should have done before :), found
> fl_set_canvas_visual() and fl_set_canvas_depth() routines but this
> did not help much as it does not seem to work (or, more likely, I do not
> know how to use it). I've written simple test program with a single form
> containing EXIT button and a canvas. Then I put following into test_main.c:
Look at the code in `gl.c', which should be supplied with your XForms
distribution. See specifically the function glx_init() which fiddles
with Visuals. I'm not sure the non-active Visuals in `fl_state[]'
are valid or useful, so you may have to mess with XGetVisualInfo() and
XMatchVisualInfo() directly in Xlib to fish up the Visual of your
choice.
You'd do something roughly like this
XVisualInfo vi;
if ( !XMatchVisualInfo( fl_get_display(),
DefaultScreen( fl_get_display() ),
DEPTH,
CLASS,
&vi ) ) {
/* We lose ... do something to save ourselves */
}
fl_set_canvas_visual( canvas, vi.visual );
fl_set_canvas_depth( canvas, depth );
[...]
spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Wed May 09 2001 - 09:41:29 EDT