summaryrefslogtreecommitdiff
path: root/graphics/xv/patches/patch-al
blob: fc2194f680ee131e7d79260678701ee03f3f34eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
$NetBSD: patch-al,v 1.1 2001/04/05 13:57:16 wiz Exp $

This patch is based on
http://www.mit.edu/afs/athena/contrib/graphics/src/xv/patches/png/xvpng.diff
It was edited to fit into the NetBSD Packages Collection! - HF

---------------------------------------------------------------------------


--- xv.h.orig	Sun Jun 13 03:41:34 1999
+++ xv.h	Sun Jun 13 03:53:34 1999
@@ -8,8 +8,8 @@
 #include "config.h"
 
 
-#define REVDATE   "Version 3.10a  Rev: 12/29/94"
-#define VERSTR    "3.10a"
+#define REVDATE   "Version 3.10a  Rev: 12/29/94 (PNG patch 1.2)"
+#define VERSTR    "3.10a(PNG)"
 
 /*
  * uncomment the following, and modify for your site, but only if you've
@@ -343,6 +343,10 @@
 #define HAVE_TIFF
 #endif
 
+#ifdef DOPNG
+#define HAVE_PNG
+#endif
+
 #ifdef DOPDS
 #define HAVE_PDS
 #endif
@@ -478,31 +482,38 @@
 #define MACBSIZE 128
 #endif
 
+#ifdef HAVE_PNG
+#define F_PNGINC  1
+#else
+#define F_PNGINC  0
+#endif
+
 #define F_GIF         0
 #define F_JPEG      ( 0 + F_JPGINC)
 #define F_TIFF      ( 0 + F_JPGINC + F_TIFINC)
-#define F_PS        ( 1 + F_JPGINC + F_TIFINC)
-#define F_PBMRAW    ( 2 + F_JPGINC + F_TIFINC)
-#define F_PBMASCII  ( 3 + F_JPGINC + F_TIFINC)
-#define F_XBM       ( 4 + F_JPGINC + F_TIFINC)
-#define F_XPM       ( 5 + F_JPGINC + F_TIFINC)
-#define F_BMP       ( 6 + F_JPGINC + F_TIFINC)
-#define F_SUNRAS    ( 7 + F_JPGINC + F_TIFINC)
-#define F_IRIS      ( 8 + F_JPGINC + F_TIFINC)
-#define F_TARGA     ( 9 + F_JPGINC + F_TIFINC)
-#define F_FITS      (10 + F_JPGINC + F_TIFINC)
-#define F_PM        (11 + F_JPGINC + F_TIFINC)
-#define F_MAG       (12 + F_JPGINC + F_TIFINC)
-#define F_PIC       (13 + F_JPGINC + F_TIFINC)
-#define F_MAKI      (14 + F_JPGINC + F_TIFINC)
-#define F_PI        (15 + F_JPGINC + F_TIFINC)
-#define F_PIC2_SS   (16 + F_JPGINC + F_TIFINC)
-#define F_PIC2_SF   (17 + F_JPGINC + F_TIFINC)
-#define F_PIC2_BM   (18 + F_JPGINC + F_TIFINC)
-#define F_PIC2_BI   (19 + F_JPGINC + F_TIFINC)     /* ----- */
-#define F_DELIM1    (20 + F_JPGINC + F_TIFINC)
-#define F_FILELIST  (21 + F_JPGINC + F_TIFINC)
-#define F_MAXFMTS   (22 + F_JPGINC + F_TIFINC)     /* 16, normally */
+#define F_PNG       ( 0 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PS        ( 1 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PBMRAW    ( 2 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PBMASCII  ( 3 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_XBM       ( 4 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_XPM       ( 5 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_BMP       ( 6 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_SUNRAS    ( 7 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_IRIS      ( 8 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_TARGA     ( 9 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_FITS      (10 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PM        (11 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_MAG       (12 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PIC       (13 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_MAKI      (14 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PI        (15 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PIC2_SS   (16 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PIC2_SF   (17 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PIC2_BM   (18 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_PIC2_BI   (19 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_DELIM1    (20 + F_JPGINC + F_TIFINC + F_PNGINC)   /* ----- */
+#define F_FILELIST  (21 + F_JPGINC + F_TIFINC + F_PNGINC)
+#define F_MAXFMTS   (22 + F_JPGINC + F_TIFINC + F_PNGINC)   /* 25, normally */
 
 
 
@@ -538,6 +549,7 @@
 #define RFT_PI       23
 #define RFT_PIC2     24
 #define RFT_PCD      25
+#define RFT_PNG      26 /* HF: was 20 */
 
 /* definitions for page up/down, arrow up/down list control */
 #define LS_PAGEUP   0
@@ -798,9 +810,10 @@
 typedef struct { Window win;            /* window ID */
 		 int x,y,w,h;           /* window coords in parent */
 		 int active;            /* true if can do anything*/
-		 int min,max;           /* min/max values 'pos' can take */
-		 int val;               /* 'value' of dial */
-		 int page;              /* amt val change on pageup/pagedown */
+		 double min,max;        /* min/max values 'pos' can take */
+		 double val;            /* 'value' of dial */
+                 double inc;            /* amt val change on up/down */
+		 double page;           /* amt val change on pageup/pagedown */
 		 char *title;           /* title for this guage */
 		 char *units;           /* string appended to value */
 		 u_long fg,bg,hi,lo;    /* colors */
@@ -1192,6 +1205,13 @@
 WHERE Window        pcdW;
 WHERE int           pcdUp;       /* is pcdW mapped, or what? */
 
+#ifdef HAVE_PNG
+/* stuff used for 'png' box */
+WHERE Window        pngW;
+WHERE int           pngUp;        /* is pngW mapped, or what? */
+#endif
+
+
 #undef WHERE
 
 
@@ -1506,12 +1526,12 @@
 
 
 /*************************** XVDIAL.C ***************************/
-void DCreate               PARM((DIAL *, Window, int, int, int, int, int, 
-				 int, int, int, u_long, u_long, u_long, 
-				 u_long, char *, char *));
+void DCreate               PARM((DIAL *, Window, int, int, int, int, double, 
+				 double, double, double, double, u_long,
+                                 u_long, u_long, u_long, char *, char *));
 
-void DSetRange             PARM((DIAL *, int, int, int, int));
-void DSetVal               PARM((DIAL *, int));
+void DSetRange             PARM((DIAL *, double,double,double,double,double));
+void DSetVal               PARM((DIAL *, double));
 void DSetActive            PARM((DIAL *, int));
 void DRedraw               PARM((DIAL *));
 int  DTrack                PARM((DIAL *, int, int));
@@ -1653,6 +1673,13 @@
 void  TIFFDialog           PARM((int));
 int   TIFFCheckEvent       PARM((XEvent *));
 void  TIFFSaveParams       PARM((char *, int));
+
+/**************************** XVPNG.C ***************************/
+int  LoadPNG               PARM((char *, PICINFO *));
+void CreatePNGW            PARM((void));
+void PNGDialog             PARM((int));
+int  PNGCheckEvent         PARM((XEvent *));
+void PNGSaveParams         PARM((char *, int));
 
 /**************************** XVPDS.C ***************************/
 int LoadPDS                PARM((char *, PICINFO *));