added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / intuition / queryoverscan.c
blob92069086de2647669def6b22c4a7bd72e595c1eb
1 /*
2 Copyright © 1995-2007, 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
48 struct DimensionInfo diminfo;
49 LONG retval = FALSE;
51 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: displayid 0x%lx rect 0x%lx oscantype 0x%lx\n",
52 displayid,
53 rect,
54 oscantype));
56 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: %ld %ld %ld %ld\n",
57 rect->MinX,
58 rect->MinY,
59 rect->MaxX,
60 rect->MaxY));
61 ASSERT_VALID_PTR(rect);
63 if (GetDisplayInfoData(NULL, (UBYTE *)&diminfo, sizeof(diminfo), DTAG_DIMS, displayid) > 0)
65 retval = TRUE;
67 switch(oscantype)
69 case OSCAN_TEXT:
70 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_TEXT\n"));
71 memcpy(rect,&diminfo.TxtOScan,sizeof(struct Rectangle));
72 break;
74 case OSCAN_STANDARD:
75 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_STANDARD\n"));
76 memcpy(rect,&diminfo.StdOScan,sizeof(struct Rectangle));
77 break;
79 case OSCAN_MAX:
80 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_MAX\n"));
81 memcpy(rect,&diminfo.MaxOScan,sizeof(struct Rectangle));
82 break;
84 case OSCAN_VIDEO:
85 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_VIDEO\n"));
86 memcpy(rect,&diminfo.VideoOScan,sizeof(struct Rectangle));
87 break;
89 default:
90 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: OSCAN_????\n"));
91 /* or should we assume OSCAN_TEXT? */
92 retval = FALSE;
93 break;
95 } /* switch(oscantype) */
97 } /* if (GetDisplayInfoData(NULL, &diminfo, sizeof(diminfo), DTAG_DIMS, displayid) > 0) */
99 DEBUG_QUERYOVERSCAN(dprintf("LIB_QueryOverscan: retval %ld, %ld %ld %ld %ld\n",
100 retval,
101 rect->MinX,
102 rect->MinY,
103 rect->MaxX,
104 rect->MaxY));
106 return retval;
108 AROS_LIBFUNC_EXIT
110 } /* QueryOverscan */