summaryrefslogtreecommitdiff
path: root/iup/test/sysinfo.c
blob: 2f0d9c03a411c449d62466d24355f1a967452e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include <stdlib.h>
#include <stdio.h>
#include "iup.h"

void SysInfoTest(void)
{
  char* sysver;
  int motif = 0;

  printf("IUP System Info:\n");
  printf("  Version: %s\n", IupVersion());
  printf("  Copyright: %s\n", IUP_COPYRIGHT);
  printf("  Driver: %s\n", IupGetGlobal("DRIVER"));
  printf("  System: %s\n", IupGetGlobal("SYSTEM"));
  printf("  System Version: %s\n\n", IupGetGlobal("SYSTEMVERSION"));
  printf("  System Language: %s\n\n", IupGetGlobal("SYSTEMLANGUAGE"));

  sysver = IupGetGlobal("MOTIFVERSION");
  if (sysver) 
  {
    printf("  Motif Version: %s\n", sysver);
    printf("  Motif Number: %s\n", IupGetGlobal("MOTIFNUMBER"));
    printf("  X Server Vendor: %s\n", IupGetGlobal("XSERVERVENDOR"));
    printf("  X Vendor Release: %s\n\n", IupGetGlobal("XVENDORRELEASE"));
    motif = 1;
  }

  sysver = IupGetGlobal("GTKVERSION");
  if (sysver) 
    printf("  GTK Version: %s\n", sysver);

  printf("  Screen Depth: %s\n", IupGetGlobal("SCREENDEPTH"));
  printf("  Screen Size: %s\n", IupGetGlobal("SCREENSIZE"));
  printf("  Full Screen Size: %s\n", IupGetGlobal("FULLSIZE"));
  printf("  True Color Canvas: %s\n\n", IupGetGlobal("TRUECOLORCANVAS"));

  if (!motif)
  {
    printf("  Virtual Screen: %s\n", IupGetGlobal("VIRTUALSCREEN"));
    printf("  Monitors Info: %s\n", IupGetGlobal("MONITORSINFO"));
  }

  printf("  Computer Name: %s\n", IupGetGlobal("COMPUTERNAME"));
  printf("  User Name: %s\n", IupGetGlobal("USERNAME"));
  printf("  Default Font: %s\n", IupGetGlobal("DEFAULTFONT"));
}


#ifndef BIG_TEST
int main(int argc, char* argv[])
{
  IupOpen(&argc, &argv);

  SysInfoTest();

  IupClose();

  return EXIT_SUCCESS;
}
#endif