Path: utzoo!utgpu!watserv1!watmath!att!pacbell!pacbell.com!ucsd!dog.ee.lbl.gov!hellgate.utah.edu!cdr.utah.edu!moore From: moore%cdr.utah.edu@cs.utah.edu (Tim Moore) Newsgroups: comp.sys.sgi Subject: Re: SGI's migration to X Message-ID: <1990Aug31.092431.24576@hellgate.utah.edu> Date: 31 Aug 90 15:24:31 GMT References: <208@voodoo.UUCP> <90Aug30.200125edt.682@smoke.cs.toronto.edu> Organization: University of Utah CS Dept Lines: 51 In article slehar@cochlea.bu.edu (Steve Lehar) writes: > >When I complain that XImages must be transmitted pixel by pixel you say... > >||> Not true. You can build and send the entire image in one go. See >||> XPutImage. > >Yes, you can send the image to the screen with XPutImage(), but how do >you get your array of image data INTO the XImage BEFORE you send it to >the screen? XPutPixel() is the only routine provided! > That's what XPutPixel() does. It's a client-side operation; an image resides in the client's memory, so creating it doesn't involve any transactions with the server. There isn't any network traffic until you send the image to the server with XPutImage(). Just because a function has X in its name doesn't mean that it communicates with the server. >And when I complain that I can't specify the X window position from my >code, you say... > >||> Also not true. You can specify where you want the window to go. >||> At the application level, most applications will accept the >||> -geometry option -- at the program level, see XSetWMNormalHints. > >Yes they do, but what about if I am WRITING the application? I can >make my program receive the -geometry flag (or reasonable facsimile) >but what do I DO with that information? When I open my XWindow I use >the call Like the man said, see XSetWMNormalHints. > > win = XCreateWindow(display, RootWindow(display, screen), > xsh.x, xsh.y, xsh.width, xsh.height, > bw, vTemplate.depth, InputOutput, visual, > valuemask, &attrib); > >Note that there is no argument for x and y screen location! How do I >tell this XWindow where to appear? It is true that you can't specify with certainty where your window will end up on the screen. The rationale for this is that your window manager might have a different idea about where the newly created window should go. Hence, you give the window manager "hints". Tim Moore moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore "Ah, youth. Ah, statute of limitations." -John Waters