screeninfo:also print all supported bitmap overlay colorspaces
This commit is contained in:
parent
bd0b62b178
commit
8376bc1bc1
|
@ -12,6 +12,79 @@
|
|||
#include <stdio.h>
|
||||
|
||||
|
||||
#define M(x) { B_##x, #x }
|
||||
|
||||
struct ColorSpace {
|
||||
color_space space;
|
||||
const char* name;
|
||||
};
|
||||
|
||||
ColorSpace table[] =
|
||||
{
|
||||
M(RGB32),
|
||||
M(RGB32),
|
||||
M(RGBA32),
|
||||
M(RGB24),
|
||||
M(RGB16),
|
||||
M(RGB15),
|
||||
M(RGBA15),
|
||||
M(CMAP8),
|
||||
M(GRAY8),
|
||||
M(GRAY1),
|
||||
M(RGB32_BIG),
|
||||
M(RGBA32_BIG),
|
||||
M(RGB24_BIG),
|
||||
M(RGB16_BIG),
|
||||
M(RGB15_BIG),
|
||||
M(RGBA15_BIG),
|
||||
M(YCbCr422),
|
||||
M(YCbCr411),
|
||||
M(YCbCr444),
|
||||
M(YCbCr420),
|
||||
M(YUV422),
|
||||
M(YUV411),
|
||||
M(YUV444),
|
||||
M(YUV420),
|
||||
M(YUV9),
|
||||
M(YUV12),
|
||||
M(UVL24),
|
||||
M(UVL32),
|
||||
M(UVLA32),
|
||||
M(LAB24),
|
||||
M(LAB32),
|
||||
M(LABA32),
|
||||
M(HSI24),
|
||||
M(HSI32),
|
||||
M(HSIA32),
|
||||
M(HSV24),
|
||||
M(HSV32),
|
||||
M(HSVA32),
|
||||
M(HLS24),
|
||||
M(HLS32),
|
||||
M(HLSA32),
|
||||
M(CMY24),
|
||||
M(CMY32),
|
||||
M(CMYA32),
|
||||
M(CMYK32),
|
||||
M(CMYA32),
|
||||
M(CMYK32)
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
print_supported_overlays()
|
||||
{
|
||||
for (int32 i = 0; i < sizeof(table) / sizeof(table[0]); i++)
|
||||
{
|
||||
uint32 supportFlags = 0;
|
||||
|
||||
if (bitmaps_support_space(table[i].space, &supportFlags)
|
||||
&& (supportFlags & B_BITMAPS_SUPPORT_OVERLAY))
|
||||
printf("\t%s\n", table[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
@ -34,6 +107,8 @@ main()
|
|||
printf(" name: %s\n", info.name);
|
||||
printf(" chipset: %s\n", info.chipset);
|
||||
printf(" serial: %s\n", info.serial_no);
|
||||
printf(" bitmap overlay colorspaces supported:\n");
|
||||
print_supported_overlays();
|
||||
}
|
||||
} while (screen.SetToNext() == B_OK);
|
||||
|
||||
|
|
Loading…
Reference in New Issue