diff -uNr tkdesk-1.2.orig/Makefile.in tkdesk-1.2/Makefile.in --- tkdesk-1.2.orig/Makefile.in Mon Nov 15 07:07:45 1999 +++ tkdesk-1.2/Makefile.in Mon Aug 28 15:59:10 2000 @@ -34,13 +34,13 @@ SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TKDESK_LIBRARY) # Directory where tkdesksh will look for its library scripts: -SCRIPT_SEARCH_DIR = $(SCRIPT_INSTALL_DIR) +SCRIPT_SEARCH_DIR = $(TKDESK_LIBRARY) # Directory in which to install the program tkdesksh: BIN_INSTALL_DIR = $(INSTALL_ROOT)@bindir@ # Directory where tkdesksh will look for the tkdesk script: -BIN_SEARCH_DIR = $(BIN_INSTALL_DIR) +BIN_SEARCH_DIR = @bindir@ # Top-level directory in which to install manual entries: MAN_INSTALL_DIR = $(INSTALL_ROOT)@mandir@ diff -uNr tkdesk-1.2.orig/blt/bltTkInt.h tkdesk-1.2/blt/bltTkInt.h --- tkdesk-1.2.orig/blt/bltTkInt.h Mon Nov 15 07:07:45 1999 +++ tkdesk-1.2/blt/bltTkInt.h Mon Aug 28 18:00:45 2000 @@ -35,6 +35,36 @@ int slant; /* Slant flag; see below for def'n. */ int underline; /* Non-zero for underline font. */ int overstrike; /* Non-zero for overstrike font. */ +#ifdef KANJI + int setwidth; /* setwidth field. */ + Tk_Uid foundry; /* font foundry field. */ + Tk_Uid charset; /* font charset field. */ + int fontType; /* One of the follows: + * TK_FONT_GENERIC + * TK_FONT_2BYTES + * TK_FONT_OTHER + * TK_FONT_COMPOUND */ +/* + * This macro only can be used in file that include this header. + * Otherwise, use convinient functions. + */ +#define Tk_FontType(tkfont) (((TkFont *)tkfont)->fa.fontType) +#define Tk_FontSize(tkfont) (((TkFont *)tkfont)->fa.pointsize) +#define Tk_FontFamily(tkfont) (((TkFont *)tkfont)->fa.family) +#define Tk_FontCharset(tkfont) (((TkFont *)tkfont)->fa.charset) +#define Tk_FontFoundry(tkfont) (((TkFont *)tkfont)->fa.foundry) + Tk_Uid asciiFontName; + Tk_Uid kanjiFontName; /* if fontType == TK_FONT_COMPOUND, + * use these names. */ + struct TkFontAttributes *asciiFaPtr; + struct TkFontAttributes *kanjiFaPtr; + /* if fontType == TK_FONT_COMPOUND, + * use these attributes. malloc'd. */ + double pointAdjust; /* Point size adjustment between kanji + * font and ascii font. + * (ascii size) / (kanji size). */ +#define Tk_FontPointAdjust(tkfont) (((TkFont *)tkfont)->fa.pointAdjust) +#endif /* KANJI */ } TkFontAttributes; typedef struct TkFontMetrics { @@ -105,6 +135,11 @@ * chained together off a single entry in * a hash table. */ #endif /* TK_VERSION_NUMBER >= 8.1.0 */ +#ifdef KANJI + struct TkFont *asciiFontPtr; + struct TkFont *kanjiFontPtr;/* if fa.fontType == TK_FONT_COMPOUND, + * use these pointer. */ +#endif /* KANJI */ } TkFont; /* diff -uNr tkdesk-1.2.orig/blt/bltWindow.c tkdesk-1.2/blt/bltWindow.c --- tkdesk-1.2.orig/blt/bltWindow.c Mon Nov 15 07:07:45 1999 +++ tkdesk-1.2/blt/bltWindow.c Mon Aug 28 15:59:10 2000 @@ -528,6 +528,9 @@ Atom timestampAtom; /* Atom for TIMESTAMP. */ Atom textAtom; /* Atom for TEXT. */ Atom compoundTextAtom; /* Atom for COMPOUND_TEXT. */ +#ifdef KANJI + Atom cStringAtom; /* Atom for C_STRING. */ +#endif /* KANJI */ Atom applicationAtom; /* Atom for TK_APPLICATION. */ Atom windowAtom; /* Atom for TK_WINDOW. */ Atom clipboardAtom; /* Atom for CLIPBOARD. */ @@ -711,11 +714,105 @@ * Tk applications using it. */ #endif /* TK_MAJOR_VERSION > 4 */ - +#ifdef TK_USE_INPUT_METHODS +#ifdef XIM_IMPROVE + XIMStyles *imSupportedStyle; + unsigned long imIcValues; /* Or'd value of IC attributes supported by + this IM. */ + char *modifiers; /* Hint for specific support of the input + * method. Malloc'd. */ + XIC lastFocusedIC; /* IC that currently focused. */ +#ifdef XNDestroyCallback + XIMCallback destroyCallback; +#endif /* XNDestroyCallback */ +#endif /* XIM_IMPROVE */ +#endif /* TK_USE_INPUT_METHODS */ } TkDisplay; #endif /* TK_VERSION_NUMBER >= _VERSION(8,1,0) */ +#if 1 +#ifdef TK_USE_INPUT_METHODS +#ifdef XIM_IMPROVE +/* Struct keeping input context attributes */ +typedef struct { + int icState; +#define IC_NEVER_USED 0x0000 +#define IC_USED_AT_LEAST_ONETIME 0x0001 +#define IC_ASSOC_WIN_DELETED 0x0002 +#define IC_DESTROYED 0x0004 +#define IC_IN_USE_RITE_NOW 0x0008 +#define SetICState(icAttr, flag) (icAttr)->icState |= (flag) +#define ResetICState(icAttr, flag) (icAttr)->icState &= ~(flag) +#define IsSetICState(icAttr, flag) (((icAttr)->icState & (flag)) == (flag)) + + Tk_Uid style; + XIMStyle styleVal; + + Tk_Uid peArea; + XRectangle peAreaVal; + + Tk_Uid stArea; + XRectangle stAreaVal; + + /* Get only */ + Tk_Uid stPrefArea; + XRectangle stPrefAreaVal; + + Tk_Uid spot; + XPoint spotVal; + + Tk_Uid font; /* A font name in Tk's world. */ + Tk_Uid fontlist; /* A fontset (XFontSet) name of below, in X's world. */ + XFontSet fontset; + + Tk_Uid fg; + unsigned long fgVal; + + Tk_Uid bg; + unsigned long bgVal; + + int isChanged; +#define IM_NOTHING_CHANGE 0x0000 +#define IM_STYLE_CHANGE 0x0001 +#define IM_PREEDITAREA_CHANGE 0x0002 +#define IM_STATUSAREA_CHANGE 0x0004 +#define IM_SPOT_CHANGE 0x0008 +#define IM_FONT_CHANGE 0x0010 +#define IM_COLOR_CHANGE 0x0020 + + int doPreedit; + int doStatus; + + XIMCallback peCB[4]; +#define IM_PEStartCB 0 +#define IM_PEDoneCB 1 +#define IM_PEDrawCB 2 +#define IM_PECaretCB 3 + XIMCallback stCB[3]; +#define IM_STStartCB 0 +#define IM_STDoneCB 1 +#define IM_STDrawCB 2 + + Tk_Uid callbackCmd; /* tcl script called when above + callback is activated. */ +} TkpICAttribute; + +/* + * Supported IC attributes flags. + */ +#define IM_SUPPORT_NOTHING 0x0000 +#define IM_SUPPORT_PREEDITAREA 0x0001 +#define IM_SUPPORT_STATUSAREA 0x0002 +#define IM_SUPPORT_AREA 0x0004 +#define IM_SUPPORT_AREANEEDED 0x0008 +#define IM_SUPPORT_SPOT 0x0010 +#define IM_SUPPORT_FONT 0x0020 +#define IM_SUPPORT_COLOR 0x0040 + +#endif /* XIM_IMPROVE */ +#endif /* TK_USE_INPUT_METHODS */ +#endif struct TkWindow { Display *display; @@ -755,6 +852,12 @@ ClientData instanceData; #endif TkWindowPrivate *privatePtr; +#ifdef TK_USE_INPUT_METHODS +#ifdef XIM_IMPROVE + TkpICAttribute *icAttr; /* Input context attributes. */ +#endif /* XIM_IMPROVE */ +#endif /* TK_USE_INPUT_METHODS */ + }; #ifdef WIN32 diff -uNr tkdesk-1.2.orig/configure tkdesk-1.2/configure --- tkdesk-1.2.orig/configure Mon Nov 15 07:07:45 1999 +++ tkdesk-1.2/configure Mon Aug 28 15:59:10 2000 @@ -653,7 +653,7 @@ echo $ac_n "checking version of Tcl/Tk""... $ac_c" 1>&6 echo "configure:655: checking version of Tcl/Tk" >&5 echo "$ac_t""$TCL_VERSION/$TK_VERSION" 1>&6 -TCL_VERSIONS_ALLOWED="7.5 7.6 8.0 8.1 8.2" +TCL_VERSIONS_ALLOWED="7.5 7.6 8.0jp 8.1jp 8.2jp 7.5jp 7.6jp" if test -z "`echo $TCL_VERSIONS_ALLOWED | grep $TCL_VERSION`"; then echo echo TkDesk requires Tcl/Tk versions 7.5/4.1, 7.6/4.2., or 8.0. @@ -661,7 +661,7 @@ echo yet supported \(but hopefully will be soon\). exit 1 fi -TK_VERSIONS_ALLOWED="4.1 4.2 8.0 8.1 8.2" +TK_VERSIONS_ALLOWED="4.1 4.2 8.0jp 8.1jp 8.2jp 4.1jp 4.2jp" if test -z "`echo $TK_VERSIONS_ALLOWED | grep $TK_VERSION`"; then echo echo TkDesk requires Tcl/Tk versions 7.5/4.1, 7.6/4.2, or 8.0. diff -uNr tkdesk-1.2.orig/tcldesk/cb_tools/bindings.tcl tkdesk-1.2/tcldesk/cb_tools/bindings.tcl --- tkdesk-1.2.orig/tcldesk/cb_tools/bindings.tcl Mon Nov 15 07:07:47 1999 +++ tkdesk-1.2/tcldesk/cb_tools/bindings.tcl Mon Aug 28 15:59:10 2000 @@ -112,30 +112,13 @@ catch {bind Entry {tkEntryInsert %W \]}} catch {bind Entry {tkEntryInsert %W \\}} catch {bind Entry {tkEntryInsert %W @}} -catch {bind Entry {tkEntryInsert %W µ}} catch {bind Entry {tkEntryInsert %W |}} -catch {bind Entry {tkEntryInsert %W ä}} -catch {bind Entry {tkEntryInsert %W ö}} -catch {bind Entry {tkEntryInsert %W ü}} -catch {bind Entry {tkEntryInsert %W Ä}} -catch {bind Entry {tkEntryInsert %W Ö}} -catch {bind Entry {tkEntryInsert %W Ü}} -catch { - bind Entry { - if {%s == 0} { - tkEntryInsert %W ß - } else { - tkEntryInsert %W \\ - } - } -} # These might need to be commented out when using XKB: catch {bind Entry {tkEntryInsert %W ~}} catch {bind Entry {tkEntryInsert %W `}} catch {bind Entry {tkEntryInsert %W ~}} catch {bind Entry {tkEntryInsert %W `}} -catch {bind Entry {tkEntryInsert %W ´}} catch {bind Entry {tkEntryInsert %W ^}} @@ -153,33 +136,8 @@ tkTextInsert %W \\}} catch {bind Text {cb_Text_change_callback %W insert @; \ tkTextInsert %W @}} -catch {bind Text {cb_Text_change_callback %W insert µ; \ - tkTextInsert %W µ}} catch {bind Text {cb_Text_change_callback %W insert |; \ tkTextInsert %W |}} -catch {bind Text {cb_Text_change_callback %W insert ä; \ - tkTextInsert %W ä}} -catch {bind Text {cb_Text_change_callback %W insert ö; \ - tkTextInsert %W ö}} -catch {bind Text {cb_Text_change_callback %W insert ü; \ - tkTextInsert %W ü}} -catch {bind Text {cb_Text_change_callback %W insert Ä; \ - tkTextInsert %W Ä}} -catch {bind Text {cb_Text_change_callback %W insert Ö; \ - tkTextInsert %W Ö}} -catch {bind Text {cb_Text_change_callback %W insert Ü; \ - tkTextInsert %W Ü}} -catch { - bind Text { - if {%s == 0} { - cb_Text_change_callback %W insert ß - tkTextInsert %W ß - } else { - cb_Text_change_callback %W insert \\ - tkTextInsert %W \\ - } - } -} # These might need to be commented out when using XKB: catch {bind Text {cb_Text_change_callback %W insert ~; \ @@ -190,8 +148,6 @@ tkTextInsert %W ~}} catch {bind Text {cb_Text_change_callback %W insert `; \ tkTextInsert %W `}} -catch {bind Text {cb_Text_change_callback %W insert ´; \ - tkTextInsert %W ´}} catch {bind Text {cb_Text_change_callback %W insert ^; \ tkTextInsert %W ^}} @@ -279,7 +235,6 @@ [bind Text ]" bind Text "cb_Text_change_callback %W insert ; \ [bind Text ]" -bind Text "cb_Text_change_callback %W insert µ; [bind Text ]" bind Text "cb_Text_change_callback %W delete backchar; \ [bind Text ]" bind Text "cb_Text_change_callback %W delete char; \