2 * Copyright 2013-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Alexander von Gluck IV <kallisti5@unixzen.com>
10 #include <Application.h>
15 #define M(x) { B_##x, #x }
75 print_supported_overlays()
77 for (int32 i
= 0; i
< sizeof(table
) / sizeof(table
[0]); i
++)
79 uint32 supportFlags
= 0;
81 if (bitmaps_support_space(table
[i
].space
, &supportFlags
)
82 && (supportFlags
& B_BITMAPS_SUPPORT_OVERLAY
))
83 printf("\t%s\n", table
[i
].name
);
91 // BScreen usage requires BApplication for AppServerLink
92 BApplication
app("application/x-vnd.Haiku-screen_info");
94 BScreen
screen(B_MAIN_SCREEN_ID
);
97 screen_id screenIndex
= screen
.ID();
98 accelerant_device_info info
;
100 // At the moment, screen.ID() is always 0;
101 printf("Screen %" B_PRId32
":", screen
.ID().id
);
102 if (screen
.GetDeviceInfo(&info
) != B_OK
) {
103 printf(" unavailable\n");
105 printf(" attached\n");
106 printf(" version: %" B_PRId32
"\n", info
.version
);
107 printf(" name: %s\n", info
.name
);
108 printf(" chipset: %s\n", info
.chipset
);
109 printf(" serial: %s\n", info
.serial_no
);
110 printf(" bitmap overlay colorspaces supported:\n");
111 print_supported_overlays();
113 } while (screen
.SetToNext() == B_OK
);