00001 /* 00002 * Shamelessly ripped and modified from the original sources below: 00003 */ 00004 00005 /* 00006 * $Xorg: StripCharP.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ 00007 */ 00008 00009 00010 /*********************************************************** 00011 00012 Copyright 1987, 1988, 1998 The Open Group 00013 00014 Permission to use, copy, modify, distribute, and sell this software and its 00015 documentation for any purpose is hereby granted without fee, provided that 00016 the above copyright notice appear in all copies and that both that 00017 copyright notice and this permission notice appear in supporting 00018 documentation. 00019 00020 The above copyright notice and this permission notice shall be included in 00021 all copies or substantial portions of the Software. 00022 00023 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00024 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00025 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00026 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00027 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00028 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00029 00030 Except as contained in this notice, the name of The Open Group shall not be 00031 used in advertising or otherwise to promote the sale, use or other dealings 00032 in this Software without prior written authorization from The Open Group. 00033 00034 00035 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 00036 00037 All Rights Reserved 00038 00039 Permission to use, copy, modify, and distribute this software and its 00040 documentation for any purpose and without fee is hereby granted, 00041 provided that the above copyright notice appear in all copies and that 00042 both that copyright notice and this permission notice appear in 00043 supporting documentation, and that the name of Digital not be 00044 used in advertising or publicity pertaining to distribution of the 00045 software without specific, written prior permission. 00046 00047 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 00048 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 00049 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 00050 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 00051 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 00052 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 00053 SOFTWARE. 00054 00055 ******************************************************************/ 00056 /* $XFree86: xc/lib/Xaw/StripCharP.h,v 1.8 2001/12/14 19:54:43 dawes Exp $ */ 00057 00058 #ifndef _XawUnitStripChartP_h 00059 #define _XawUnitStripChartP_h 00060 00061 /* #include <X11/Xaw/StripChart.h> */ 00062 #include "UnitStripChart.h" 00063 #include <X11/Xaw/SimpleP.h> 00064 00065 #define NO_GCS 0 00066 #define FOREGROUND (1 << 0) 00067 #define HIGHLIGHT (1 << 1) 00068 #define BACKGROUND (1 << 2) 00069 #define ALL_GCS (FOREGROUND | HIGHLIGHT | BACKGROUND) 00070 00071 #define NUM_DATA_POINTS 2048 00072 00073 /* new fields for the unitStripChart widget */ 00074 typedef struct { 00075 /* resources */ 00076 Pixel fgpixel; /* color index for graph */ 00077 Pixel hipixel; /* color index for lines */ 00078 Pixel bgpixel; /* color index for lines */ 00079 GC fgGC; /* graphics context for fgpixel */ 00080 GC hiGC; /* graphics context for hipixel */ 00081 GC bgGC; /* graphics context for bgpixel */ 00082 XFontStruct *font; 00083 XFontSet fontset; 00084 char *label; 00085 char *units; 00086 XtJustify justify; 00087 unsigned char encoding; 00088 00089 /* private */ 00090 int update; /* update frequence */ 00091 int scale; /* scale factor */ 00092 int min_scale; /* smallest scale factor */ 00093 int interval; /* data point interval */ 00094 XPoint *points; /* Poly point for repairing graph lines */ 00095 int max_value; /* Max Value in window */ 00096 int valuedata[NUM_DATA_POINTS]; /* record of data points */ 00097 XtIntervalId interval_id; 00098 XtCallbackList get_value; /* proc to call to fetch load pt */ 00099 int jump_val; /* Amount to jump on each scroll */ 00100 #ifndef OLDXAW 00101 XtPointer pad[4]; /* for future use and keep binary compatability */ 00102 #endif 00103 } UnitStripChartPart; 00104 00105 /* instance record declaration */ 00106 typedef struct _UnitStripChartRec { 00107 CorePart core; 00108 SimplePart simple; 00109 UnitStripChartPart unit_strip_chart; 00110 } UnitStripChartRec; 00111 00112 /* new fields for the UnitStripChart widget class record */ 00113 typedef struct { 00114 XtPointer extension; 00115 } UnitStripChartClassPart; 00116 00117 /* class record declaration */ 00118 typedef struct _UnitStripChartClassRec { 00119 CoreClassPart core_class; 00120 SimpleClassPart simple_class; 00121 UnitStripChartClassPart unit_strip_chart_class; 00122 } UnitStripChartClassRec; 00123 00124 extern UnitStripChartClassRec unitStripChartClassRec; 00125 00126 #endif /* _XawUnitStripChartP_h */