"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/Xrmcommandline.h" (11 Jul 2020, 4451 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Xrmcommandline.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef _Xrmcommandline_h
    2 #define _Xrmcommandline_h
    3 
    4 #include <X11/Xresource.h>
    5 
    6 static XrmOptionDescRec options[] = {
    7 //  For these options, try to use '+' to turn them on, and '-' to turn them
    8 //    off, even though this is different from the usual tradition of -foo
    9 //    turning on 'foo', which is off by default.  At least this way,
   10 //    it is self-consistent, and self-explanatory.
   11 
   12 //  General, X11 resources:
   13 { "-display", "*display", XrmoptionSepArg, (caddr_t) NULL },
   14 { "-font", "*font", XrmoptionSepArg, (caddr_t) NULL },
   15 { "-title", "*title", XrmoptionSepArg, (caddr_t) NULL },
   16 { "-geometry", "*geometry", XrmoptionSepArg, (caddr_t) NULL },
   17 { "-hmargin", "*horizontalMargin", XrmoptionSepArg, (caddr_t) NULL },
   18 { "-vmargin", "*verticalMargin", XrmoptionSepArg, (caddr_t) NULL },
   19 { "-vspacing", "*verticalSpacing", XrmoptionSepArg, (caddr_t) NULL },
   20 
   21 
   22 //  XOSView-specific resources:
   23 { "-labels", "*labels", XrmoptionNoArg, "False" },
   24 { "+labels", "*labels", XrmoptionNoArg, "True" },
   25 { "-captions", "*captions", XrmoptionNoArg, "False" },
   26 { "+captions", "*captions", XrmoptionNoArg, "True" },
   27 { "-usedlabels", "*usedlabels", XrmoptionNoArg, "False" },
   28 { "+usedlabels", "*usedlabels", XrmoptionNoArg, "True" },
   29 { "-samplesPerSec", "*samplesPerSec", XrmoptionSepArg, (caddr_t) NULL },
   30 //  CPU resources
   31 { "-cpu", "*cpu", XrmoptionNoArg, "False" },
   32 { "+cpu", "*cpu", XrmoptionNoArg, "True" },
   33 { "-cpus", "*cpuFormat", XrmoptionNoArg, "single" },
   34 { "+cpus", "*cpuFormat", XrmoptionNoArg, "all" },
   35 // Load resources
   36 { "-load", "*load", XrmoptionNoArg, "False" },
   37 { "+load", "*load", XrmoptionNoArg, "True" },
   38 // Memmeter resources
   39 { "-mem", "*mem", XrmoptionNoArg, "False" },
   40 { "+mem", "*mem", XrmoptionNoArg, "True" },
   41 // Swapmeter resources
   42 { "-swap", "*swap", XrmoptionNoArg, "False" },
   43 { "+swap", "*swap", XrmoptionNoArg, "True" },
   44 // Batterymeter resources
   45 { "-battery", "*battery", XrmoptionNoArg, "False" },
   46 { "+battery", "*battery", XrmoptionNoArg, "True" },
   47 // Wirelessmeter resources
   48 { "-wireless", "*wireless", XrmoptionNoArg, "False" },
   49 { "+wireless", "*wireless", XrmoptionNoArg, "True" },
   50 //  GFX resources
   51 { "-gfx", "*gfx", XrmoptionNoArg, "False" },
   52 { "+gfx", "*gfx", XrmoptionNoArg, "True" },
   53 
   54 // Networkmeter resources
   55 { "-net", "*net", XrmoptionNoArg, "False" },
   56 { "+net", "*net", XrmoptionNoArg, "True" },
   57 //  Previously, network was overloaded to be the bandwidth and the
   58 //  on/off flag.  Now, we have -net for on/off, and networkBandwidth
   59 //  for bandwidth, with the alias networkBW, and network for backwards
   60 //  compatibility.
   61 { "-network", "*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
   62 { "-networkBW", "*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
   63 { "-networkBandwidth", "*netBandwidth", XrmoptionSepArg, (caddr_t) NULL },
   64 
   65 // Page Meter
   66 { "-page", "*page", XrmoptionNoArg, "False" },
   67 { "+page", "*page", XrmoptionNoArg, "True" },
   68 { "-pagespeed", "*pageBandWidth", XrmoptionSepArg, (caddr_t) NULL },
   69 
   70 #if !defined(__hpux__) && !defined(__hpux)
   71 //  Disk Meter Options
   72 { "-disk", "*disk", XrmoptionNoArg, "False" },
   73 { "+disk", "*disk", XrmoptionNoArg, "True" },
   74 #endif
   75 
   76 // Interrupt meter resources  --  all sorts of aliases.
   77 { "-int", "*interrupts", XrmoptionNoArg, "False" },
   78 { "+int", "*interrupts", XrmoptionNoArg, "True" },
   79 { "-ints", "*interrupts", XrmoptionNoArg, "False" },
   80 { "+ints", "*interrupts", XrmoptionNoArg, "True" },
   81 { "-interrupts", "*interrupts", XrmoptionNoArg, "False" },
   82 { "+interrupts", "*interrupts", XrmoptionNoArg, "True" },
   83 
   84 // Intrate meter resources, for platforms that support it.
   85 { "-irqrate", "*irqrate", XrmoptionNoArg, "False" },
   86 { "+irqrate", "*irqrate", XrmoptionNoArg, "True" },
   87 { "-intrate", "*irqrate", XrmoptionNoArg, "False" },
   88 { "+intrate", "*irqrate", XrmoptionNoArg, "True" },
   89 
   90 // lmstemp resources
   91 { "-lmstemp", "*lmstemp", XrmoptionNoArg, "False" },
   92 { "+lmstemp", "*lmstemp", XrmoptionNoArg, "True" },
   93 // coretemp resources
   94 { "-coretemp", "*coretemp", XrmoptionNoArg, "False" },
   95 { "+coretemp", "*coretemp", XrmoptionNoArg, "True" },
   96 // acpitemp resources
   97 { "-acpitemp", "*acpitemp", XrmoptionNoArg, "False" },
   98 { "+acpitemp", "*acpitemp", XrmoptionNoArg, "True" },
   99 
  100 //  Special, catch-all option here --
  101 //    xosview -xrm "*memFreeColor: purple" should work, for example.
  102 { "-xrm", "*xrm", XrmoptionResArg, (caddr_t) NULL },
  103 };
  104 //  This auto-detects changes in the number of options.
  105 static const int NUM_OPTIONS = sizeof(options) / sizeof(options[0]);
  106 
  107 #endif