Tk Source Code

Check-in [1a640018]
Login

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

Overview
Comment:fix signature of XSynchronize to match X.org
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a640018b685566167c7fbd3acef90898cd690d4
User & Date: jan.nijtmans 2012-06-15 07:43:50
Context
2012-06-15
08:25
rfe-2636558 simplification check-in: 7f269311 user: jan.nijtmans tags: rfe-2636558
07:57
[Bug 3535362]: Changed name of 'unshare' internal function to avoid clash with some libc versions. check-in: da0349c6 user: dkf tags: trunk
07:43
fix signature of XSynchronize to match X.org check-in: 1a640018 user: jan.nijtmans tags: trunk
05:46
merge-mark check-in: 47059be3 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkInt.decls.

1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
declare 110 win {
   int XFree(void *data)
}
declare 111 win {
   int XNoOp(Display *display)
}
declare 112 win {
   int XSynchronize(Display *display, Bool onoff)
}
declare 113 win {
   int XSync(Display *display, Bool discard)
}
declare 114 win {
   VisualID XVisualIDFromVisual(Visual *visual)
}







|







1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
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)
}

Changes to generic/tkIntXlibDecls.h.

25
26
27
28
29
30
31




32
33
34
35
36
37
38

#include "X11/Xutil.h"

#ifdef BUILD_tk
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
#endif





/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */








>
>
>
>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

#include "X11/Xutil.h"

#ifdef BUILD_tk
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
#endif

typedef int (*XAfterFunction) (	    /* WARNING, this type not in Xlib spec */
    Display*		/* display */
);

/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */

339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
/* 109 */
EXTERN int		XUngrabServer(Display *display);
/* 110 */
EXTERN int		XFree(void *data);
/* 111 */
EXTERN int		XNoOp(Display *display);
/* 112 */
EXTERN int		XSynchronize(Display *display, Bool onoff);
/* 113 */
EXTERN int		XSync(Display *display, Bool discard);
/* 114 */
EXTERN VisualID		XVisualIDFromVisual(Visual *visual);
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
/* 0 */







|







343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
/* 109 */
EXTERN int		XUngrabServer(Display *display);
/* 110 */
EXTERN int		XFree(void *data);
/* 111 */
EXTERN int		XNoOp(Display *display);
/* 112 */
EXTERN XAfterFunction	XSynchronize(Display *display, Bool onoff);
/* 113 */
EXTERN int		XSync(Display *display, Bool discard);
/* 114 */
EXTERN VisualID		XVisualIDFromVisual(Visual *visual);
#endif /* WIN */
#ifdef MAC_OSX_TK /* AQUA */
/* 0 */
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
    int (*xWarpPointer) (Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy); /* 105 */
    int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 106 */
    int (*xFlush) (Display *display); /* 107 */
    int (*xGrabServer) (Display *display); /* 108 */
    int (*xUngrabServer) (Display *display); /* 109 */
    int (*xFree) (void *data); /* 110 */
    int (*xNoOp) (Display *display); /* 111 */
    int (*xSynchronize) (Display *display, Bool onoff); /* 112 */
    int (*xSync) (Display *display, Bool discard); /* 113 */
    VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */
#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 */







|







731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
    int (*xWarpPointer) (Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy); /* 105 */
    int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 106 */
    int (*xFlush) (Display *display); /* 107 */
    int (*xGrabServer) (Display *display); /* 108 */
    int (*xUngrabServer) (Display *display); /* 109 */
    int (*xFree) (void *data); /* 110 */
    int (*xNoOp) (Display *display); /* 111 */
    XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */
    int (*xSync) (Display *display, Bool discard); /* 113 */
    VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */
#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 */

Changes to generic/tkStubInit.c.

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 * Make sure that extensions which call XParseColor through the stub
 * table, call TkParseColor instead. [Bug 3486474]
 */
#   define XParseColor	TkParseColor

#   ifdef __CYGWIN__

	TkIntStubs tkIntStubs;

/*
 * Trick, so we don't have to include <windows.h> here, which in any
 * case lacks this function anyway.
 */

#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS	0x00000004
int __stdcall GetModuleHandleExW(unsigned int, const char *, void *);







<
<







71
72
73
74
75
76
77


78
79
80
81
82
83
84
 * Make sure that extensions which call XParseColor through the stub
 * table, call TkParseColor instead. [Bug 3486474]
 */
#   define XParseColor	TkParseColor

#   ifdef __CYGWIN__



/*
 * Trick, so we don't have to include <windows.h> here, which in any
 * case lacks this function anyway.
 */

#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS	0x00000004
int __stdcall GetModuleHandleExW(unsigned int, const char *, void *);

Changes to unix/tkUnixPort.h.

122
123
124
125
126
127
128




129
130
131
132
133
134
135
#   define HMENU void *
#   define TkWinDCState void
#   define HPALETTE void *
#   define WNDPROC void *
#   define WPARAM void *
#   define LPARAM void *
#   define LRESULT void *




#else /* !__CYGWIN__ */
    /*
     * The TkPutImage macro strips off the color table information, which isn't
     * needed for X.
     */

#   define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \







>
>
>
>







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#   define HMENU void *
#   define TkWinDCState void
#   define HPALETTE void *
#   define WNDPROC void *
#   define WPARAM void *
#   define LPARAM void *
#   define LRESULT void *

EXTERN int TkPutImage (unsigned long *, int, Display *, Drawable, GC,
	XImage *, int, int, int, int, unsigned int, unsigned int);

#else /* !__CYGWIN__ */
    /*
     * The TkPutImage macro strips off the color table information, which isn't
     * needed for X.
     */

#   define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \

Changes to win/Makefile.in.

474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
		echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \
		$(COPY) $$i "$(BIN_INSTALL_DIR)"; \
	    fi; \
	    done
	@echo "Creating package index $(PKG_INDEX)"; 
	@$(RM) $(PKG_INDEX);
	@(\
	echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} { return }";\
	echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\
	echo "	&& ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\
	echo "    package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\
	echo "} else {";\
	echo "    package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\
	echo "}";\
	) > $(PKG_INDEX);







|







474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
		echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \
		$(COPY) $$i "$(BIN_INSTALL_DIR)"; \
	    fi; \
	    done
	@echo "Creating package index $(PKG_INDEX)"; 
	@$(RM) $(PKG_INDEX);
	@(\
	echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} return";\
	echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\
	echo "	&& ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\
	echo "    package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\
	echo "} else {";\
	echo "    package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\
	echo "}";\
	) > $(PKG_INDEX);

Changes to win/stubs.c.

444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
XNoOp(
    Display *display)
{
	display->request++;
    return 0;
}

int
XSynchronize(
    Display *display,
    Bool bool)
{
	display->request++;
    return 0;
}

int
XSync(
    Display *display,
    Bool bool)
{







|





|







444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
XNoOp(
    Display *display)
{
	display->request++;
    return 0;
}

XAfterFunction
XSynchronize(
    Display *display,
    Bool bool)
{
	display->request++;
    return NULL;
}

int
XSync(
    Display *display,
    Bool bool)
{