New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / intuition / queryoverscan.c
blobb96290d3819724cdb2ecf847609358ca34dfab98
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <graphics/displayinfo.h>
8 #include <proto/graphics.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/intuition.h>
16 AROS_LH3(LONG, QueryOverscan,
18 /* SYNOPSIS */
19 AROS_LHA(ULONG , displayid, A0),
20 AROS_LHA(struct Rectangle *, rect , A1),
21 AROS_LHA(WORD , oscantype, D0),
23 /* LOCATION */
24 struct IntuitionBase *, IntuitionBase, 79, Intuition)
26 /* FUNCTION
28 INPUTS
30 RESULT
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
40 INTERNALS
42 HISTORY
44 *****************************************************************************/
46 AROS_LIBFUNC_INIT
47 AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
49 struct DimensionInfo diminfo;
50 LONG retval = FALSE;
52 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: displayid 0x%lx rect 0x%lx oscantype 0x%lx\n",
53 displayid,
54 rect,
55 oscantype));
57 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: %ld %ld %ld %ld\n",
58 rect->MinX,
59 rect->MinY,
60 rect->MaxX,
61 rect->MaxY));
62 ASSERT_VALID_PTR(rect);
64 if (GetDisplayInfoData(NULL, (UBYTE *)&diminfo, sizeof(diminfo), DTAG_DIMS, displayid) > 0)
66 retval = TRUE;
68 switch(oscantype)
70 case OSCAN_TEXT:
71 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_TEXT\n"));
72 memcpy(rect,&diminfo.TxtOScan,sizeof(struct Rectangle));
73 break;
75 case OSCAN_STANDARD:
76 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_STANDARD\n"));
77 memcpy(rect,&diminfo.StdOScan,sizeof(struct Rectangle));
78 break;
80 case OSCAN_MAX:
81 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_MAX\n"));
82 memcpy(rect,&diminfo.MaxOScan,sizeof(struct Rectangle));
83 break;
85 case OSCAN_VIDEO:
86 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_VIDEO\n"));
87 memcpy(rect,&diminfo.VideoOScan,sizeof(struct Rectangle));
88 break;
90 default:
91 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_????\n"));
92 /* or should we assume OSCAN_TEXT? */
93 retval = FALSE;
94 break;
96 } /* switch(oscantype) */
98 } /* if (GetDisplayInfoData(NULL, &diminfo, sizeof(diminfo), DTAG_DIMS, displayid) > 0) */
100 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: retval %ld, %ld %ld %ld %ld\n",
101 retval,
102 rect->MinX,
103 rect->MinY,
104 rect->MaxX,
105 rect->MaxY));
107 return retval;
109 AROS_LIBFUNC_EXIT
111 } /* QueryOverscan */