hsgj@batcomputer.tn.cornell.edu (Dan Green) (06/01/87)
In article <...> bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) writes: >Do this in your programs: >[...] >2> When you open a window on the workbench try and open it at least one pixel > down from the top. Better yet, use the Intuition GetScreenData() function > [...] (1.2 function only, Open intuition with version #33) >[...] bryce@cogsci.berkeley.EDU -or- ucbvax!cogsci!bryce I have Kickstart 1.2G1 and I looked in the Infominder stuff and there is no mention at all of the GetScreenData() function under the Intuition library docs. But the intuition.lib included on disk is 33. So either I looked in the wrong place (not uncommon) or I just don't have the docs. Could anyone post or email me on what arguments GetScreenData() requires and what structure ptr it returns? Thanks much, -- Dan Green -- ARPA: hsgj@tcgould.tn.cornell.edu UUCP: ihnp4!cornell!batcomputer!hsgj BITNET: hsgj@cornella
bryce@COGSCI.BERKELEY.EDU.UUCP (06/02/87)
in article <> hsgj@batcomputer.tn.cornell.edu (Dan Green) types: >In article <...> bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) writes: >> Better yet, use the Intuition GetScreenData() function >> >I have Kickstart 1.2G1 and I looked in the Infominder stuff and there is >no mention at all of the GetScreenData() function under the Intuition >library docs. Guess what... a bug in the Infominder format ROM Kernal Manual! The function is described correctly in the autodocs.arc file on the Auto Docs disk. [ For you non-developers, all this stuff refers to the Gamma 1 release that C-A sent to developers just before the release of V1.2. Many people still run this version... ] [ The section of the ROM Kernal Manual that has the unix-like routine summaries was converted to Infominder (tm). A "read-only" demo version of that program was provided. Very nice!! ] [ Since this bug is only in the Infominder format, don't expect a formal bug report, C-A ] The function is also mentioned on page 52 of the 1.2 Enhancer software documentation. >------------- >Could anyone post or email me on what arguments GetScreenData() requires >and what structure ptr it returns? Thanks much, Certainly. C-A should not mind too much, so off I click into a CLI... grind, grind, whir, edit, upload. (Single tasking? Just say *NO!*) ------------------------------- intuition.library/GetScreenData NAME GetScreenData -- Get copy of a screen data structure. SYNOPSIS Success = GetScreenData(Buffer, Size, Type, Screen ) D0 A0 D0 D1 A1 BOOL Success; CPTR Buffer; USHORT Size; USHORT Type; struct Screen *Screen; FUNCTION This function safely copies into the caller's buffer data from a Screen structure Typically, this call will be used to find the size, title bar height, and other values for a standard screen, such as the Workbench screen. To get the data for the Workbench screen, one would call: GetScreenData(buff, sizeof(struct Screen), WBENCHSCREEN, NULL) NOTE: if the requested standard screen is not open, this function will have the effect of opening it. INPUTS Buffer = pointer to a buffer into which data can be copied Size = the size of the buffer provided, in bytes Type = the screen type, as specified in OpenWindow (WBENCHSCREEN, CUSTOMSCREEN, ...) Screen = ignored, unless type is CUSTOMSCREEN, which results only in copying 'size' bytes from 'screen' to 'buffer' RESULT TRUE if successful FALSE if standard screen of Type 'type' could not be opened. BUGS SEE ALSO OpenWindow() SUGGESTED USAGE :-) 1> If you open a custom screen, USE this function to determine the user's *favorite* settings. If a user has a workbench screen that has 64 extra pixels of width and 35 extra rows, it is a safe bet that *your* screen can be that large as well. It is desirable for custom screens to be the same size so that the page forward/back gadgets line up. (Even if the preferences overscan locations where documented, this would provide a more direct way of cloning the workbench.) 2> Some programs that open windows on the Workbench screen that obscure the title bar and prevent dragging or screen depth arrangement. GetScreenData() may be used to determine if, because of PAL or OVERSCAN or INTERLACE there is enough space to avoid hitting the title bar altogether. No matter what the height, leave at least one pixel at the top so the drag bar and front/back gadgets are still accessible (even if not visible). (GetScreenData not needed here) 3> If there is enough extra width some programs that use borderless windows to gain space may wish to reconsider. Other width-compensation features are easy, possible and desirable. 4> Sprite-using programs could realize that some of the low numbered sprites start to disappear with lots of extra overscan pixels added. (Really, this should be part of the GetSprite() function... hello V1.3) The best part of all this is the upward mobility it assures. If a 1280*800 display is is use, your software can auto-magically compensate, with very little extra effort. NOTES See the V1.2 enhancer docs, page 52. Also read the notes on the public GfxBase->NormalDisplayRows field. [For 68000 programmers, NormalDisplayRows(a6)]. This is a V1.2 ONLY function. Open Intuition with revision number 33. ------------- Ack! (NAK,EOT,SOH) |\ /| . {o O} . bryce@cogsci.berkeley.EDU -or- ucbvax!cogsci!bryce ( " ) U BCPL? Just say *NO!*
phillip@cbmvax.UUCP (06/02/87)
in article <1237@batcomputer.tn.cornell.edu>, hsgj@batcomputer.tn.cornell.edu (Dan Green) says: > > > Could anyone post or email me on what arguments GetScreenData() requires > and what structure ptr it returns? Thanks much, Success = GetScreenData(Buffer, Size, Type, Screen ) D0 A0 D0 D1 A1 BOOL Success; /* TRUE == EVERYTHING A_O_K */ CPTR Buffer; USHORT Size; USHORT Type; /* * "Screen" IGNORED IF ( TYPE == WBENCHSCREEN ) * ELSE COPIES "Size" BYTES FROM "Screen" to "Buffer" */ struct Screen *Screen; ---------------------------------------------------- long screendefaults(width,height,modes) SHORT *width, *height; UWORD *modes; { extern LONG GetScreenData(); struct Screen wbscreen; if(!(GetScreenData(&wbscreen,(ULONG)sizeof(struct Screen),WBENCHSCREEN,NULL))) return(FALSE); *width = wbscreen.Width; *height = wbscreen.Height; *modes = wbscreen.ViewPort.Modes; return(TRUE); } -phil ============================================================================== Phillip (Flip) Lindsay - Commodore Business Machines - Amiga Technical Support UUCP: {ihnp4|seismo|caip}!cbmvax!phillip - Phone: (215) 431-9180 No warranty is implied or otherwise given in the form of suggestion or example. Any opinions found here are of my making.
mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) (06/02/87)
In article <8706020759.AA17900@cogsci.berkeley.edu> bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) writes:
< No matter what the height, leave at least one pixel at the top so the
< drag bar and front/back gadgets are still accessible (even if not
< visible). (GetScreenData not needed here)
Bryce has said that often enought that people might begin to think
it's a statement of fact, rather than just his prefered method of
doing things. I feel I ought to point out that some of us *like*
everything to be full-screen, with no "slipped pixel" at the top.
Especially on the workbench screen, where Left-Amiga-M and
Left-Amiga-N are available.
This is the kind of thing one really wants resources for.
<mike
--
How many times do you have to fall Mike Meyer
While people stand there gawking? mwm@berkeley.edu
How many times do you have to fall ucbvax!mwm
Before you end up walking? mwm@ucbjade.BITNET
carolyn@cbmvax.UUCP (06/02/87)
In article <1237@batcomputer.tn.cornell.edu> hsgj@tcgould.tn.cornell.edu.UUCP (Dan Green) writes: > >I have Kickstart 1.2G1 and I looked in the Infominder stuff and there is >no mention at all of the GetScreenData() function under the Intuition >library docs. But the intuition.lib included on disk is 33. So either >I looked in the wrong place (not uncommon) or I just don't have the docs. A few of the functions in the Infominder'd autodocs are missing their Infominder header info causing them to NOT be displayed by name in the Infominder menus. If you can't find a particular function, select the function that alphabetically precedes it and page forward. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
andrew@alberta.UUCP (Andrew Folkins) (10/02/87)
I recently morerow'ed my display, and now I find that I don't know how to have a program determine the size of the screen it's running in. Use GetScreenData(), you say. To which I reply : I'd like to, but what parameters (if any) does it take and what does it return? I know this floated by a few months back, but the article seems to have disappeared from my archives. Can anyone out there be of assistance? Wasn't someone going to post a definitive article on using overscan? A note to the people at C-A, why didn't you include full function headings in the Enhancer, etc. documentation instead of just giving the function name? All that tells us non-developers is that the function exists, but nothing about how to use it. Oh well, one of these days I'll get around to ordering the developer's notes, and maybe find out what I'm doing. -- Andrew Folkins ...ihnp4!alberta!andrew The University of Alberta, Edmonton, Alberta, Canada "Progamming the Amiga : It's not just a job, it's an adventure" :-)
dillon@CORY.BERKELEY.EDU.UUCP (10/04/87)
NAME GetScreenData -- Get copy of a screen data structure. SYNOPSIS Success = GetScreenData(Buffer, Size, Type, Screen ) D0 A0 D0 D1 A1 BOOL Success; CPTR Buffer; USHORT Size; USHORT Type; struct Screen *Screen; Example: GetScreenData(buff, sizeof(struct Screen), WBENCHSCREEN, NULL) where struct Screen *buff = malloc(sizeof(struct Screen)); -Matt