Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!jumbo!jg From: jg@jumbo.dec.com (Jim Gettys) Newsgroups: comp.windows.x Subject: Re: X11 inconsistency question Message-ID: <1128@jumbo.dec.com> Date: 18 Dec 87 17:07:11 GMT References: <8712180210.AA29937@ATHENA.MIT.EDU> Reply-To: jg@jumbo.UUCP (Jim Gettys) Organization: DEC Systems Research Center, Palo Alto Lines: 43 In article <8712180210.AA29937@ATHENA.MIT.EDU> marshall@software.ORG (Eric Marshall) writes: > > Why is it that the components of the XPoint struct are >shorts, The protocol request sizes for a point are 16 bits/coordinate. Since most machines in use short = 16 bits and the fact that some implementations will use shared memory for transport, I wanted to be able to move XPoint stuctures between client and server without having to reformat every piece of data for most implementations. Same thing goes for other structures used in poly calls. These are the only places in the interface where shorts are used, and is an efficiency hack for very high performance implementations, where converting each coordinate is much too slow. Some hardware can draw points/lines, etc at rediculous speeds. >the x and y values taken as parameters to Xlib calls are >int's, and the height and width taken by Xlib calls are unsigned >ints (especially why unsigned)? Coordinates can certainly be negative; a line can certainly start at -10, -10, for example. In X, height and width can only be unsigned; lint will then be kind enough to find certain kinds of bugs in your program when you attempt to assign signed quantities to the values. >Why is there not a single object >type to reflect the display size? Thanks in advance. I'm not quite sure what you mean here. The screen size is available in the screen structures. > > >Eric Marshall >Software Productivity Consortium >1880 North Campus Commons Drive >Reston, VA 22091 >(703) 391-1838 > >CSNET: marshall@software.org >ARPANET: marshall%software.org@relay.cs.net OR > @relay.cs.net:marshall@software.org