home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 3
/
Merciful_Release_3.bin
/
software
/
r
/
reqchangev3.7+keyfile.lha
/
reqchange
/
source
/
BottomBorder.c
Wrap
Text File
|
1995-03-04
|
1KB
|
42 lines
//
// BottomBorder.c
//
// Written by Magnus Holmgren (Date: 20.07.94)
//
// This source is pure public domain.
// You may do anything you want with it.
//
// Try to get the size of the bottom border, even if SysIHack have been
// installed with a different size. If you need to find the size of any
// of the other sysiclass images, it should be easy for you to do
// the needed modifications. Remember that the Workbench usually uses
// the size SYSISIZE_MEDRES (even for a 1:1 aspect screen). You only
// need to change this if you know you open your window on a lowres
// screen.
LONG GetBottomBorderHeight( struct Screen *scr )
{
struct DrawInfo *dri;
APTR obj;
LONG h = 10;
if( dri = GetScreenDrawInfo( scr ) )
{
if( obj = NewObject( NULL, "sysiclass", SYSIA_DrawInfo, dri,
SYSIA_Size, SYSISIZE_MEDRES,
SYSIA_Which, SIZEIMAGE,
TAG_DONE, 0 ) )
{
if( !GetAttr( IA_Height, obj, &h ) )
h = 10; // This check maybe isn't necessary... :)
DisposeObject( obj );
}
FreeScreenDrawInfo( scr, dri );
}
return( h );
}