diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-25 22:15:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-09-25 22:15:55 (GMT) |
commit | a565f3cefc837744929899b81369312a838c90d4 (patch) | |
tree | 0cc65a6a303207377cdc8411863e340cc50fe3ba | |
parent | c2eaef98e73b309df7c2e262fc0c982a634d0f9d (diff) | |
download | tk-a565f3cefc837744929899b81369312a838c90d4.zip tk-a565f3cefc837744929899b81369312a838c90d4.tar.gz tk-a565f3cefc837744929899b81369312a838c90d4.tar.bz2 |
Add XPutImage() to the X11 stub table on Aqua
-rw-r--r-- | generic/tkInt.decls | 7 | ||||
-rw-r--r-- | generic/tkIntXlibDecls.h | 73 | ||||
-rw-r--r-- | generic/tkStubInit.c | 23 | ||||
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 10 | ||||
-rw-r--r-- | macosx/tkMacOSXImage.c | 23 |
5 files changed, 126 insertions, 10 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 8cea73c..0362d17 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1840,7 +1840,12 @@ declare 112 aqua { declare 114 aqua { VisualID XVisualIDFromVisual(Visual *visual) } - +declare 137 aqua { + int XPutImage(Display *d, Drawable dr, GC gc, XImage *im, + int sx, int sy, int dx, int dy, + unsigned int w, unsigned int h) +} + # Local Variables: # mode: tcl # End: diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index c4186b0..4b91440 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -707,6 +707,32 @@ EXTERN XAfterFunction XSynchronize(Display *display, Bool onoff); /* Slot 113 is reserved */ /* 114 */ EXTERN VisualID XVisualIDFromVisual(Visual *visual); +/* Slot 115 is reserved */ +/* Slot 116 is reserved */ +/* Slot 117 is reserved */ +/* Slot 118 is reserved */ +/* Slot 119 is reserved */ +/* Slot 120 is reserved */ +/* Slot 121 is reserved */ +/* Slot 122 is reserved */ +/* Slot 123 is reserved */ +/* Slot 124 is reserved */ +/* Slot 125 is reserved */ +/* Slot 126 is reserved */ +/* Slot 127 is reserved */ +/* Slot 128 is reserved */ +/* Slot 129 is reserved */ +/* Slot 130 is reserved */ +/* Slot 131 is reserved */ +/* Slot 132 is reserved */ +/* Slot 133 is reserved */ +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +/* 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 /* AQUA */ typedef struct TkIntXlibStubs { @@ -969,6 +995,29 @@ typedef struct TkIntXlibStubs { XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */ void (*reserved113)(void); VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */ + void (*reserved115)(void); + void (*reserved116)(void); + void (*reserved117)(void); + void (*reserved118)(void); + void (*reserved119)(void); + void (*reserved120)(void); + void (*reserved121)(void); + void (*reserved122)(void); + void (*reserved123)(void); + void (*reserved124)(void); + void (*reserved125)(void); + void (*reserved126)(void); + void (*reserved127)(void); + void (*reserved128)(void); + void (*reserved129)(void); + void (*reserved130)(void); + void (*reserved131)(void); + void (*reserved132)(void); + void (*reserved133)(void); + void (*reserved134)(void); + void (*reserved135)(void); + void (*reserved136)(void); + int (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); /* 137 */ #endif /* AQUA */ } TkIntXlibStubs; @@ -1465,6 +1514,30 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; /* Slot 113 is reserved */ #define XVisualIDFromVisual \ (tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */ +/* Slot 115 is reserved */ +/* Slot 116 is reserved */ +/* Slot 117 is reserved */ +/* Slot 118 is reserved */ +/* Slot 119 is reserved */ +/* Slot 120 is reserved */ +/* Slot 121 is reserved */ +/* Slot 122 is reserved */ +/* Slot 123 is reserved */ +/* Slot 124 is reserved */ +/* Slot 125 is reserved */ +/* Slot 126 is reserved */ +/* Slot 127 is reserved */ +/* Slot 128 is reserved */ +/* Slot 129 is reserved */ +/* Slot 130 is reserved */ +/* Slot 131 is reserved */ +/* Slot 132 is reserved */ +/* Slot 133 is reserved */ +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +#define XPutImage \ + (tkIntXlibStubsPtr->xPutImage) /* 137 */ #endif /* AQUA */ #endif /* defined(USE_TK_STUBS) */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 5dffe7a..10669ad 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -851,6 +851,29 @@ static const TkIntXlibStubs tkIntXlibStubs = { XSynchronize, /* 112 */ 0, /* 113 */ XVisualIDFromVisual, /* 114 */ + 0, /* 115 */ + 0, /* 116 */ + 0, /* 117 */ + 0, /* 118 */ + 0, /* 119 */ + 0, /* 120 */ + 0, /* 121 */ + 0, /* 122 */ + 0, /* 123 */ + 0, /* 124 */ + 0, /* 125 */ + 0, /* 126 */ + 0, /* 127 */ + 0, /* 128 */ + 0, /* 129 */ + 0, /* 130 */ + 0, /* 131 */ + 0, /* 132 */ + 0, /* 133 */ + 0, /* 134 */ + 0, /* 135 */ + 0, /* 136 */ + XPutImage, /* 137 */ #endif /* AQUA */ }; diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index 7f038cf..d15abde 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -53,11 +53,11 @@ static void ProcessAppleEvent(ClientData clientData); * Names of the procedures which can be used to process AppleEvents. */ -static char* openDocumentProc = "::tk::mac::OpenDocument"; -static char* launchURLProc = "::tk::mac::LaunchURL"; -static char* printDocProc = "::tk::mac::PrintDocument"; -static char* scriptFileProc = "::tk::mac::DoScriptFile"; -static char* scriptTextProc = "::tk::mac::DoScriptText"; +static const char *openDocumentProc = "::tk::mac::OpenDocument"; +static const char *launchURLProc = "::tk::mac::LaunchURL"; +static const char *printDocProc = "::tk::mac::PrintDocument"; +static const char *scriptFileProc = "::tk::mac::DoScriptFile"; +static const char *scriptTextProc = "::tk::mac::DoScriptText"; #pragma mark TKApplication(TKHLEvents) diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 36f1fc6..2e576a5 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -516,7 +516,7 @@ XCreateImage( /* *---------------------------------------------------------------------- * - * TkPutImage -- + * TkPutImage, XPutImage -- * * Copies a rectangular subimage of an XImage into a drawable. Currently * this is only called by TkImgPhotoDisplay, using a Window as the @@ -532,9 +532,7 @@ XCreateImage( */ int -TkPutImage( - unsigned long *colors, /* Unused on Macintosh. */ - int ncolors, /* Unused on Macintosh. */ +XPutImage( Display* display, /* Display. */ Drawable drawable, /* Drawable to place image on. */ GC gc, /* GC to use. */ @@ -591,6 +589,23 @@ TkPutImage( TkMacOSXRestoreDrawingContext(&dc); return Success; } + +int +TkPutImage( + unsigned long *colors, /* Array of pixel values used by this image. + * May be NULL. */ + int ncolors, /* Number of colors used, or 0. */ + 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 XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y, width, height); +} /* * Local Variables: |