Check-in [862eb620a0]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add another few Xlib stubs for Win32
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 862eb620a096fddc058479fc9a4b7ba280a425b8
User & Date: chw 2016-11-03 05:27:03
Context
2016-11-03
05:43
many changes to make BLT stubs enabled on Win32 check-in: bd19f95d99 user: chw tags: trunk
05:27
add another few Xlib stubs for Win32 check-in: 862eb620a0 user: chw tags: trunk
2016-11-02
17:49
additional fix for 1-bit SDL surfaces since [9635228669] wasn't enough check-in: 3cb179fd09 user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to jni/sdl2tk/generic/tkInt.decls.
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499































1500
1501
1502
1503
1504
1505
1506
declare 106 win {
    int XFillRectangle(Display *display, Drawable d, GC gc,
	    int x, int y, unsigned int width, unsigned int height)
}

# New in Tk 8.6
declare 107 win {
   int XFlush(Display *display)
}
declare 108 win {
   int XGrabServer(Display *display)
}
declare 109 win {
   int XUngrabServer(Display *display)
}
declare 110 win {
   int XFree(void *data)
}
declare 111 win {
   int XNoOp(Display *display)
}
declare 112 win {
   XAfterFunction XSynchronize(Display *display, Bool onoff)
}
declare 113 win {
   int XSync(Display *display, Bool discard)
}
declare 114 win {
   VisualID XVisualIDFromVisual(Visual *visual)
}

# For tkpath
declare 115 win {
   void *XGetAgg2D(Display *display, Drawable d)
}
declare 116 win {
   void *XCreateAgg2D(Display *display)
}
declare 117 win {
   void XDestroyAgg2D(Display *display, void *agg2d)
}
declare 118 win {
   int XGetFontFile(const char *family, int size, int isBold, int isItalic,
	    const char **nameRet, int *filesizeRet)
}
declare 119 win {
   void *XGetFTStream(const char *pathname, int size)
}

# For tktreectrl
declare 120 win {
   int XOffsetRegion(Region rgn, int dx, int dy)
}
declare 121 win {
   int XUnionRegion(Region srca, Region srcb, Region dr_return)
}

# For 3dcanvas
declare 122 {
   Window XCreateWindow(Display *display, Window parent, int x, int y,
	    unsigned int width, unsigned int height,
	    unsigned int border_width, int depth, unsigned int clazz,
	    Visual *visual, unsigned long value_mask,
	    XSetWindowAttributes *attributes)
}
declare 123 {
   int SdlTkGLXAvailable(Display *display)
}
declare 124 {
   void *SdlTkGLXCreateContext(Display *display, Window w, Tk_Window tkwin)
}
declare 125 {
   SdlTkGLXDestroyContext(Display *display, Window w, void *ctx)
}
declare 126 {
   SdlTkGLXMakeCurrent(Display *display, Window w, void *ctx)
}
declare 127 {
   SdlTkGLXReleaseCurrent(Display *display, Window w, void *ctx)
}
declare 128 {
   SdlTkGLXSwapBuffers(Display *display, Window w)































}

################################
# X functions for Aqua

declare 0 aqua {
    int XSetDashes(Display *display, GC gc, int dash_offset,







|


|


|


|


|


|


|


|




|


|


|


|



|




|


|



|
|





|
|

|
|

|
|

|
|

|
|

|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
declare 106 win {
    int XFillRectangle(Display *display, Drawable d, GC gc,
	    int x, int y, unsigned int width, unsigned int height)
}

# New in Tk 8.6
declare 107 win {
    int XFlush(Display *display)
}
declare 108 win {
    int XGrabServer(Display *display)
}
declare 109 win {
    int XUngrabServer(Display *display)
}
declare 110 win {
    int XFree(void *data)
}
declare 111 win {
    int XNoOp(Display *display)
}
declare 112 win {
    XAfterFunction XSynchronize(Display *display, Bool onoff)
}
declare 113 win {
    int XSync(Display *display, Bool discard)
}
declare 114 win {
    VisualID XVisualIDFromVisual(Visual *visual)
}

# For tkpath
declare 115 win {
    void *XGetAgg2D(Display *display, Drawable d)
}
declare 116 win {
    void *XCreateAgg2D(Display *display)
}
declare 117 win {
    void XDestroyAgg2D(Display *display, void *agg2d)
}
declare 118 win {
    int XGetFontFile(const char *family, int size, int isBold, int isItalic,
	    const char **nameRet, int *filesizeRet)
}
declare 119 win {
    void *XGetFTStream(const char *pathname, int size)
}

# For tktreectrl
declare 120 win {
    int XOffsetRegion(Region rgn, int dx, int dy)
}
declare 121 win {
    int XUnionRegion(Region srca, Region srcb, Region dr_return)
}

# For 3dcanvas
declare 122 win {
    Window XCreateWindow(Display *display, Window parent, int x, int y,
	    unsigned int width, unsigned int height,
	    unsigned int border_width, int depth, unsigned int clazz,
	    Visual *visual, unsigned long value_mask,
	    XSetWindowAttributes *attributes)
}
declare 123 win {
    int SdlTkGLXAvailable(Display *display)
}
declare 124 win {
    void *SdlTkGLXCreateContext(Display *display, Window w, Tk_Window tkwin)
}
declare 125 win {
    void SdlTkGLXDestroyContext(Display *display, Window w, void *ctx)
}
declare 126 win {
    void SdlTkGLXMakeCurrent(Display *display, Window w, void *ctx)
}
declare 127 win {
    void SdlTkGLXReleaseCurrent(Display *display, Window w, void *ctx)
}
declare 128 win {
    void SdlTkGLXSwapBuffers(Display *display, Window w)
}

# Various, e.g. for stub-enabled BLT
declare 129 win {
    int XLowerWindow(Display *d, Window w)
}
declare 130 win {
    int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, int n)
}
declare 131 win {
    int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, int n)
}
declare 132 win {
    int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n)
}
declare 133 win {
    int XDrawSegments(Display *d, Drawable dr, GC gc, XSegment *s, int n)
}
declare 134 win {
    int XDrawPoint(Display *d, Drawable dr, GC gc, int x, int y)
}
declare 135 win {
    int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m)
}
declare 136 win {
    int XReparentWindow(Display *d, Window w, Window p, int x, int y)
}
declare 137 win {
    int XPutImage(Display *d, Drawable dr, GC gc, XImage *im,
	    int sx, int sy, int dx, int dy,
	    unsigned int w, unsigned int h)
}

################################
# X functions for Aqua

declare 0 aqua {
    int XSetDashes(Display *display, GC gc, int dash_offset,
Changes to jni/sdl2tk/generic/tkIntXlibDecls.h.
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
405
406
407



























408
409
410
411
412
413
414
EXTERN void *		XGetFTStream(const char *pathname, int size);
/* 120 */
EXTERN int		XOffsetRegion(Region rgn, int dx, int dy);
/* 121 */
EXTERN int		XUnionRegion(Region srca, Region srcb,
				Region dr_return);
/* 122 */
EXTERN Window		XCreateWindow(Display *display, Window parent,
				int x, int y, unsigned int width,
				unsigned int height, unsigned int border_width,

				int depth, unsigned int clazz,
				Visual *visual, unsigned long value_mask,
				XSetWindowAttributes *attributes);
/* 123 */
EXTERN int		SdlTkGLXAvailable(Display *display);
/* 124 */
EXTERN void *		SdlTkGLXCreateContext(Display *display, Window w,
				struct Tk_Window_ *tkwin);
/* 125 */
EXTERN void		SdlTkGLXDestroyContext(Display *display, Window w,
				void *ctx);
/* 126 */
EXTERN void		SdlTkGLXMakeCurrent(Display *display, Window w,
				void *ctx);
/* 127 */
EXTERN void		SdlTkGLXReleaseCurrent(Display *display, Window w,
				void *ctx);
/* 128 */
EXTERN void		SdlTkGLXSwapBuffers(Display *display, Window w);



























#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
/* 0 */
EXTERN int		XSetDashes(Display *display, GC gc, int dash_offset,
				_Xconst char *dash_list, int n);
/* 1 */
EXTERN XModifierKeymap * XGetModifierMapping(Display *d);







|
|
|
>
|
|

















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
EXTERN void *		XGetFTStream(const char *pathname, int size);
/* 120 */
EXTERN int		XOffsetRegion(Region rgn, int dx, int dy);
/* 121 */
EXTERN int		XUnionRegion(Region srca, Region srcb,
				Region dr_return);
/* 122 */
EXTERN Window		XCreateWindow(Display *display, Window parent, int x,
				int y, unsigned int width,
				unsigned int height,
				unsigned int border_width, int depth,
				unsigned int clazz, Visual *visual,
				unsigned long value_mask,
				XSetWindowAttributes *attributes);
/* 123 */
EXTERN int		SdlTkGLXAvailable(Display *display);
/* 124 */
EXTERN void *		SdlTkGLXCreateContext(Display *display, Window w,
				struct Tk_Window_ *tkwin);
/* 125 */
EXTERN void		SdlTkGLXDestroyContext(Display *display, Window w,
				void *ctx);
/* 126 */
EXTERN void		SdlTkGLXMakeCurrent(Display *display, Window w,
				void *ctx);
/* 127 */
EXTERN void		SdlTkGLXReleaseCurrent(Display *display, Window w,
				void *ctx);
/* 128 */
EXTERN void		SdlTkGLXSwapBuffers(Display *display, Window w);
/* 129 */
EXTERN int		XLowerWindow(Display *d, Window w);
/* 130 */
EXTERN int		XFillArcs(Display *d, Drawable dr, GC gc, XArc *a,
				int n);
/* 131 */
EXTERN int		XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a,
				int n);
/* 132 */
EXTERN int		XDrawRectangles(Display *d, Drawable dr, GC gc,
				XRectangle *r, int n);
/* 133 */
EXTERN int		XDrawSegments(Display *d, Drawable dr, GC gc,
				XSegment *s, int n);
/* 134 */
EXTERN int		XDrawPoint(Display *d, Drawable dr, GC gc, int x,
				int y);
/* 135 */
EXTERN int		XDrawPoints(Display *d, Drawable dr, GC gc,
				XPoint *p, int n, int m);
/* 136 */
EXTERN int		XReparentWindow(Display *d, Window w, Window p,
				int x, int y);
/* 137 */
EXTERN int		XPutImage(Display *d, Drawable dr, GC gc, XImage *im,
				int sx, int sy, int dx, int dy,
				unsigned int w, unsigned int h);
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
/* 0 */
EXTERN int		XSetDashes(Display *display, GC gc, int dash_offset,
				_Xconst char *dash_list, int n);
/* 1 */
EXTERN XModifierKeymap * XGetModifierMapping(Display *d);
801
802
803
804
805
806
807









808
809
810
811
812
813
814
    Window (*xCreateWindow) (Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clazz, Visual *visual, unsigned long value_mask, XSetWindowAttributes *attributes); /* 122 */
    int (*sdlTkGLXAvailable) (Display *display); /* 123 */
    void * (*sdlTkGLXCreateContext) (Display *display, Window w, struct Tk_Window_ *tkwin); /* 124 */
    void (*sdlTkGLXDestroyContext) (Display *display, Window w, void *ctx); /* 125 */
    void (*sdlTkGLXMakeCurrent) (Display *display, Window w, void *ctx); /* 126 */
    void (*sdlTkGLXReleaseCurrent) (Display *display, Window w, void *ctx); /* 127 */
    void (*sdlTkGLXSwapBuffers) (Display *display, Window w); /* 128 */









#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
    int (*xSetDashes) (Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n); /* 0 */
    XModifierKeymap * (*xGetModifierMapping) (Display *d); /* 1 */
    XImage * (*xCreateImage) (Display *d, Visual *v, unsigned int ui1, int i1, int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3, int i4); /* 2 */
    XImage * (*xGetImage) (Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3); /* 3 */
    char * (*xGetAtomName) (Display *d, Atom a); /* 4 */







>
>
>
>
>
>
>
>
>







829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
    Window (*xCreateWindow) (Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clazz, Visual *visual, unsigned long value_mask, XSetWindowAttributes *attributes); /* 122 */
    int (*sdlTkGLXAvailable) (Display *display); /* 123 */
    void * (*sdlTkGLXCreateContext) (Display *display, Window w, struct Tk_Window_ *tkwin); /* 124 */
    void (*sdlTkGLXDestroyContext) (Display *display, Window w, void *ctx); /* 125 */
    void (*sdlTkGLXMakeCurrent) (Display *display, Window w, void *ctx); /* 126 */
    void (*sdlTkGLXReleaseCurrent) (Display *display, Window w, void *ctx); /* 127 */
    void (*sdlTkGLXSwapBuffers) (Display *display, Window w); /* 128 */
    void (*xLowerWindow) (Display *d, Window w); /* 129 */
    void (*xFillArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 130 */
    void (*xDrawArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 131 */
    void (*xDrawRectangles) (Display *d, Drawable dr, GC gc, XRectangle *r, int n); /* 132 */
    void (*xDrawSegments) (Display *d, Drawable dr, GC gc, XSegment *s, int n); /* 133 */
    void (*xDrawPoint) (Display *d, Drawable dr, GC gc, int x, int y); /* 134 */
    void (*xDrawPoints) (Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); /* 135 */
    void (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */
    void (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, int w, int h); /* 137 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
    int (*xSetDashes) (Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n); /* 0 */
    XModifierKeymap * (*xGetModifierMapping) (Display *d); /* 1 */
    XImage * (*xCreateImage) (Display *d, Visual *v, unsigned int ui1, int i1, int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3, int i4); /* 2 */
    XImage * (*xGetImage) (Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3); /* 3 */
    char * (*xGetAtomName) (Display *d, Atom a); /* 4 */
1168
1169
1170
1171
1172
1173
1174


















1175
1176
1177
1178
1179
1180
1181
	(tkIntXlibStubsPtr->sdlTkGLXDestroyContext) /* 125 */
#define SdlTkGLXMakeCurrent \
	(tkIntXlibStubsPtr->sdlTkGLXMakeCurrent) /* 126 */
#define SdlTkGLXReleaseCurrent \
	(tkIntXlibStubsPtr->sdlTkGLXReleaseCurrent) /* 127 */
#define SdlTkGLXSwapBuffers \
	(tkIntXlibStubsPtr->sdlTkGLXSwapBuffers) /* 128 */


















#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
#define XSetDashes \
	(tkIntXlibStubsPtr->xSetDashes) /* 0 */
#define XGetModifierMapping \
	(tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */
#define XCreateImage \







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
	(tkIntXlibStubsPtr->sdlTkGLXDestroyContext) /* 125 */
#define SdlTkGLXMakeCurrent \
	(tkIntXlibStubsPtr->sdlTkGLXMakeCurrent) /* 126 */
#define SdlTkGLXReleaseCurrent \
	(tkIntXlibStubsPtr->sdlTkGLXReleaseCurrent) /* 127 */
#define SdlTkGLXSwapBuffers \
	(tkIntXlibStubsPtr->sdlTkGLXSwapBuffers) /* 128 */
#define XLowerWindow \
	(tkIntXlibStubsPtr->xLowerWindow) /* 129 */
#define XFillArcs \
	(tkIntXlibStubsPtr->xFillArcs) /* 130 */
#define XDrawArcs \
	(tkIntXlibStubsPtr->xDrawArcs) /* 131 */
#define XDrawRectangles \
	(tkIntXlibStubsPtr->xDrawRectangles) /* 132 */
#define XDrawSegments \
	(tkIntXlibStubsPtr->xDrawSegments) /* 133 */
#define XDrawPoint \
	(tkIntXlibStubsPtr->xDrawPoint) /* 134 */
#define XDrawPoints \
	(tkIntXlibStubsPtr->xDrawPoints) /* 135 */
#define XReparentWindow \
	(tkIntXlibStubsPtr->xReparentWindow) /* 136 */
#define XPutImage \
	(tkIntXlibStubsPtr->xPutImage) /* 137 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
#define XSetDashes \
	(tkIntXlibStubsPtr->xSetDashes) /* 0 */
#define XGetModifierMapping \
	(tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */
#define XCreateImage \
Changes to jni/sdl2tk/generic/tkStubInit.c.
755
756
757
758
759
760
761









762
763
764
765
766
767
768
    XCreateWindow, /* 122 */
    SdlTkGLXAvailable, /* 123 */
    SdlTkGLXCreateContext, /* 124 */
    SdlTkGLXDestroyContext, /* 125 */
    SdlTkGLXMakeCurrent, /* 126 */
    SdlTkGLXReleaseCurrent, /* 127 */
    SdlTkGLXSwapBuffers, /* 128 */









#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
    XSetDashes, /* 0 */
    XGetModifierMapping, /* 1 */
    XCreateImage, /* 2 */
    XGetImage, /* 3 */
    XGetAtomName, /* 4 */







>
>
>
>
>
>
>
>
>







755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
    XCreateWindow, /* 122 */
    SdlTkGLXAvailable, /* 123 */
    SdlTkGLXCreateContext, /* 124 */
    SdlTkGLXDestroyContext, /* 125 */
    SdlTkGLXMakeCurrent, /* 126 */
    SdlTkGLXReleaseCurrent, /* 127 */
    SdlTkGLXSwapBuffers, /* 128 */
    XLowerWindow, /* 129 */
    XFillArcs, /* 130 */
    XDrawArcs, /* 131 */
    XDrawRectangles, /* 132 */
    XDrawSegments, /* 133 */
    XDrawPoint, /* 134 */
    XDrawPoints, /* 135 */
    XReparentWindow, /* 136 */
    XPutImage, /* 137 */
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
    XSetDashes, /* 0 */
    XGetModifierMapping, /* 1 */
    XCreateImage, /* 2 */
    XGetImage, /* 3 */
    XGetAtomName, /* 4 */
jni/sdl2tk/unix/configure.in became a regular file.
Changes to jni/sdl2tk/win/tkWinDraw.c.
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
    TkWinReleaseDrawableDC(src, srcDC, &srcState);
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * TkPutImage --
 *
 *	Copies a subimage from an in-memory image to a rectangle of of the
 *	specified drawable.
 *
 * Results:
 *	None.
 *







|







482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
    TkWinReleaseDrawableDC(src, srcDC, &srcState);
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * TkPutImage, XPutImage --
 *
 *	Copies a subimage from an in-memory image to a rectangle of of the
 *	specified drawable.
 *
 * Results:
 *	None.
 *
595
596
597
598
599
600
601















602
603
604
605
606
607
608
    BitBlt(dc, dest_x, dest_y, (int) width, (int) height, dcMem, src_x, src_y,
	    SRCCOPY);
    DeleteObject(SelectObject(dcMem, bitmap));
    DeleteDC(dcMem);
    TkWinReleaseDrawableDC(d, dc, &state);
    return Success;
}
















/*
 *----------------------------------------------------------------------
 *
 * XFillRectangles --
 *
 *	Fill multiple rectangular areas in the given drawable.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
    BitBlt(dc, dest_x, dest_y, (int) width, (int) height, dcMem, src_x, src_y,
	    SRCCOPY);
    DeleteObject(SelectObject(dcMem, bitmap));
    DeleteDC(dcMem);
    TkWinReleaseDrawableDC(d, dc, &state);
    return Success;
}

int
XPutImage(
    Display *display,
    Drawable d,			/* Destination drawable. */
    GC gc,
    XImage *image,		/* Source image. */
    int src_x, int src_y,	/* Offset of subimage. */
    int dest_x, int dest_y,	/* Position of subimage origin in drawable. */
    unsigned int width, unsigned int height)
				/* Dimensions of subimage. */
{
    return TkPutImage(NULL, 0, display, d, gc, image,
		src_x, src_y, dest_x, dest_y, width, height);
}

/*
 *----------------------------------------------------------------------
 *
 * XFillRectangles --
 *
 *	Fill multiple rectangular areas in the given drawable.
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
    TkWinReleaseDrawableDC(d, dc, &state);
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * XDrawRectangle --
 *
 *	Draws a rectangle.
 *
 * Results:
 *	None.
 *
 * Side effects:







|







951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
    TkWinReleaseDrawableDC(d, dc, &state);
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * XDrawRectangle, XDrawRectangles --
 *
 *	Draws a rectangle.
 *
 * Results:
 *	None.
 *
 * Side effects:
981
982
983
984
985
986
987




















988
989
990
991
992
993
994
995
996
997
998
999
    Rectangle(dc, x, y, (int) x+width+1, (int) y+height+1);

    DeleteObject(SelectObject(dc, oldPen));
    SelectObject(dc, oldBrush);
    TkWinReleaseDrawableDC(d, dc, &state);
    return Success;
}





















/*
 *----------------------------------------------------------------------
 *
 * XDrawArc --
 *
 *	Draw an arc.
 *
 * Results:
 *	None.
 *
 * Side effects:







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




|







996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
    Rectangle(dc, x, y, (int) x+width+1, (int) y+height+1);

    DeleteObject(SelectObject(dc, oldPen));
    SelectObject(dc, oldBrush);
    TkWinReleaseDrawableDC(d, dc, &state);
    return Success;
}

int
XDrawRectangles(
    Display *display,
    Drawable d,
    GC gc,
    XRectangle rects[],
    int nrects)
{
    int n, ret;

    for (n = 0; n < nrects; n++) {
	ret = XDrawRectangle(display, d, gc, rects[n].x, rects[n].y,
		    rects[n].width, rects[n].height);
	if (ret != Success) {
	    break;
	}
    }
    return ret;
}

/*
 *----------------------------------------------------------------------
 *
 * XDrawArc, XDrawArcs --
 *
 *	Draw an arc.
 *
 * Results:
 *	None.
 *
 * Side effects:
1011
1012
1013
1014
1015
1016
1017























1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
    unsigned int width, unsigned int height,
    int start, int extent)
{
    display->request++;

    return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0);
}
























/*
 *----------------------------------------------------------------------
 *
 * XFillArc --
 *
 *	Draw a filled arc.
 *
 * Results:
 *	None.
 *
 * Side effects:







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




|







1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
    unsigned int width, unsigned int height,
    int start, int extent)
{
    display->request++;

    return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0);
}

int
XDrawArcs(
    Display *display,
    Drawable d,
    GC gc,
    XArc *arcs,
    int narcs)
{
    int n, ret;

    display->request++;

    for (n = 0; n < narcs; n++) {
	ret = DrawOrFillArc(display, d, gc, arcs[n].x, arcs[n].y,
		    arcs[n].width, arcs[n].height,
		    arcs[n].angle1, arcs[n].angle2, 0);
	if (ret != Success) {
	    break;
	}
    }
    return ret;
}

/*
 *----------------------------------------------------------------------
 *
 * XFillArc, XFillArcs --
 *
 *	Draw a filled arc.
 *
 * Results:
 *	None.
 *
 * Side effects:
1041
1042
1043
1044
1045
1046
1047























1048
1049
1050
1051
1052
1053
1054
    unsigned int width, unsigned int height,
    int start, int extent)
{
    display->request++;

    return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1);
}
























/*
 *----------------------------------------------------------------------
 *
 * DrawOrFillArc --
 *
 *	This function handles the rendering of drawn or filled arcs and







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
    unsigned int width, unsigned int height,
    int start, int extent)
{
    display->request++;

    return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1);
}

int
XFillArcs(
    Display *display,
    Drawable d,
    GC gc,
    XArc *arcs,
    int narcs)
{
    int n, ret;

    display->request++;

    for (n = 0; n < narcs; n++) {
	ret = DrawOrFillArc(display, d, gc, arcs[n].x, arcs[n].y,
		    arcs[n].width, arcs[n].height,
		    arcs[n].angle1, arcs[n].angle2, 1);
	if (ret != Success) {
	    break;
	}
    }
    return ret;
}

/*
 *----------------------------------------------------------------------
 *
 * DrawOrFillArc --
 *
 *	This function handles the rendering of drawn or filled arcs and
Changes to jni/sdl2tk/win/tkWinWindow.c.
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
	    (int)height, TRUE);
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * XRaiseWindow --
 *
 *	Change the stacking order of a window.
 *
 * Results:
 *	None.
 *
 * Side effects:







|







586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
	    (int)height, TRUE);
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * XRaiseWindow, XLowerWindow --
 *
 *	Change the stacking order of a window.
 *
 * Results:
 *	None.
 *
 * Side effects:
610
611
612
613
614
615
616












617
618
619
620
621
622
623
{
    HWND window = Tk_GetHWND(w);

    display->request++;
    SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
    return Success;
}













/*
 *----------------------------------------------------------------------
 *
 * XConfigureWindow --
 *
 *	Change the size, position, stacking, or border of the specified







>
>
>
>
>
>
>
>
>
>
>
>







610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
{
    HWND window = Tk_GetHWND(w);

    display->request++;
    SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
    return Success;
}

int
XLowerWindow(
    Display *display,
    Window w)
{
    HWND window = Tk_GetHWND(w);

    display->request++;
    SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * XConfigureWindow --
 *
 *	Change the size, position, stacking, or border of the specified
745
746
747
748
749
750
751



























752
753
754
755
756
757
758
    XSetWindowAttributes* attributes)
{
    if (valueMask & CWCursor) {
	XDefineCursor(display, w, attributes->cursor);
    }
    return Success;
}




























/*
 *----------------------------------------------------------------------
 *
 * TkWinSetWindowPos --
 *
 *	Adjust the stacking order of a window relative to a second window (or







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
    XSetWindowAttributes* attributes)
{
    if (valueMask & CWCursor) {
	XDefineCursor(display, w, attributes->cursor);
    }
    return Success;
}

/*
 *----------------------------------------------------------------------
 *
 * XReparentWindow --
 *
 *	TODO: currently placeholder to satisfy Xlib stubs.
 *
 * Results:
 *	None.
 *
 * Side effects:
 *	TODO.
 *
 *----------------------------------------------------------------------
 */

int
XReparentWindow(
    Display *display,
    Window w,
    Window parent,
    int x,
    int y)
{
    return BadWindow;
}

/*
 *----------------------------------------------------------------------
 *
 * TkWinSetWindowPos --
 *
 *	Adjust the stacking order of a window relative to a second window (or
Changes to jni/sdl2tk/xlib/xgc.c.
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547


548


549
550
551
552
553
554
555
556
557
558
559

560
561
562
563
564
565
566
    int y,
    _Xconst char *string,
    int length)
{
}
#endif

void
XDrawPoint(
    Display *display,
    Drawable d,
    GC gc,
    int x,
    int y)
{
    XDrawLine(display, d, gc, x, y, x, y);
}

void
XDrawPoints(
    Display *display,
    Drawable d,
    GC gc,
    XPoint *points,
    int npoints,
    int mode)
{
    int i;

    for (i=0; i<npoints; i++) {
	XDrawLine(display, d, gc,
		points[i].x, points[i].y, points[i].x, points[i].y);


    }


}

#if !defined(MAC_OSX_TK)
void
XDrawSegments(
    Display *display,
    Drawable d,
    GC gc,
    XSegment *segments,
    int nsegments)
{

}
#endif

#if 0
char *
XFetchBuffer(
    Display *display,







|







|


|








|

|
|
|
>
>
|
>
>



|







>







516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
    int y,
    _Xconst char *string,
    int length)
{
}
#endif

int
XDrawPoint(
    Display *display,
    Drawable d,
    GC gc,
    int x,
    int y)
{
    return XDrawLine(display, d, gc, x, y, x, y);
}

int
XDrawPoints(
    Display *display,
    Drawable d,
    GC gc,
    XPoint *points,
    int npoints,
    int mode)
{
    int i, ret;

    for (i = 0; i < npoints; i++) {
	ret = XDrawLine(display, d, gc,
		    points[i].x, points[i].y, points[i].x, points[i].y);
	if (ret != Success) {
	    break;
	}
    }
    return ret;
}

#if !defined(MAC_OSX_TK)
int
XDrawSegments(
    Display *display,
    Drawable d,
    GC gc,
    XSegment *segments,
    int nsegments)
{
    return BadDrawable;
}
#endif

#if 0
char *
XFetchBuffer(
    Display *display,