Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!lll-winken!sun-barr!newstop!sun!dmaustin From: dmaustin@vivid.sun.com (Darren Austin - They are laughing AT me, not with me) Newsgroups: comp.windows.x Subject: Re: How to get Canvas from Xv_Window in XView? Message-ID: Date: 17 Aug 90 01:35:58 GMT References: <9039@uhccux.uhcc.Hawaii.Edu> Sender: news@sun.Eng.Sun.COM Organization: Sun Microsystems, Mountain View Lines: 27 In-reply-to: denault@hale.ifa.hawaii.edu's message of 16 Aug 90 22:33:49 GMT In article <9039@uhccux.uhcc.Hawaii.Edu> denault@hale.ifa.hawaii.edu (Tony Denault) writes: Using the XView toolkit, how can I obtain the Canvas from within the event_proc(); I have a procedure to handle events into a canvas. This procedure services 4 Canvases used in my application. The event_proc() parameter are defined as: void event_proc( window, event) Xv_Window window; Event *event; How do I get the Canvas from the Xv_Window data structure? Is their a way? The Xv_Window is the paint window of the canvas, so you can do the follow to get a handle to the canvas that it belongs to: canvas = (Canvas)xv_get(window, CANVAS_PAINT_CANVAS_WINDOW); Cheers, --Darren -- Darren Austin | Enough with safe and sane, XView Technical Staff | It's time for dumb and Sun Microsystems, Mountain View | dangerous! dmaustin@sun.com |