Disable unsupported 'Shutdown' button for pc-i386 and m68k-amiga archs.
[AROS.git] / test / getcybermapattr.c
blob2058c7a52e4fa9b1346d8739fd36f4953d225c6b
1 #include <cybergraphx/cybergraphics.h>
3 #include <proto/intuition.h>
4 #include <proto/cybergraphics.h>
6 #include <stdio.h>
7 #include <string.h>
9 #define NUM_PIXFMT 14
11 static char *pixfmt_str[14]=
13 "LUT8",
14 "RGB15",
15 "BGR15",
16 "RGB15PC",
17 "BGR15PC",
18 "RGB16",
19 "BGR16",
20 "RGB16PC",
21 "BGR16PC",
22 "RGB24",
23 "BGR24",
24 "ARGB32",
25 "BGRA32",
26 "RGBA32"
29 int main(void)
31 struct Screen *scr = IntuitionBase->ActiveScreen;
33 if (scr)
35 struct BitMap *bm = scr->RastPort.BitMap;
36 LONG pixfmt;
38 pixfmt = GetCyberMapAttr(bm, CYBRMATTR_PIXFMT);
40 printf("Pixel Format: #%ld (%s)\n",
41 (long)pixfmt,
42 ((pixfmt >= 0) && (pixfmt < NUM_PIXFMT)) ? pixfmt_str[pixfmt] : "<unknown>");
46 return 0;