2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <graphics/displayinfo.h>
8 #include <proto/graphics.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
14 #include <proto/intuition.h>
16 AROS_LH3(LONG
, QueryOverscan
,
19 AROS_LHA(ULONG
, displayid
, A0
),
20 AROS_LHA(struct Rectangle
*, rect
, A1
),
21 AROS_LHA(WORD
, oscantype
, D0
),
24 struct IntuitionBase
*, IntuitionBase
, 79, Intuition
)
27 Query overscan dimensions. The resulting rectangle can be used
31 OSCAN_TEXT: completely visible. Left/Top is always 0,0.
32 OSCAN_STANDARD: visible bounds of monitor. Left/Top may be negative.
33 OSCAN_MAX: The largest displayable region.
34 OSCAN_VIDEO: The absolute largest region that the graphics.library
35 can display. This region must be used as-is.
38 displayid - ID to be queried
39 rect - Pointer to struct Rectangle to store result
40 oscantype - OSCAN_TEXT, OSCAN_STANDARD, OSCAN_MAX, OSCAN_VIDEO
43 TRUE - Monitorspec exists
44 FALSE - Monitorspec doesn't exist
56 *****************************************************************************/
60 struct GfxBase
*GfxBase
= GetPrivIBase(IntuitionBase
)->GfxBase
;
61 struct DimensionInfo diminfo
;
64 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: displayid 0x%lx rect 0x%lx oscantype 0x%lx\n",
69 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: %ld %ld %ld %ld\n",
74 ASSERT_VALID_PTR(rect
);
76 if (GetDisplayInfoData(NULL
, (UBYTE
*)&diminfo
, sizeof(diminfo
), DTAG_DIMS
, displayid
) > 0)
83 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_TEXT\n"));
84 memcpy(rect
,&diminfo
.TxtOScan
,sizeof(struct Rectangle
));
88 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_STANDARD\n"));
89 memcpy(rect
,&diminfo
.StdOScan
,sizeof(struct Rectangle
));
93 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_MAX\n"));
94 memcpy(rect
,&diminfo
.MaxOScan
,sizeof(struct Rectangle
));
98 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_VIDEO\n"));
99 memcpy(rect
,&diminfo
.VideoOScan
,sizeof(struct Rectangle
));
103 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_????\n"));
104 /* or should we assume OSCAN_TEXT? */
108 } /* switch(oscantype) */
110 } /* if (GetDisplayInfoData(NULL, &diminfo, sizeof(diminfo), DTAG_DIMS, displayid) > 0) */
112 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: retval %ld, %ld %ld %ld %ld\n",
123 } /* QueryOverscan */