tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / bin / screeninfo.cpp
blob88850ae957333a3743d876293c612f62648db0db
1 /*
2 * Copyright 2013-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Alexander von Gluck IV <kallisti5@unixzen.com>
7 */
10 #include <Application.h>
11 #include <Screen.h>
12 #include <stdio.h>
15 // screen_id currently locked to 1 screen
16 // TODO: This should likely be provided by our API
17 #define MAX_SCREENS 1
20 int
21 main()
23 // BScreen usage requires BApplication for AppServerLink
24 BApplication app("application/x-vnd.Haiku-screen_info");
26 for (int id = 0; id < MAX_SCREENS; id++) {
27 screen_id screenIndex = {id};
28 BScreen screen(screenIndex);
29 accelerant_device_info info;
31 // At the moment, screen.ID() is always 0;
32 printf("Screen %" B_PRId32 ":", screen.ID().id);
33 if (screen.GetDeviceInfo(&info) != B_OK) {
34 printf(" unavailable\n");
35 } else {
36 printf(" attached\n");
37 printf(" version: %u\n", info.version);
38 printf(" name: %s\n", info.name);
39 printf(" chipset: %s\n", info.chipset);
40 printf(" serial: %s\n", info.serial_no);
44 return 0;