root/foundation-apps/grosview-maxx/Xrmcommandline.h

Revision 2, 4.0 KB (checked in by emasson, 3 years ago)

initial import for the community edition

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