Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | merge trunk, upstream androwish changes |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | androwish |
Files: | files | file ages | folders |
SHA1: |
f4f42423b9a7b37ecf5d58f46e1dc65e |
User & Date: | jan.nijtmans 2015-11-30 07:39:27 |
Context
2015-12-01
| ||
13:34 | left-over upstream androwish change check-in: 8df304bb user: jan.nijtmans tags: androwish | |
2015-11-30
| ||
07:39 | merge trunk, upstream androwish changes check-in: f4f42423 user: jan.nijtmans tags: androwish | |
2015-11-29
| ||
14:34 | Fixed bug [1997299fff] - Tag borderwidth leaking check-in: 6a931012 user: fvogel tags: trunk | |
2015-11-25
| ||
21:09 | merge trunk check-in: 6a1a0158 user: jan.nijtmans tags: androwish | |
Changes
Changes to generic/tkTextDisp.c.
︙ | ︙ | |||
2537 2538 2539 2540 2541 2542 2543 | int rightX; /* Right edge of chunkPtr. */ int rightX2; /* Right edge of chunkPtr2. */ int matchLeft; /* Does the style of this line match that of * its neighbor just to the left of the * current x coordinate? */ int matchRight; /* Does line's style match its neighbor just * to the right of the current x-coord? */ | | | 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 | int rightX; /* Right edge of chunkPtr. */ int rightX2; /* Right edge of chunkPtr2. */ int matchLeft; /* Does the style of this line match that of * its neighbor just to the left of the * current x coordinate? */ int matchRight; /* Does line's style match its neighbor just * to the right of the current x-coord? */ int minX, maxX, xOffset, bw; StyleValues *sValuePtr; Display *display; #ifndef TK_NO_DOUBLE_BUFFERING const int y = 0; #else const int y = dlPtr->y; #endif /* TK_NO_DOUBLE_BUFFERING */ |
︙ | ︙ | |||
2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 | if ((leftX + xOffset) < -(sValuePtr->borderWidth)) { leftX = -sValuePtr->borderWidth - xOffset; } if ((rightX - leftX) > 32767) { rightX = leftX + 32767; } XFillRectangle(display, pixmap, chunkPtr->stylePtr->bgGC, leftX + xOffset, y, (unsigned int) (rightX - leftX), (unsigned int) dlPtr->height); if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, | > > > > > > > > > > | | < | | 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 | if ((leftX + xOffset) < -(sValuePtr->borderWidth)) { leftX = -sValuePtr->borderWidth - xOffset; } if ((rightX - leftX) > 32767) { rightX = leftX + 32767; } /* * Prevent the borders from leaking on adjacent characters, * which would happen for too large border width. */ bw = sValuePtr->borderWidth; if (leftX + sValuePtr->borderWidth > rightX) { bw = rightX - leftX; } XFillRectangle(display, pixmap, chunkPtr->stylePtr->bgGC, leftX + xOffset, y, (unsigned int) (rightX - leftX), (unsigned int) dlPtr->height); if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, leftX + xOffset, y, bw, dlPtr->height, 1, sValuePtr->relief); Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX - bw + xOffset, y, bw, dlPtr->height, 0, sValuePtr->relief); } } leftX = rightX; } /* |
︙ | ︙ | |||
2714 2715 2716 2717 2718 2719 2720 2721 2722 | * matches the current line on one side of the change but not on the * other, we have to draw an L-shaped piece of bevel. */ matchRight = (nextPtr2 != NULL) && SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr); if (matchLeft && !matchRight) { if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, | > > > > | | < | > > > > | | | | | 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 | * matches the current line on one side of the change but not on the * other, we have to draw an L-shaped piece of bevel. */ matchRight = (nextPtr2 != NULL) && SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr); if (matchLeft && !matchRight) { bw = sValuePtr->borderWidth; if (rightX2 - sValuePtr->borderWidth < leftX) { bw = rightX2 - leftX; } if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 - bw + xOffset, y, bw, sValuePtr->borderWidth, 0, sValuePtr->relief); } leftX = rightX2 - bw; leftXIn = 0; } else if (!matchLeft && matchRight && (sValuePtr->relief != TK_RELIEF_FLAT)) { bw = sValuePtr->borderWidth; if (rightX2 + sValuePtr->borderWidth > rightX) { bw = rightX - rightX2; } Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 + xOffset, y, bw, sValuePtr->borderWidth, 1, sValuePtr->relief); Tk_3DHorizontalBevel(textPtr->tkwin, pixmap, sValuePtr->border, leftX + xOffset, y, rightX2 + bw - leftX, sValuePtr->borderWidth, leftXIn, 0, 1, sValuePtr->relief); } nextChunk2: chunkPtr2 = nextPtr2; if (chunkPtr2 == NULL) { rightX2 = INT_MAX; |
︙ | ︙ | |||
2761 2762 2763 2764 2765 2766 2767 | rightX = chunkPtr->x + chunkPtr->width; if ((chunkPtr->nextPtr == NULL) && (rightX < maxX)) { rightX = maxX; } chunkPtr2 = NULL; if (dlPtr->nextPtr != NULL && dlPtr->nextPtr->chunkPtr != NULL) { /* | | | 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 | rightX = chunkPtr->x + chunkPtr->width; if ((chunkPtr->nextPtr == NULL) && (rightX < maxX)) { rightX = maxX; } chunkPtr2 = NULL; if (dlPtr->nextPtr != NULL && dlPtr->nextPtr->chunkPtr != NULL) { /* * Find the chunk in the next line that covers leftX. */ nextPtr2 = dlPtr->nextPtr->chunkPtr; rightX2 = 0; /* See Note A above. */ while (rightX2 <= leftX) { chunkPtr2 = nextPtr2; if (chunkPtr2 == NULL) { |
︙ | ︙ | |||
2817 2818 2819 2820 2821 2822 2823 2824 2825 | } continue; } matchRight = (nextPtr2 != NULL) && SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr); if (matchLeft && !matchRight) { if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, | > > > > | | < | > > > > | | | | | | | 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 | } continue; } matchRight = (nextPtr2 != NULL) && SAME_BACKGROUND(nextPtr2->stylePtr, chunkPtr->stylePtr); if (matchLeft && !matchRight) { bw = sValuePtr->borderWidth; if (rightX2 - sValuePtr->borderWidth < leftX) { bw = rightX2 - leftX; } if (sValuePtr->relief != TK_RELIEF_FLAT) { Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 - bw + xOffset, y + dlPtr->height - sValuePtr->borderWidth, bw, sValuePtr->borderWidth, 0, sValuePtr->relief); } leftX = rightX2 - bw; leftXIn = 1; } else if (!matchLeft && matchRight && (sValuePtr->relief != TK_RELIEF_FLAT)) { bw = sValuePtr->borderWidth; if (rightX2 + sValuePtr->borderWidth > rightX) { bw = rightX - rightX2; } Tk_3DVerticalBevel(textPtr->tkwin, pixmap, sValuePtr->border, rightX2 + xOffset, y + dlPtr->height - sValuePtr->borderWidth, bw, sValuePtr->borderWidth, 1, sValuePtr->relief); Tk_3DHorizontalBevel(textPtr->tkwin, pixmap, sValuePtr->border, leftX + xOffset, y + dlPtr->height - sValuePtr->borderWidth, rightX2 + bw - leftX, sValuePtr->borderWidth, leftXIn, 1, 0, sValuePtr->relief); } nextChunk2b: chunkPtr2 = nextPtr2; if (chunkPtr2 == NULL) { rightX2 = INT_MAX; } else { |
︙ | ︙ |
Changes to macosx/tkMacOSXDialog.c.
︙ | ︙ | |||
30 31 32 33 34 35 36 | }; enum colorOptions { COLOR_INITIAL, COLOR_PARENT, COLOR_TITLE }; static const char *const openOptionStrings[] = { "-defaultextension", "-filetypes", "-initialdir", "-initialfile", | | | | | | | | | | | | | 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 | }; enum colorOptions { COLOR_INITIAL, COLOR_PARENT, COLOR_TITLE }; static const char *const openOptionStrings[] = { "-defaultextension", "-filetypes", "-initialdir", "-initialfile", "-message", "-multiple", "-parent", "-title", "-typevariable", "-command", NULL }; enum openOptions { OPEN_DEFAULT, OPEN_FILETYPES, OPEN_INITDIR, OPEN_INITFILE, OPEN_MESSAGE, OPEN_MULTIPLE, OPEN_PARENT, OPEN_TITLE, OPEN_TYPEVARIABLE, OPEN_COMMAND, }; static const char *const saveOptionStrings[] = { "-defaultextension", "-filetypes", "-initialdir", "-initialfile", "-message", "-parent", "-title", "-typevariable", "-command", "-confirmoverwrite", NULL }; enum saveOptions { SAVE_DEFAULT, SAVE_FILETYPES, SAVE_INITDIR, SAVE_INITFILE, SAVE_MESSAGE, SAVE_PARENT, SAVE_TITLE, SAVE_TYPEVARIABLE, SAVE_COMMAND, SAVE_CONFIRMOW }; static const char *const chooseOptionStrings[] = { "-initialdir", "-message", "-mustexist", "-parent", "-title", "-command", NULL }; enum chooseOptions { CHOOSE_INITDIR, CHOOSE_MESSAGE, CHOOSE_MUSTEXIST, CHOOSE_PARENT, CHOOSE_TITLE, CHOOSE_COMMAND, }; typedef struct { Tcl_Interp *interp; Tcl_Obj *cmdObj; int multiple; } FilePanelCallbackInfo; |
︙ | ︙ | |||
383 384 385 386 387 388 389 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; | | | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int index, len, multiple = 0; FileFilterList fl; Tcl_Obj *cmdObj = NULL, *typeVariablePtr = NULL; FilePanelCallbackInfo callbackInfoStruct; FilePanelCallbackInfo *callbackInfo = &callbackInfoStruct; NSString *directory = nil, *filename = nil; NSString *message, *title, *type; NSWindow *parent; |
︙ | ︙ | |||
440 441 442 443 444 445 446 | [message release]; break; case OPEN_MULTIPLE: if (Tcl_GetBooleanFromObj(interp, objv[i + 1], &multiple) != TCL_OK) { goto end; } | < < < < < < | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | [message release]; break; case OPEN_MULTIPLE: if (Tcl_GetBooleanFromObj(interp, objv[i + 1], &multiple) != TCL_OK) { goto end; } break; case OPEN_PARENT: str = Tcl_GetStringFromObj(objv[i + 1], &len); tkwin = Tk_NameToWindow(interp, str, tkwin); if (!tkwin) { goto end; } |
︙ | ︙ | |||
586 587 588 589 590 591 592 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; | | | 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int confirmOverwrite = 1; int index, len; FileFilterList fl; Tcl_Obj *cmdObj = NULL; FilePanelCallbackInfo callbackInfoStruct; FilePanelCallbackInfo *callbackInfo = &callbackInfoStruct; NSString *directory = nil, *filename = nil, *defaultType = nil; NSString *message, *title, *type; |
︙ | ︙ | |||
646 647 648 649 650 651 652 | } break; case SAVE_MESSAGE: message = [[NSString alloc] initWithUTF8String: Tcl_GetString(objv[i + 1])]; [panel setMessage:message]; [message release]; | < < < < < < | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | } break; case SAVE_MESSAGE: message = [[NSString alloc] initWithUTF8String: Tcl_GetString(objv[i + 1])]; [panel setMessage:message]; [message release]; break; case SAVE_PARENT: str = Tcl_GetStringFromObj(objv[i + 1], &len); tkwin = Tk_NameToWindow(interp, str, tkwin); if (!tkwin) { goto end; } |
︙ | ︙ | |||
782 783 784 785 786 787 788 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; | | | 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 | Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int index, len, mustexist = 0; Tcl_Obj *cmdObj = NULL; FilePanelCallbackInfo callbackInfoStruct; FilePanelCallbackInfo *callbackInfo = &callbackInfoStruct; NSString *directory = nil, *filename = nil; NSString *message, *title; NSWindow *parent; NSOpenPanel *panel = [NSOpenPanel openPanel]; |
︙ | ︙ | |||
822 823 824 825 826 827 828 | [message release]; break; case CHOOSE_MUSTEXIST: if (Tcl_GetBooleanFromObj(interp, objv[i + 1], &mustexist) != TCL_OK) { goto end; } | < < < < < < | 810 811 812 813 814 815 816 817 818 819 820 821 822 823 | [message release]; break; case CHOOSE_MUSTEXIST: if (Tcl_GetBooleanFromObj(interp, objv[i + 1], &mustexist) != TCL_OK) { goto end; } break; case CHOOSE_PARENT: str = Tcl_GetStringFromObj(objv[i + 1], &len); tkwin = Tk_NameToWindow(interp, str, tkwin); if (!tkwin) { goto end; } |
︙ | ︙ |
Changes to sdl/SdlTkUtils.c.
︙ | ︙ | |||
94 95 96 97 98 99 100 | static const char * XftGetInt(const char *ptr, int *val) { if (*ptr == '*') { *val = -1; ptr++; } else { | > | | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | static const char * XftGetInt(const char *ptr, int *val) { if (*ptr == '*') { *val = -1; ptr++; } else { *val = '\0'; while ((*ptr >= '0') && (*ptr <= '9')) { *val = *val * 10 + *ptr++ - '0'; } } if (*ptr == '-') { return ptr; } return (char *) 0; |
︙ | ︙ | |||
120 121 122 123 124 125 126 | Tcl_DStringInit(&ds); Tcl_MutexLock(&fnt_mutex); hPtr = Tcl_FirstHashEntry(&file_face_hash, &search); while (hPtr != NULL) { GlyphIndexHash *ghash; ghash = (GlyphIndexHash *) Tcl_GetHashValue(hPtr); | | | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | Tcl_DStringInit(&ds); Tcl_MutexLock(&fnt_mutex); hPtr = Tcl_FirstHashEntry(&file_face_hash, &search); while (hPtr != NULL) { GlyphIndexHash *ghash; ghash = (GlyphIndexHash *) Tcl_GetHashValue(hPtr); if ((name[0] == '*') || (strcasecmp(ghash->familyName, name) == 0)) { Tcl_DStringAppend(&ds, "-unknown-", -1); Tcl_DStringAppend(&ds, ghash->familyName, -1); if (ghash->styleFlags & FT_STYLE_FLAG_BOLD) { Tcl_DStringAppend(&ds, "-bold", -1); } else { Tcl_DStringAppend(&ds, "-normal", -1); } |
︙ | ︙ | |||
142 143 144 145 146 147 148 | nmatch++; } hPtr = Tcl_NextHashEntry(&search); } Tcl_MutexUnlock(&fnt_mutex); *count = 0; /* fallback for "fixed" */ | | | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | nmatch++; } hPtr = Tcl_NextHashEntry(&search); } Tcl_MutexUnlock(&fnt_mutex); *count = 0; /* fallback for "fixed" */ if ((nmatch == 0) && (strcmp(name, "fixed") == 0)) { const char *fbfont = "-unknown-dejavu sans mono-bold-r-normal-*-14-*-*-*-*-*-ucs-4"; Tcl_DStringAppend(&ds, fbfont, -1); Tcl_DStringAppend(&ds, "\0", 1); nmatch++; } |
︙ | ︙ | |||
208 209 210 211 212 213 214 | } if (!(p = strchr(++p, '-'))) { return TCL_ERROR; } if (!(p = strchr (++p, '-'))) { return TCL_ERROR; } | | | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | } if (!(p = strchr(++p, '-'))) { return TCL_ERROR; } if (!(p = strchr (++p, '-'))) { return TCL_ERROR; } if (!(p = XftGetInt (++p, &size)) || (size < 0)) { return TCL_ERROR; } hPtr = Tcl_FirstHashEntry(&file_face_hash, &search); while (hPtr != NULL) { ghash = (GlyphIndexHash *) Tcl_GetHashValue(hPtr); if (Tcl_StringCaseMatch(xlfd, ghash->xlfdPattern, 1)) { ffKey = (FileFaceKey *) Tcl_GetHashKey(&file_face_hash, hPtr); |
︙ | ︙ | |||
240 241 242 243 244 245 246 | if (aliases != NULL) { int i; for (i = 0; aliases[i] != NULL; i++) { Tcl_DStringSetLength(&ds, 0); Tcl_DStringAppend(&ds, "-unknown-", -1); Tcl_DStringAppend(&ds, aliases[i], -1); | | | | | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | if (aliases != NULL) { int i; for (i = 0; aliases[i] != NULL; i++) { Tcl_DStringSetLength(&ds, 0); Tcl_DStringAppend(&ds, "-unknown-", -1); Tcl_DStringAppend(&ds, aliases[i], -1); if ((weight[0] == 'b') || (weight[0] == 'B')) { Tcl_DStringAppend(&ds, "-bold", -1); } else { Tcl_DStringAppend(&ds, "-normal", -1); } if ((slant[0] == 'i') || (slant[0] == 'I') || (slant[0] == 'o') || (slant[0] == 'O')) { Tcl_DStringAppend(&ds, "-o", -1); } else { Tcl_DStringAppend(&ds, "-r", -1); } Tcl_DStringAppend(&ds, "-normal-*-*-*-*-*-*-*-ucs-4", -1); hPtr = Tcl_FirstHashEntry(&file_face_hash, &search); while (hPtr != NULL) { |
︙ | ︙ | |||
707 708 709 710 711 712 713 | static unsigned long SdlTkReadFTStream(FT_Stream ftstr, unsigned long offs, unsigned char *buf, unsigned long count) { unsigned long ret = 0; | | | | 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 | static unsigned long SdlTkReadFTStream(FT_Stream ftstr, unsigned long offs, unsigned char *buf, unsigned long count) { unsigned long ret = 0; if (ftstr->descriptor.pointer == NULL) { Tcl_Channel chan; chan = Tcl_OpenFileChannel(NULL, (char *) ftstr->pathname.pointer, "r", 0); if (chan) { Tcl_SetChannelOption(NULL, chan, "-encoding", "binary"); Tcl_SetChannelOption(NULL, chan, "-translation", "binary"); ftstr->descriptor.pointer = (void *) chan; } } if ((ftstr->descriptor.pointer != NULL) && count) { Tcl_WideInt wOffs; int n; wOffs = offs; wOffs = Tcl_Seek((Tcl_Channel) ftstr->descriptor.pointer, wOffs, SEEK_SET); if (wOffs == -1) { |
︙ | ︙ | |||
743 744 745 746 747 748 749 | static void SdlTkCloseFTStream(FT_Stream ftstr) { if (!ftstr) { return; } | | | | | 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | static void SdlTkCloseFTStream(FT_Stream ftstr) { if (!ftstr) { return; } if (ftstr->descriptor.pointer != NULL) { Tcl_Close(NULL, (Tcl_Channel) ftstr->descriptor.pointer); ftstr->descriptor.pointer = NULL; } ftstr->pathname.pointer = NULL; ckfree((char *) ftstr); } void * SdlTkGetFTStream(const char *pathname, int size) { FT_Stream ftstr = (FT_Stream) ckalloc(sizeof (*ftstr)); |
︙ | ︙ | |||
804 805 806 807 808 809 810 | Tcl_DStringFree(&ds); if (ret == TCL_OK) { fileName = (char *) XInternAtom(SdlTkX.display, fstorage.file, False); } if (nameRet != NULL) { *nameRet = fileName; } | | | > > > | 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 | Tcl_DStringFree(&ds); if (ret == TCL_OK) { fileName = (char *) XInternAtom(SdlTkX.display, fstorage.file, False); } if (nameRet != NULL) { *nameRet = fileName; } if ((filesizeRet != NULL) && (fileName != NULL)) { struct stat stbuf; *filesizeRet = 0; if (Tcl_Stat(fileName, &stbuf) == 0) { *filesizeRet = stbuf.st_size; } } if ((fileName != NULL) && (fstorage.file != fileName)) { ckfree(fstorage.file); } if (fstorage.xlfd != NULL) { ckfree(fstorage.xlfd); } return ret == TCL_OK; } int SdlTkFontInit(Tcl_Interp *interp) { |
︙ | ︙ | |||
903 904 905 906 907 908 909 | fterr = FT_Open_Face(ftlib, &ftarg, k, &face); if (fterr != 0) { continue; } if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) { goto nextface; } | | | | | > < < < > < > < > | > | > > | < > | < | 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 | fterr = FT_Open_Face(ftlib, &ftarg, k, &face); if (fterr != 0) { continue; } if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) { goto nextface; } if ((face->num_charmaps < 1) || !face->charmap || (face->charmap->encoding != FT_ENCODING_UNICODE)) { goto nextface; } memset(&ffKey, '\0', sizeof (ffKey)); ffKey.file = XInternAtom(SdlTkX.display, argv[i], False); ffKey.index = k; hPtr = Tcl_CreateHashEntry(&file_face_hash, (char *) &ffKey, &isNew); if (isNew) { GlyphIndexHash *ghash; Tcl_DString ds, ds2; char *style, *weight; ghash = (GlyphIndexHash *) ckalloc(sizeof (GlyphIndexHash)); Tcl_InitHashTable(&ghash->hash, TCL_ONE_WORD_KEYS); ghash->refCnt = 1; ghash->familyName = ckalloc(strlen(face->family_name) + 24); strcpy(ghash->familyName, face->family_name); ghash->faceFlags = face->face_flags; ghash->styleFlags = face->style_flags; Tcl_DStringInit(&ds); Tcl_DStringInit(&ds2); if (face->style_name != NULL) { Tcl_DStringAppend(&ds2, face->style_name, -1); style = Tcl_DStringValue(&ds2); while (*style) { *style = tolower((UCHAR(*style))); ++style; } } weight = "-normal"; style = Tcl_DStringValue(&ds2); if (strstr(style, "black")) { strcat(ghash->familyName, " Black"); } else if (strstr(style, "light")) { strcat(ghash->familyName, " Light"); } else if (strstr(style, "thin")) { strcat(ghash->familyName, " Thin"); } else if (strstr(style, "medium")) { strcat(ghash->familyName, " Medium"); } if (ghash->styleFlags & FT_STYLE_FLAG_BOLD) { weight = "-bold"; } Tcl_DStringAppend(&ds, "-*-", -1); Tcl_DStringAppend(&ds, ghash->familyName, -1); Tcl_DStringAppend(&ds, weight, -1); if (ghash->styleFlags & FT_STYLE_FLAG_ITALIC) { Tcl_DStringAppend(&ds, "-o", -1); } else { Tcl_DStringAppend(&ds, "-r", -1); } Tcl_DStringAppend(&ds, "-*-*-*-*-*-*-*-*-ucs-4", -1); ghash->xlfdPattern = ckalloc(Tcl_DStringLength(&ds) + 1); |
︙ | ︙ | |||
1046 1047 1048 1049 1050 1051 1052 | fterr = FT_Open_Face(ftlib, &ftarg, k, &face); if (fterr != 0) { continue; } if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) { goto nextface; } | | | | 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | fterr = FT_Open_Face(ftlib, &ftarg, k, &face); if (fterr != 0) { continue; } if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) { goto nextface; } if ((face->num_charmaps < 1) || !face->charmap || (face->charmap->encoding != FT_ENCODING_UNICODE)) { goto nextface; } memset(&ffKey, '\0', sizeof (ffKey)); ffKey.file = XInternAtom(SdlTkX.display, fileName, False); ffKey.index = k; hPtr = Tcl_CreateHashEntry(&file_face_hash, (char *) &ffKey, &isNew); if (isNew) { |
︙ | ︙ |
Changes to tests/bevel.tcl.
︙ | ︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | regions to exercise the bevel-drawing facilities of DisplayLineBackground. The letters have the following significance: r - should appear raised u - should appear raised and also slightly offset vertically s - should appear sunken n - preceding relief should extend right to end of line. * - should appear "normal" x - extra long lines to allow horizontal scrolling. Try scrolling the text both vertically and horizontally to be sure that the bevels are still drawn correctly. | > | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | regions to exercise the bevel-drawing facilities of DisplayLineBackground. The letters have the following significance: r - should appear raised u - should appear raised and also slightly offset vertically s - should appear sunken S - should appear solid n - preceding relief should extend right to end of line. * - should appear "normal" x - extra long lines to allow horizontal scrolling. Try scrolling the text both vertically and horizontally to be sure that the bevels are still drawn correctly. |
︙ | ︙ | |||
121 122 123 124 125 126 127 | .t.t insert end rrrrr r1 } .t.t insert end \n .t.t insert end rrr r1 .t.t insert end ***** .t.t insert end rrr r1 | | | | | | > > > > > > > > > > > > > > | > > > > > | > | 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 | .t.t insert end rrrrr r1 } .t.t insert end \n .t.t insert end rrr r1 .t.t insert end ***** .t.t insert end rrr r1 font configure TkFixedFont -size 20 .t.t tag configure sol100 -relief solid -borderwidth 100 \ -foreground red -font TkFixedFont .t.t tag configure sol12 -relief solid -borderwidth 12 \ -foreground red -font TkFixedFont .t.t tag configure big -font TkFixedFont set ind [.t.t index end] .t.t insert end "\n\nBorders do not leak on the neighbour chars" .t.t insert end "\nOnly \"S\" is on dark background" .t.t insert end { xxx x} {} S sol100 {x xxx} .t.t insert end "\n\nA very thick border grows toward the inside of the tagged area only" .t.t insert end "\nOnly \"S\" is on dark background" .t.t insert end { xxxx} {} SSSSS sol100 {xxxx x} {} SSSSSSSSSSSSSSSSSS sol100 {x xxx} {} SSSSSSSSS sol100 xxxx {} } .t.t insert end "\n\nA thinner border is continuous" .t.t insert end { xxxx} {} SSSSS sol12 {xxxx x} {} SSSSSSSSSSSSSSSSSS sol12 {x xxx} {} SSSSSSSSS sol12 xxxx {} } .t.t tag add big $ind end |
Changes to unix/configure.
︙ | ︙ | |||
6674 6675 6676 6677 6678 6679 6680 | if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' if test "${SHLIB_SUFFIX}" = ".dll"; then | | | 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 | if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' if test "${SHLIB_SUFFIX}" = ".dll"; then INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)";if test -f $(LIB_FILE).a; then $(INSTALL_DATA) $(LIB_FILE).a "$(LIB_INSTALL_DIR)"; fi;' DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" else INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' fi |
︙ | ︙ |
Changes to unix/tcl.m4.
︙ | ︙ | |||
2046 2047 2048 2049 2050 2051 2052 | UNSHARED_LIB_SUFFIX='${VERSION}.a']) DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [ LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ | | | 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 | UNSHARED_LIB_SUFFIX='${VERSION}.a']) DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [ LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)";if test -f $(LIB_FILE).a; then $(INSTALL_DATA) $(LIB_FILE).a "$(LIB_INSTALL_DIR)"; fi;' DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" ], [ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' ]) ], [ LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} |
︙ | ︙ |