xmem.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <X11/Intrinsic.h>
#include <X11/Xatom.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/Xaw/Cardinals.h>
#include <X11/Xaw/Label.h>
#include <X11/Xaw/Paned.h>
#include <X11/Xmu/SysUtil.h>
#include "UnitStripChart.h"
#include "xmem.h"
#include "xmem.bit"

Include dependency graph for xmem.c:

Go to the source code of this file.

Defines

#define Offset(field)   (XtOffsetOf(XMemResources, field))

Functions

static void quit (Widget w, XEvent *event, String *params, Cardinal *num_params)
static void usage (void)
int main (int argc, char **argv)

Variables

char * ProgramName
static XrmOptionDescRec options []
static XtResource my_resources []
XMemResources xmem_resources
static XtActionsRec xmem_actions []
static Atom wm_delete_window


Define Documentation

#define Offset field   )     (XtOffsetOf(XMemResources, field))
 

Definition at line 88 of file xmem.c.


Function Documentation

int main int  argc,
char **  argv
 

Definition at line 142 of file xmem.c.

References GetMemPoint(), InitMemPoint(), my_resources, options, ProgramName, unitStripChartWidgetClass, usage(), wm_delete_window, xmem_actions, XtNgetValue, XtNlabel, and XtNunits.

Here is the call graph for this function:

static void quit Widget  w,
XEvent *  event,
String *  params,
Cardinal *  num_params
[static]
 

Definition at line 241 of file xmem.c.

References wm_delete_window.

static void usage void   )  [static]
 

Definition at line 108 of file xmem.c.

References ProgramName.


Variable Documentation

XtResource my_resources[] [static]
 

Initial value:

 {
        {"showLabel", XtCBoolean, XtRBoolean, sizeof(Boolean),
                Offset(show_label), XtRImmediate, (XtPointer) TRUE},
}

Definition at line 90 of file xmem.c.

XrmOptionDescRec options[] [static]
 

Initial value:

 {
        {"-scale",      "*mem.minScale",   XrmoptionSepArg, NULL},
        {"-update",     "*mem.update",     XrmoptionSepArg, NULL},
        {"-hl",         "*mem.highlight",  XrmoptionSepArg, NULL},
        {"-highlight",  "*mem.highlight",  XrmoptionSepArg, NULL},
        {"-label",      "*label.label",    XrmoptionSepArg, NULL},
        {"-nolabel",    "*showLabel",      XrmoptionNoArg,  "False"},
        {"-showlabel",  "*showLabel",      XrmoptionNoArg,  "True"},
        {"-jumpscroll", "*mem.jumpScroll", XrmoptionSepArg, NULL},
        {"-watch-total","*memTotal",       XrmoptionSepArg, NULL},
        {"-watch-used", "*memUsed",        XrmoptionSepArg, NULL},
        {"-watch-free", "*memFree",        XrmoptionSepArg, NULL},
        {"-units",      "*mem.units",      XrmoptionSepArg, "B"},
        {"-unit-fn",    "*mem.fontSet",    XrmoptionSepArg, NULL},
}

Definition at line 67 of file xmem.c.

char* ProgramName
 

Definition at line 58 of file xmem.c.

Atom wm_delete_window [static]
 

Definition at line 102 of file xmem.c.

XtActionsRec xmem_actions[] [static]
 

Initial value:

 {
        { "quit",       quit },
}

Definition at line 99 of file xmem.c.

Referenced by main().

XMemResources xmem_resources
 

Definition at line 97 of file xmem.c.


Generated on Mon May 8 16:48:05 2006 for xmonitors by  doxygen 1.4.2