Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!ulowell!apollo!oj From: oj@apollo.COM (Ellis Oliver Jones) Newsgroups: comp.sys.apollo Subject: Re: some graphic & window questions Message-ID: <42b7343e.d5b2@apollo.COM> Date: 19 Apr 89 01:09:00 GMT References: <662@ztivax.UUCP> Reply-To: oj@apollo.com (Ollie Jones) Organization: Apollo Computer, Chelmsford, MA Lines: 74 In article <662@ztivax.UUCP> has@ztivax.UUCP (Hans-Albert Schneider) writes: >2) The width and height of the window borders seem to depend on > the screen.... The height of the banner at the top of DM windows is determined by the "std" font available on the node when the DM starts up. The "std" font links on my node are: std "f7x13" portrait nodes (old) std.1280bw "f5x9" hi-res mono std.1280color "f7x13.b" all 1280x1024 color nodes std.19l "f5x9" landscape mono, default std.color "f7x13.b" color nodes (1024x800, 1024x1024) These were chosen to give reasonable readability. We did not change them when the new 68Hz/70Hz F-series monitors (DNxx00F, DN10000VS) came along, even though the new monitors are much more readable than the old ones. You can experiment with changing the banner by changing these links and restarting the DM, but BEWARE: If you get the link wrong the DM won't start. You'll have to fix it by accessing the file system from some other node if this happens. >1) When a window is opened (pad_$create_window) and its upper left > corner is specified to be at or near (0,0), it will be smaller > than specified. The amount of pixels it is smaller seems to > depend on the display type. The dimensions of a pad are the outer dimensions. However, the dimensions of a gpr_$direct bitmap inside that pad will (always) be smaller. The exact amount smaller is a function of the banner font...see above. >3) Is there a way to label a (bordered) window? ... Pads are labelled with the file name. You can specify arbitrary file names, but once the pad's open you can't change the banner label. I often create custom-named pads with code like this (ansi C): pad_$create_window( "GPR Test", 8, pad_$transcript, 1, window, &stream_id, &status); This leaves a cruft file named "GPR Test" in my directory. That doesn't worry me, but it might worry you or the users of your software. Sorry, there's no other way that I know of to control the banner label. >4) My refresh procedure is not called when a refresh is needed, > instead, the window remains blank. (The procedure IS called > by gpr_$acquire, as debug shows.) I was told that it would > be called during an event wait for mouse or keyboard input, > but this is not satisfying. gpr_$event_wait does a release/acquire cycle automatically. If you have a refresh procedure it'll get called during the acquire if necessary. The refresh procedure isn't (and can't be) called asynchronously. Why? (1) There's no asynchronous cross-address-space call mechanism. In other words, when the DM or the X server gets a request to change a window size, or turn an icon into a window for example, it can't "call your refresh procedure" directly. Rather it sets a bit in a data structure for your window indicating that gpr_$acquire_display should call the refresh procedure for you next time you acquire the display. (2) You'd have to have the display acquired for your refresh procedure to work in the first place. So, acquire and release the display, or call gpr_$event_wait, and your refresh procedure will get called. Hope this helps. /oj (Speaking for myself, not necessarily for Apollo Computer, Inc. and definitely not yet for the Hewlett-Packard Company.)