~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/Xm/tw_info.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2 **/
  3 #include <tina/sys.h>
  4 #include <tina/sysfuncs.h>
  5 #include <tina/math.h>
  6 #include <tina/tv.h>
  7 #include  <tina/mtw.h>
  8 #include  <tina/tv_screen.h>
  9 #include <tina/Xmfuncs.h>
 10 
 11 void    tw_info(void)
 12 {
 13     Display *display;
 14     Visual *visual;
 15     int     screen, depth, class;
 16 
 17     display = tw_get_display();
 18     screen = DefaultScreen(display);
 19     depth = DefaultDepth(display, screen);
 20     visual = DefaultVisual(display, screen);
 21     class = visual->class;
 22 
 23     if (depth == 1)
 24         format("depth = %d\n1-plane monochrome display\n", depth);
 25     else
 26     {
 27         format("depth = %d\n", depth);
 28         format("Default visual class: ");
 29         switch (class)
 30         {
 31         case PseudoColor:
 32             format("Multi-plane colour display\n");
 33             break;
 34         case GrayScale:
 35             format("Multi-plane monochrome display\n");
 36             break;
 37         case DirectColor:
 38             format("Direct colour display\n");
 39             break;
 40         case TrueColor:
 41             format("True colour display\n");
 42             break;
 43         }
 44     }
 45     if (depth != 8 || class != PseudoColor)
 46     {
 47         int     result;
 48         XVisualInfo info;
 49 
 50         result = XMatchVisualInfo(display, screen, 8, PseudoColor, &info);
 51         if (result)
 52             format("but depth = 8 colour display available\n");
 53         else
 54             format("and depth = 8 colour display unavailable\n");
 55     }
 56 }
 57 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.