Re: XForms: pixmaps and screens

From: Steve Lamont (
Date: Fri May 12 2000 - 23:34:58 EDT

  • Next message: Nicolas Castagne: "XForms: "Double Slider""

    # To subscribers of the xforms list from (Steve Lamont) :

    > It went BOOM at the XpmReadFileToPixmap:
    > status = XpmReadFileToPixmap(FL_FormDisplay(theinimage),
    > FL_ObjWin(canvas),
    > "tmp.xpm",
    > &pxmap,
    > NULL,
    > NULL);

    How did it go "BOOM?" Core dump? X error? Xpm error? You may need
    to set the XpmAttributes argument -- especially if the Canvas Window
    is not the same depth or some other Visual attribute as the root.
    This is just a guess, though. It's also possible that the Canvas's
    Window doesn't exist at the time that you call XpmReadFileToPixmap().
    Canvases are kind of strange in that they don't get completely
    intialized right away. This is probably especially true if they're
    children of a FormBrowser, since FormBrowser implements itself using a

    > The second argument to this Xpm function is a Drawable. In alot of
    > the examples I see from the Xpm turorial, I see this in its place:
    > XRootWindowOfScreen(XtScreen(w)) where w is a widget. (Please, no
    > laughing) I used FL_ObjWin(canvas).
    > 1 What's the XForms equivalent for this second argument?

    That should be okay.

    > 2 Xpm question: Do I need to do a XCreatePixmap before I
    > XpmReadFileToPixmap. The examples I see say no.

    No, you don't.

    > 3 Can I expect the 'flimage to pixmap' functions to be public
    > relatively soon? Months?

    I believe it is in the current distribution as flimage_to_pixmap().
    Check your header file. If not, ping TC for a version update for your

    > 4 Does anyone else find X programming a bit difficult to grasp for
    > the first 2 years? ;-)

    You're faster than me -- I'm still not sure I understand it.

    IMHO, the whole implementation of Colormaps, Visuals, etc, is a giant
    kluge. They could have wrapped some of that stuff a little better.

    I suppose I can't criticize too much, since X was developed about 15
    or more years ago, when processors and graphics environments were
    vastly different. When did X10 come out? Heck, when did Project
    Athena start?

    > Have to hand it to you T.C. XForms does make life a hell of alot easier.

    Indeed. And don't forget Mark Overmars, who started it all for us
    poor, struggling IRIS GL programmers over 10 years ago.

    To unsubscribe, send the message "unsubscribe" to or see
    XForms Home Page:
    List Archive:

    This archive was generated by hypermail 2b29 : Fri May 12 2000 - 23:40:47 EDT