int error = GetMonitorInfo(int what, int monitor, APTR *data, struct hwTagList *tags);
what
parameter to tell your
implementation which information about the monitor hardware the program wants to
have. what
can be one of the following values:
HWGMITYPE_MONITORS:
what
has been set to HWGMITYPE_MONITORS
, your GetMonitorInfo()
implementation must
allocate a list of all available monitors as an array of struct hwMonitorInfo
elements. The list must be terminated by a last struct hwMonitorInfo
element
with all structure members set to zero. Here is what struct hwMonitorInfo
looks like:
struct hwMonitorInfo { int X; // [out] int Y; // [out] int Width; // [out] int Height; // [out] }; |
Hollywood expects the following information in the individual structure members:
X:
Y:
Width:
Height:
All values must be specified in pixels. The pointer to the list of struct hwMonitorInfo
elements must be written to the data
pointer that is passed to GetMonitorInfo()
as parameter 3. Hollywood will call FreeMonitorInfo()
to give you a chance to free the list you've allocated.
The monitor
parameter is ignored if what
is HWGMITYPE_MONITORS
.
HWGMITYPE_VIDEOMODES:
monitor
parameter. Monitors
are counted from 0 which describes the primary monitor. Your GetMonitorInfo()
implementation
must allocate a list of all available video modes for this monitor as an array of
struct hwVideoModeInfo
elements. The list must be terminated by a last
struct hwVideoModeInfo
element with all structure members set to zero. Here
is what struct hwVideoModeInfo
looks like:
struct hwVideoModeInfo { int Width; // [out] int Height; // [out] int Depth; // [out] }; |
Hollywood expects the following information in the individual structure members:
Width:
Height:
Depth:
The pointer to the list of struct hwVideoModeInfo
elements must be written to the data
pointer that is passed to GetMonitorInfo()
as parameter 3. Hollywood will call FreeMonitorInfo()
to give you a chance to free the list you've allocated.
GetMonitorInfo()
is an optional API and must only be implemented if HWSDAFLAGS_MONITORINFO
has been passed to hw_SetDisplayAdapter(). See hw_SetDisplayAdapter for details.
NULL
)