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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
|
diff -rc gv-3.7.4/configure gv-xft-3.7.4/configure
*** gv-3.7.4/configure 2013-03-17 12:20:09.000000000 +0100
--- gv-xft-3.7.4/configure 2014-05-02 14:22:59.879439785 +0200
***************
*** 13604,13616 ****
true
fi
! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawInitializeWidgetSet in -lXaw3d" >&5
! $as_echo_n "checking for XawInitializeWidgetSet in -lXaw3d... " >&6; }
if test "${ac_cv_lib_Xaw3d_XawInitializeWidgetSet+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
! LIBS="-lXaw3d $X_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
--- 13604,13616 ----
true
fi
! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawInitializeWidgetSet in -l$XAW3DLIB" >&5
! $as_echo_n "checking for XawInitializeWidgetSet in -l$XAW3DLIB ... " >&6; }
if test "${ac_cv_lib_Xaw3d_XawInitializeWidgetSet+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
! LIBS="-l$XAW3DLIB $X_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
***************
*** 13645,13651 ****
#define HAVE_LIBXAW3D 1
_ACEOF
! LIBS="-lXaw3d $LIBS"
else
as_fn_error "Unable to find a valid Xaw3d library. Please install it and rerun configure." "$LINENO" 5
--- 13645,13651 ----
#define HAVE_LIBXAW3D 1
_ACEOF
! LIBS="-l$XAW3DLIB $LIBS"
else
as_fn_error "Unable to find a valid Xaw3d library. Please install it and rerun configure." "$LINENO" 5
Seulement dans gv-xft-3.7.4: debian
diff -rc gv-3.7.4/src/FileSel.c gv-xft-3.7.4/src/FileSel.c
*** gv-3.7.4/src/FileSel.c 2012-04-01 16:43:24.000000000 +0200
--- gv-xft-3.7.4/src/FileSel.c 2014-05-02 18:09:53.530875424 +0200
***************
*** 1853,1859 ****
SET_Arg(XtNallowMarks, False);
SET_Arg(XtNjustify, XtJustifyLeft);
*listP = ADD_Widget_Arg("list",vlistWidgetClass,*aaaP);
-
ENDMESSAGE(CreateList)
}
--- 1853,1858 ----
diff -rc gv-3.7.4/src/main.c gv-xft-3.7.4/src/main.c
*** gv-3.7.4/src/main.c 2012-04-01 16:43:24.000000000 +0200
--- gv-xft-3.7.4/src/main.c 2014-05-02 20:26:04.052136882 +0200
***************
*** 62,67 ****
--- 62,70 ----
#include INC_XAW(Scrollbar.h)
#include INC_XAW(XawInit.h)
#include INC_XMU(Editres.h)
+ #ifdef HAVE_XAW3DXFT
+ #include <X11/Xaw3dxft/Xaw3dXft.h>
+ #endif
#ifdef HAVE_LIBXINERAMA
#include INC_EXT(Xinerama.h)
#endif
***************
*** 323,328 ****
--- 326,348 ----
int main(int argc, char *argv[])
{
+ #ifdef HAVE_XAW3DXFT
+ XftInitFtLibrary();
+ Xaw3dXftSetDefaultFontName("Liberation-10");
+ Xaw3dXftSetHilitColor("#332211");
+ Xaw3dXftSetInsensitiveTwist("#a00000");
+ Xaw3dXftMenuSpacing = 0;
+ Xaw3dXftEncoding = -1;
+ Xaw3dXftStringHilight = 0;
+ Xaw3dXftStringUsePixmap = 0;
+ Xaw3dXftNoHilitReverse = 1;
+ Xaw3dXftButtonInverse = 0;
+ Xaw3dXftButtonDashed = 1;
+ Xaw3dXftShowTips = 1;
+ Xaw3dXftTextBgHilight = 1;
+ Xaw3dXftTextBgHilightColor = 0x332211;
+ #endif
+
MAINBEGINMESSAGE(main)
gv_safe_gs_workdir = GV_LIBDIR "/safe-gs-workdir";
gv_safe_gs_tempdir = 0;
Seulement dans gv-xft-3.7.4/src: main.c~
diff -rc gv-3.7.4/src/misc_private.c gv-xft-3.7.4/src/misc_private.c
*** gv-3.7.4/src/misc_private.c 2012-03-29 18:03:49.000000000 +0200
--- gv-xft-3.7.4/src/misc_private.c 2014-05-02 15:52:46.514612158 +0200
***************
*** 44,49 ****
--- 44,52 ----
#include INC_XAW(Cardinals.h)
#include INC_X11(IntrinsicP.h)
#include INC_XAW(LabelP.h)
+ #ifdef HAVE_XAW3DXFT
+ #include <X11/Xaw3dxft/Xaw3dXft.h>
+ #endif
#include "GhostviewP.h"
#include "types.h"
***************
*** 111,119 ****
--- 114,127 ----
#ifdef HAVE_XAW3D_INTERNATIONAL
if( vw->simple.international == True ) {
+ #ifdef HAVE_XAW3DXFT
+ Xaw3dXftDrawString(widget, Xaw3dXftDefaultFont,
+ x, y, text, (int)(strlen(text)));
+ #else
XmbDrawString(XtDisplay(widget), XtWindow(widget),
w->label.fontset, w->label.normal_GC,
x, y, text, (int)(strlen(text)));
+ #endif
} else {
#endif
if (w->label.encoding) {
***************
*** 121,129 ****
--- 129,142 ----
w->label.normal_GC,
x, y,(XChar2b*)text, (int)(strlen(text)));
} else {
+ #ifdef HAVE_XAW3DXFT
+ Xaw3dXftDrawString(widget, Xaw3dXftDefaultFont,
+ x, y, text, (int)(strlen(text)));
+ #else
XDrawString(XtDisplay(widget), XtWindow(widget),
w->label.normal_GC,
x, y, text, (int)(strlen(text)));
+ #endif
}
#ifdef HAVE_XAW3D_INTERNATIONAL
}
diff -rc gv-3.7.4/src/paths.h gv-xft-3.7.4/src/paths.h
*** gv-3.7.4/src/paths.h 2012-04-01 16:43:24.000000000 +0200
--- gv-xft-3.7.4/src/paths.h 2014-05-02 12:19:02.351201784 +0200
***************
*** 37,48 ****
--- 37,56 ----
#if HAVE_GCC_VERSION(2,95)
#define INC_X11(aaa) <X11/aaa>
#define INC_XMU(aaa) <X11/Xmu/aaa>
+ #ifdef HAVE_XAW3DXFT
+ #define INC_XAW(aaa) <X11/Xaw3dxft/aaa>
+ #else
#define INC_XAW(aaa) <X11/Xaw3d/aaa>
+ #endif
#define INC_EXT(aaa) <X11/extensions/aaa>
#else
#define INC_X11(aaa) <X11/##aaa##>
#define INC_XMU(aaa) <X11/Xmu/##aaa##>
+ #ifdef HAVE_XAW3DXFT
+ #define INC_XAW(aaa) <X11/Xaw3dxft/##aaa##>
+ #else
#define INC_XAW(aaa) <X11/Xaw3d/##aaa##>
+ #endif
#define INC_EXT(aaa) <X11/extensions/##aaa##>
#endif
diff -rc gv-3.7.4/src/Vlist.c gv-xft-3.7.4/src/Vlist.c
*** gv-3.7.4/src/Vlist.c 2012-04-01 16:43:24.000000000 +0200
--- gv-xft-3.7.4/src/Vlist.c 2014-05-02 18:31:38.121917171 +0200
***************
*** 49,55 ****
#include "VlistP.h"
#include "Frame.h"
#include INC_XMU(Converters.h)
!
#define VLIST_MARK_LEFT_INDENT 4
#define VLIST_MARK_LABEL_INTERNAL_WIDTH 11
#define VLIST_MARK_LABEL_INDENT 4
--- 49,57 ----
#include "VlistP.h"
#include "Frame.h"
#include INC_XMU(Converters.h)
! #ifdef HAVE_XAW3DXFT
! #include <X11/Xaw3dxft/Xaw3dXft.h>
! #endif
#define VLIST_MARK_LEFT_INDENT 4
#define VLIST_MARK_LABEL_INTERNAL_WIDTH 11
#define VLIST_MARK_LABEL_INDENT 4
***************
*** 214,230 ****
--- 216,243 ----
values.graphics_exposures = False;
vw->vlist.background_GC = XtGetGC((Widget)vw,(unsigned) GCForeground | GCGraphicsExposures,&values);
+ Dimension merde;
/* TODO: check if this works here in international mode, or if it has
* to be moved to Realize... */
#ifdef HAVE_XAW3D_INTERNATIONAL
if( vw->simple.international == True ) {
+ #ifdef HAVE_XAW3DXFT
+ vw->vlist.yofs = Xaw3dXftDefaultFont->ascent + 1;
+ vw->vlist.ydelta = Xaw3dXftDefaultFont->ascent + Xaw3dXftDefaultFont->descent;
+ #else
XFontSetExtents *ext = XExtentsOfFontSet(vw->label.fontset);
vw->vlist.yofs = (ext->max_ink_extent.y<0)?-ext->max_ink_extent.y:ext->max_ink_extent.y;
vw->vlist.ydelta = ext->max_ink_extent.height;
+ #endif
} else {
#endif
+ #ifdef HAVE_XAW3DXFT
+ vw->vlist.yofs = Xaw3dXftDefaultFont->ascent + 1;
+ vw->vlist.ydelta = Xaw3dXftDefaultFont->ascent + Xaw3dXftDefaultFont->descent;
+ #else
vw->vlist.yofs = vw->label.font->max_bounds.ascent;
vw->vlist.ydelta = vw->label.font->max_bounds.ascent + vw->label.font->max_bounds.descent;
+ #endif
#ifdef HAVE_XAW3D_INTERNATIONAL
}
#endif
***************
*** 339,353 ****
--- 352,380 ----
len = strlen(s);
#ifdef HAVE_XAW3D_INTERNATIONAL
if( vw->simple.international == True )
+ #ifdef HAVE_XAW3DXFT
+ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
+ vw->label.label_x,
+ vw->label.label_y + yofs + entry*ydelta,
+ s, len);
+ #else
XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset,
vw->label.normal_GC,
vw->label.label_x, vw->label.label_y + yofs + entry*ydelta,
s, len);
+ #endif
else
#endif
+ #ifdef HAVE_XAW3DXFT
+ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
+ vw->label.label_x,
+ vw->label.label_y + yofs + entry*ydelta,
+ s, len);
+ #else
XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC,
vw->label.label_x, vw->label.label_y + yofs + entry*ydelta,
s, len);
+ #endif
}
ENDMESSAGE1(PaintEntryString)
}
***************
*** 404,416 ****
if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
if (erase) {
INFMESSAGE(clearing entry)
! XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.background_GC,x,y,width,height);
} else {
INFMESSAGE(drawing entry)
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),gc,x,y,width,height);
FrameDrawFrame(w,x,y,width,height,ss,sw,
vw->threeD.top_shadow_GC,
vw->threeD.bot_shadow_GC);
}
ret=1;
}
--- 431,453 ----
if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
if (erase) {
INFMESSAGE(clearing entry)
! #ifndef HAVE_XAW3DXFT
! XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.background_GC,x,y,width,height);
! #else
! XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.background_GC,x,y-1,width,height+2);
! #endif
} else {
INFMESSAGE(drawing entry)
+ #ifndef HAVE_XAW3DXFT
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),gc,x,y,width,height);
FrameDrawFrame(w,x,y,width,height,ss,sw,
vw->threeD.top_shadow_GC,
vw->threeD.bot_shadow_GC);
+ #else
+ FrameDrawFrame(w,x,y-1,width,height+2,ss,sw,
+ vw->threeD.top_shadow_GC,
+ vw->threeD.bot_shadow_GC);
+ #endif
}
ret=1;
}
***************
*** 491,505 ****
if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
if (paint) {
INFMESSAGE(drawing mark)
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.mark_background_GC,x,y,width,height);
FrameDrawFrame(w,x,y,width,height,ss,vw->vlist.mark_shadow_width,
vw->threeD.top_shadow_GC,
vw->threeD.bot_shadow_GC);
} else {
INFMESSAGE(clearing mark)
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
(entry == vw->vlist.highlighted) ? vw->vlist.highlighted_background_GC : vw->vlist.background_GC,
! x,y,width,height);
}
}
}
--- 528,552 ----
if (region == NULL || XRectInRegion(region,x,y,width,height) != RectangleOut) {
if (paint) {
INFMESSAGE(drawing mark)
+ #ifndef HAVE_XAW3DXFT
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),vw->vlist.mark_background_GC,x,y,width,height);
FrameDrawFrame(w,x,y,width,height,ss,vw->vlist.mark_shadow_width,
vw->threeD.top_shadow_GC,
vw->threeD.bot_shadow_GC);
+ #else
+ FrameDrawFrame(w,x,y-1,width,height+2,ss,vw->vlist.mark_shadow_width,
+ vw->threeD.top_shadow_GC,
+ vw->threeD.bot_shadow_GC);
+ #endif
} else {
INFMESSAGE(clearing mark)
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
(entry == vw->vlist.highlighted) ? vw->vlist.highlighted_background_GC : vw->vlist.background_GC,
! #ifndef HAVE_XAW3DXFT
! x,y,width,height);
! #else
! x,y-1,width,height+2);
! #endif
}
}
}
***************
*** 589,600 ****
--- 636,657 ----
if (y + (vw->vlist.ydelta - vw->vlist.yofs) >= rectangle.y) {
#ifdef HAVE_XAW3D_INTERNATIONAL
if( vw->simple.international == True )
+ #ifdef HAVE_XAW3DXFT
+ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
+ vw->label.label_x, y, s, len);
+ #else
XmbDrawString(XtDisplay(w), XtWindow(w), vw->label.fontset,
vw->label.normal_GC, vw->label.label_x, y, s, len);
+ #endif
else
#endif
+ #ifdef HAVE_XAW3DXFT
+ Xaw3dXftDrawString(w, Xaw3dXftDefaultFont,
+ vw->label.label_x, y, s, len);
+ #else
XDrawString(XtDisplay(w), XtWindow(w), vw->label.normal_GC,
vw->label.label_x, y, s, len);
+ #endif
}
if (nl)
s = nl + 1;
***************
*** 955,961 ****
int entriesvisible = -1;
if (vw->vlist.ydelta > 0) {
! entriesvisible = height/vw->vlist.ydelta;
}
#if 0
printf("fitting %d entries of height %d in %d",
--- 1012,1018 ----
int entriesvisible = -1;
if (vw->vlist.ydelta > 0) {
! entriesvisible = height/(vw->vlist.ydelta);
}
#if 0
printf("fitting %d entries of height %d in %d",
***************
*** 968,974 ****
--- 1025,1036 ----
entriesvisible,(int)(vw->vlist.entries),
entriesvisible/(float)(vw->vlist.entries));
#endif
+ #ifdef HAVE_XAW3DXFT
+ percent = 0.8 * entriesvisible/(float)(vw->vlist.entries);
+ #else
percent = entriesvisible/(float)(vw->vlist.entries);
+ #endif
+ if (percent>1.0) percent = 1.0;
INFMESSAGE(VlistVisibleLength)
IIMESSAGE(entriesvisible,vw->vlist.entries)
FMESSAGE(percent)
|