Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!pyramid!leadsv!practic!vlsisj!bennett From: bennett@vlsisj.VLSI.COM (Michael Bennett) Newsgroups: comp.sys.apollo Subject: David Letterman's top ten list of Apollo questions. Message-ID: <15210@vlsisj.VLSI.COM> Date: 17 Feb 89 02:05:13 GMT Reply-To: bennett@vlsisj.UUCP (Michael Bennett) Organization: VLSI Technology Inc., San Jose, CA Lines: 105 Does anyone know how to: 1) Create a window from a 'C' program that can NOT be resized by the user? I have a window that must be a fixed size, but currently the user can "grow" it and things get messed up. 2) Create a window whose size includes the legend and border? It seems that when I use: window.left = 100; window.top = 100; window.width = 100; window.height = 100; pad_$create_window("", (unsigned short) 0, pad_$transcript, window_no, window, ios_id, status); the window specified is really the interior of the window. The exterior of the window that I get is l=96, t=76,b=204,r=204. These numbers are different on different machines. I think that is because the size of the fonts used on those machines is different, so the legend changes size. 3) Access the node id with a 'C' procedure? The closest I found was in /usr/include/apollo/osinfo.h osinfo_$node_type which seems to give the model and number of cpus. 4) Place cursor on a named window using the Display Manager (DM)? 5) Determine the contents of the DM search buffer, preferably using DM commands. Or, how about from a shell script. 6) Query (all DM) windows info from 'C' program? 7) Get a the name of the process a 'C' program or shell script is running in from that program or shell script? 8) Use the DM mark stack to do anything useful? i.e. How in heck does that #!&$% mark stack work? 9) Get the parameters (baseline, line height, etc) for a fixed pitch font? The method I use now is show below. It seems to work for f5x9 but not for f9x15. static gpr_$string_t text = "A"; gpr_$offset_t size; gpr_$offset_t start; short int pitch; gpr_$inq_text_extent(text, (short int) 1, size, status); check_status; gpr_$move((short int) 0, (short int) 0, status); check_status; gpr_$inq_text_offset(text, (short int) 1, start, pitch, status); check_status; font_info.font_size = size.y_size; font_info.pitch = pitch; font_info.leading = 2; font_info.line_height = size.y_size + font_info.leading; font_info.margin = pitch; font_info.base_line = size.y_size - start.y_size; x | jjjjjj | jjjjjj | x +----------------+----------------+ --- --- x | | x |- margin -| leading | x | | x +----------------|----------------+ --- | x | | hh | | | x | | hh | | | x | jj | hh | | | x | jj | hh | | | x <-border | | hh | fontsize lineheight x | jj | hhhhhhh | | | x | jj | hh hh | | | x | jj | hh hh | | | x | jj | hh hh | | | x | jj | hh hh | | | x | jj | hh hh | | --- | x | jj | | | | | x | jj | | | | | x | jj jj | | | baseline | x | jj jj | | | | | x | jjjjjj | | | | | x o----------------|----------------+ --- --- --- ^ origin |----- pitch ----| 10) Who cuts David Letterman's hair? Thanks! -- Michael Bennett (408) 434-7851 (W) vlsisj!bennett@decwrl.dec.com bennett@vlsisj.uucp {amdcad,hplabs,pyramid,sun,ucbvax}!decwrl!vlsisj!bennett