2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <cybergraphx/cybergraphics.h>
7 #include <intuition/monitorclass.h>
9 #include <proto/alib.h>
10 #include <proto/intuition.h>
14 static STRPTR pfnames
[] =
32 static UBYTE depths
[] = {8, 15, 16, 24, 32, 0};
36 Object
**monitors
, **mon
;
38 monitors
= GetMonitorList(NULL
);
42 printf("Failed to obtain monitors list!\n");
46 for (mon
= monitors
; *mon
; mon
++)
52 GetAttr(MA_MonitorName
, *mon
, (IPTR
*)&name
);
53 GetAttr(MA_DriverName
, *mon
, (IPTR
*)&drvname
);
54 printf("Monitor %p %s %s\n", *mon
, name
, drvname
);
56 printf("Supported pixelformats:\n");
57 GetAttr(MA_PixelFormats
, *mon
, (IPTR
*)&pfs
);
58 for (i
= PIXFMT_LUT8
; i
<= PIXFMT_RGBA32
; i
++)
59 printf(" %7s %s\n", pfnames
[i
], pfs
[i
] ? "yes" : "no");
61 printf("Preferred pixelformats:\n");
62 for (i
= 0; depths
[i
]; i
++)
66 printf(" %2d ", depths
[i
]);
67 DoMethod(*mon
, MM_GetDefaultPixelFormat
, depths
[i
], (IPTR
*)&pf
);
69 if (pf
<= PIXFMT_RGBA32
)
70 printf("%s\n", pfnames
[pf
]);
72 printf("Not supported\n");
74 printf("Unknown (%ld)\n", pf
);
79 FreeMonitorList(monitors
);