From e275ec48e7ca72f92c4c766367e76f57a874bab9 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 2 Dec 2010 11:38:28 +0000 Subject: * generic/tkInt.decls (TkDrawAngledTextLayout,TkDrawAngledChars,...): Expose angled text API for Emiliano Gavilan. Still only in internal stub table. --- ChangeLog | 99 +++++++++++++++++++++++++++------------------------ carbon/tkMacOSXFont.c | 4 +-- generic/tkFont.c | 10 +++--- generic/tkInt.decls | 25 +++++++++++-- generic/tkInt.h | 17 ++------- macosx/tkMacOSXFont.c | 4 +-- unix/tkUnixFont.c | 6 ++-- unix/tkUnixRFont.c | 6 ++-- win/tkWinFont.c | 4 +-- 9 files changed, 96 insertions(+), 79 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6635cdf..d8297a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,51 +1,58 @@ +2010-12-02 Donal K. Fellows + + * generic/tkInt.decls (TkDrawAngledTextLayout,TkDrawAngledChars,...): + Expose angled text API for Emiliano Gavilan. Still only in internal + stub table. + 2010-11-29 Jan Nijtmans - * generic/tkAtom.c: Fix various 64-bit gcc(-4.5.2) warnings: cast from pointer - * generic/tkSelect.c: to integer of different size. - * win/stubs.c - * win/tkWinButton.c - * win/tkWinColor.c - * win/tkWinPixmap.c - * win/tkWinScrlbr.c - * win/tkWinWindow.c - * win/tkWinWm.c - * win/ttkWinMonitor.c + * generic/tkAtom.c: Fix various 64-bit gcc(-4.5.2) warnings: cast + * generic/tkSelect.c: from pointer to integer of different size. + * win/stubs.c: + * win/tkWinButton.c: + * win/tkWinColor.c: + * win/tkWinPixmap.c: + * win/tkWinScrlbr.c: + * win/tkWinWindow.c: + * win/tkWinWm.c: + * win/ttkWinMonitor.c: * win/tkWin32Dll.c: Make assembler code compile in Win64 with gcc. 2010-11-24 Jan Nijtmans - * win/tkWinDialog.c: [Bug #3071836]: Crash/Tcl_Panic on WinXP saving file to C:\ - * win/tkWinInit.c: re-write TkpDisplayWarning not to use any Tcl functions - any more. This allows TkpDisplayWarning to be used as panic proc. - * win/winMain.c: use TkpDisplayWarning as panic proc on Windows. - * generic/tkMain.c: Remove unused strrchr, combine outChannel/errChannel - variables to a single variable + * win/tkWinDialog.c: [Bug 3071836]: Crash/Tcl_Panic on WinXP saving + * win/tkWinInit.c: file to C:\, and rewrite TkpDisplayWarning not + to use any Tcl functions any more. This allows TkpDisplayWarning to be + used as panic proc. + * win/winMain.c: Use TkpDisplayWarning as panic proc on Windows. + * generic/tkMain.c: Remove unused strrchr, combine outChannel and + errChannel variables to a single variable. 2010-11-19 Jan Nijtmans - * generic/tkCanv*.c: Revise Tcl_Panic() calls ending with a newline - * generic/tkGeomerty.c removing the newline, because Tcl_Panic() - * generic/tkImgPhInstance.c outputs a final newline already. - * generic/tkMenu.c - * generic/tkRectOval.c - * generic/tkTextBTree.c - * generic/tkWindow.c - * unix/tkUnixRFont.c - * win/tkWinColor.c - * win/tkWinDraw.c - * win/tkWinMenu.c + * generic/tkCanv*.c: Revise Tcl_Panic() calls ending with a + * generic/tkGeomerty.c: newline removing the newline, because + * generic/tkImgPhInstance.c: Tcl_Panic() outputs a final newline + * generic/tkMenu.c: already. + * generic/tkRectOval.c: + * generic/tkTextBTree.c: + * generic/tkWindow.c: + * unix/tkUnixRFont.c: + * win/tkWinColor.c: + * win/tkWinDraw.c: + * win/tkWinMenu.c: 2010-11-18 Jan Nijtmans - * win/winMain.c: [FRQ 491789]: "setargv() doesn't support a - unicode cmdline" now implemented for cygwin and mingw32 too. + * win/winMain.c: [FRQ 491789]: "setargv() doesn't support a unicode + cmdline" now implemented for cygwin and mingw32 too. * win/configure.in: Allow cross-compilation by default. * win/configure (regenerated) 2010-11-17 Jan Nijtmans - * win/tcl.m4: [FRQ 491789]: "setargv() doesn't support a - unicode cmdline" now implemented for mingw-w64 + * win/tcl.m4: [FRQ 491789]: "setargv() doesn't support a unicode + cmdline" now implemented for mingw-w64 * win/configure (regenerated) * win/winMain.c Workaround for bug in some versions of mingw-w64 @@ -53,9 +60,9 @@ * win/winMain.c Bring compilation under mingw-w64 a bit closer * win/tcl.m4 to reality. See for what's missing: - * - * win/configure (re-generated) - * win/tkWinPort.h [Bug #3110161]: Extensions using TCHAR don't compile + https://sourceforge.net/apps/trac/mingw-w64/wiki/Unicode%20apps + * win/configure: (re-generated) + * win/tkWinPort.h: [Bug 3110161]: Extensions using TCHAR don't compile on VS2005 SP1 2010-11-10 Andreas Kupries @@ -64,14 +71,14 @@ 2010-11-06 Jan Nijtmans - * library/msgs/*.msg Update NL catalog. For other languages, - sorting and fix some locations of "&" + * library/msgs/*.msg: Update NL catalog. For other languages, + sorting and fix some locations of "&". 2010-11-05 Jan Nijtmans - * library/demos/widget Use unicode copyright sign, in stead - * library/demos/en.msg of depending on translation. - * library/demos/nl.msg + * library/demos/widget: Use unicode copyright sign, instead of + * library/demos/en.msg: depending on translation. + * library/demos/nl.msg: * generic/tkMain.c: Sync TK_ASCII_MAIN usage with tclMain.c 2010-11-04 Don Porter @@ -86,8 +93,8 @@ 2010-10-11 Jan Nijtmans - * generic/tkDecls.h: [FRQ 491789]: "setargv() doesn't support a unicode - * doc/Tk_Main.3: cmdline" implemented for Tk on MSVC++ + * generic/tkDecls.h: [FRQ 491789]: "setargv() doesn't support a + * doc/Tk_Main.3: unicode cmdline" implemented for Tk on MSVC++ * win/Makefile.in: * win/makefile.vc: * win/winMain.c: @@ -95,16 +102,16 @@ 2010-10-11 Joe English - * generic/ttk/ttkTreeview.c: Fix crash in 'tag add' / 'tag remove' - commands when no -tags specified [Bug 3085489]. + * generic/ttk/ttkTreeview.c: [Bug 3085489]: Fix crash in 'tag add' / + 'tag remove' commands when no -tags specified. 2010-10-11 Jan Nijtmans * win/tkWinMenu.c: [FRQ 2965056]: Windows build with -DUNICODE * win/tkWinWm.c: - * win/tcl.m4 Add netapi32 to the link line, so we no longer - * win/makefile.vc have to use LoadLibrary to access those functions. - * win/configure + * win/tcl.m4: Add netapi32 to the link line, so we no longer + * win/makefile.vc: have to use LoadLibrary to access those + * win/configure: functions. 2010-10-06 Jan Nijtmans diff --git a/carbon/tkMacOSXFont.c b/carbon/tkMacOSXFont.c index 01b94b2..cfc1b79 100644 --- a/carbon/tkMacOSXFont.c +++ b/carbon/tkMacOSXFont.c @@ -35,7 +35,7 @@ * that such fonts can not be used for controls, because controls * definitely require a family id (this assertion needs testing). * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.1 2009/06/26 01:42:46 das Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.2 2010/12/02 11:38:29 dkf Exp $ */ #include "tkMacOSXPrivate.h" @@ -1143,7 +1143,7 @@ Tk_DrawChars( } void -TkpDrawAngledChars( +TkDrawAngledChars( Display *display, /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ GC gc, /* Graphics context for drawing characters. */ diff --git a/generic/tkFont.c b/generic/tkFont.c index 54b3afa..b768bbd 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFont.c,v 1.65 2010/01/05 08:49:49 dkf Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.66 2010/12/02 11:38:29 dkf Exp $ */ #include "tkInt.h" @@ -524,7 +524,7 @@ Tk_FontObjCmd( s = Tcl_GetString(objv[n]); if (s[0] == '-' && s[1] != '-') { optPtr = objv[n]; - ++n; + n++; } else { optPtr = NULL; } @@ -536,7 +536,7 @@ Tk_FontObjCmd( if (n < objc) { if (!strcmp(Tcl_GetString(objv[n]), "--")) { - ++n; + n++; } } @@ -546,7 +546,7 @@ Tk_FontObjCmd( if (n < objc) { charPtr = objv[n]; - ++n; + n++; } /* @@ -2370,7 +2370,7 @@ TkDrawAngledTextLayout( firstByte, lastByte - firstByte, (int)(x + dx), (int)(y + dy)); } else { - TkpDrawAngledChars(display, drawable, gc, layoutPtr->tkfont, + TkDrawAngledChars(display, drawable, gc, layoutPtr->tkfont, firstByte, lastByte - firstByte, x+dx, y+dy, angle); } } diff --git a/generic/tkInt.decls b/generic/tkInt.decls index e545da7..580b056 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tkInt.decls,v 1.65 2010/09/28 10:42:05 nijtmans Exp $ +# RCS: @(#) $Id: tkInt.decls,v 1.66 2010/12/02 11:38:29 dkf Exp $ library tk @@ -613,6 +613,27 @@ declare 180 { CONST86 char *TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } + +# Angled text API, exposed for Emiliano Gavilan's RBC work. +declare 181 { + void TkDrawAngledTextLayout(Display *display, Drawable drawable, GC gc, + Tk_TextLayout layout, int x, int y, double angle, int firstChar, + int lastChar); +} +declare 182 { + void TkUnderlineAngledTextLayout(Display *display, Drawable drawable, + GC gc, Tk_TextLayout layout, int x, int y, double angle, + int underline); +} +declare 183 { + int TkIntersectAngledTextLayout(Tk_TextLayout layout, int x, int y, + int width, int height, double angle); +} +declare 184 { + void TkDrawAngledChars(Display *display,Drawable drawable, GC gc, + Tk_Font tkfont, const char *source, int numBytes, double x, + double y, double angle); +} ############################################################################## @@ -968,7 +989,7 @@ declare 51 aqua { declare 53 aqua { unsigned long TkpGetMS(void) } - + ############################################################################## # Define the platform specific internal Xlib interfaces. These functions are diff --git a/generic/tkInt.h b/generic/tkInt.h index 7722da3..4ca9b05 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: $Id: tkInt.h,v 1.123 2010/06/19 16:18:41 jenglish Exp $ + * RCS: $Id: tkInt.h,v 1.124 2010/12/02 11:38:29 dkf Exp $ */ #ifndef _TKINT @@ -1198,21 +1198,10 @@ MODULE_SCOPE void TkpMakeTransparentWindowExist(Tk_Window tkwin, MODULE_SCOPE void TkpCreateBusy(Tk_FakeWin *winPtr, Tk_Window tkRef, Window *parentPtr, Tk_Window tkParent, TkBusy busy); -MODULE_SCOPE void TkDrawAngledTextLayout(Display *display, - Drawable drawable, GC gc, Tk_TextLayout layout, - int x, int y, double angle, int firstChar, - int lastChar); -MODULE_SCOPE void TkpDrawAngledChars(Display *display,Drawable drawable, - GC gc, Tk_Font tkfont, const char *source, - int numBytes, double x, double y, double angle); -MODULE_SCOPE void TkUnderlineAngledTextLayout(Display *display, - Drawable drawable, GC gc, Tk_TextLayout layout, - int x, int y, double angle, int underline); -MODULE_SCOPE int TkIntersectAngledTextLayout(Tk_TextLayout layout, - int x,int y, int width, int height, double angle); MODULE_SCOPE int TkBackgroundEvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, int flags); -MODULE_SCOPE void TkSendVirtualEvent(Tk_Window tgtWin, const char *eventName); +MODULE_SCOPE void TkSendVirtualEvent(Tk_Window tgtWin, + const char *eventName); MODULE_SCOPE Tcl_Command TkMakeEnsemble(Tcl_Interp *interp, const char *nsname, const char *name, ClientData clientData, const TkEnsemble *map); diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index dc03c70..270b9bf 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.46 2009/07/06 20:29:21 dkf Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.47 2010/12/02 11:38:29 dkf Exp $ */ #include "tkMacOSXPrivate.h" @@ -943,7 +943,7 @@ Tk_DrawChars( } void -TkpDrawAngledChars( +TkDrawAngledChars( Display *display, /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ GC gc, /* Graphics context for drawing characters. */ diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index cbfcdc9..62f594b 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixFont.c,v 1.42 2010/05/26 15:28:10 nijtmans Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.43 2010/12/02 11:38:29 dkf Exp $ */ #include "tkUnixInt.h" @@ -3021,7 +3021,7 @@ GetEncodingAlias( /* *--------------------------------------------------------------------------- * - * TkpDrawAngledChars -- + * TkDrawAngledChars -- * * Draw some characters at an angle. This is awkward here because we have * no reliable way of drawing any characters at an angle in classic X11; @@ -3117,7 +3117,7 @@ InitDestImage( } void -TkpDrawAngledChars( +TkDrawAngledChars( Display *display, /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ GC gc, /* Graphics context for drawing characters. */ diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 43a5730..effeb57 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixRFont.c,v 1.35 2010/11/19 14:48:00 nijtmans Exp $ + * RCS: @(#) $Id: tkUnixRFont.c,v 1.36 2010/12/02 11:38:29 dkf Exp $ */ #include "tkUnixInt.h" @@ -837,7 +837,7 @@ Tk_DrawChars( /* *--------------------------------------------------------------------------- * - * TkpDrawAngledChars -- + * TkDrawAngledChars -- * * Draw some characters at an angle. This would be simple code, except * Xft has bugs with cumulative errors in character positioning which are @@ -854,7 +854,7 @@ Tk_DrawChars( */ void -TkpDrawAngledChars( +TkDrawAngledChars( Display *display, /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ GC gc, /* Graphics context for drawing characters. */ diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 5646b6c..e057abe 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinFont.c,v 1.52 2010/10/06 14:33:29 nijtmans Exp $ + * RCS: @(#) $Id: tkWinFont.c,v 1.53 2010/12/02 11:38:29 dkf Exp $ */ #include "tkWinInt.h" @@ -1223,7 +1223,7 @@ Tk_DrawChars( } void -TkpDrawAngledChars( +TkDrawAngledChars( Display *display, /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ GC gc, /* Graphics context for drawing characters. */ -- cgit v0.12