summaryrefslogtreecommitdiff
path: root/iup/test/sysinfo.c
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/test/sysinfo.c
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/test/sysinfo.c')
-rwxr-xr-xiup/test/sysinfo.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/iup/test/sysinfo.c b/iup/test/sysinfo.c
new file mode 100755
index 0000000..2f0d9c0
--- /dev/null
+++ b/iup/test/sysinfo.c
@@ -0,0 +1,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