2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
9 #include <aros/debug.h>
10 #include <cybergraphx/cybergraphics.h>
11 #include <graphics/view.h>
13 #include <proto/oop.h>
14 #include <proto/utility.h>
16 #include "cybergraphics_intern.h"
17 #include "gfxfuncsupport.h"
19 /*****************************************************************************
22 #include <proto/cybergraphics.h>
25 AROS_LH2(void, CVideoCtrlTagList
,
28 AROS_LHA(struct ViewPort
*, vp
, A0
),
29 AROS_LHA(struct TagItem
*, tags
, A1
),
32 struct Library
*, CyberGfxBase
, 27, Cybergraphics
)
35 Controls video output. It currently only allows adjustment of
36 power-saving modes, using the following tag:
37 SETVC_DPMSLevel (IPTR) - one of the following DPMS levels:
38 DPMS_ON - normal operation.
39 DPMS_STANDBY - less than 80% power usage.
40 DPMS_SUSPEND - less than 30W power usage.
41 DPMS_OFF - less than 8W power usage.
44 vp - a ViewPort belonging to the video output device to be controlled.
45 tags - a taglist containing video control options.
60 *****************************************************************************/
64 struct TagItem
*tag
, *tstate
;
66 OOP_Object
*gfxhidd
= NULL
;
68 struct TagItem htags
[] =
70 { aHidd_Gfx_DPMSLevel
, 0UL },
74 BOOL dpms_found
= FALSE
;
76 HIDDT_DPMSLevel hdpms
= 0;
78 for (tstate
= tags
; (tag
= NextTagItem(&tstate
)); )
83 dpmslevel
= tag
->ti_Data
;
88 D(bug("!!! UNKNOWN TAG IN CVideoCtrlTagList(): %x !!!\n"
94 } /* for (each tagitem) */
100 /* Convert to hidd dpms level */
104 hdpms
= vHidd_Gfx_DPMSLevel_On
;
108 hdpms
= vHidd_Gfx_DPMSLevel_Standby
;
112 hdpms
= vHidd_Gfx_DPMSLevel_Suspend
;
116 hdpms
= vHidd_Gfx_DPMSLevel_Off
;
120 D(bug("!!! UNKNOWN DPMS LEVEL IN CVideoCtrlTagList(): %x !!!\n"
131 htags
[0].ti_Data
= hdpms
;
135 htags
[0].ti_Tag
= TAG_IGNORE
;
138 OOP_GetAttr(HIDD_BM_OBJ(vp
->RasInfo
->BitMap
), aHidd_BitMap_GfxHidd
, (IPTR
*)&gfxhidd
);
140 OOP_SetAttrs(gfxhidd
, htags
);
143 } /* CVideoCtrlTagList */