From d8b3482a413fb0110797b436efc6ff836ef380da Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 7 Sep 2023 13:25:10 +0000 Subject: Add a new command to ttk::treeview to work with detached items --- generic/ttk/ttkTreeview.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 11de5e0..841855e 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -3245,6 +3245,50 @@ static int TreeviewDetachCommand( return TCL_OK; } +/* Is an item detached? The root is never detached. */ +static int IsDetached(Treeview *tv, TreeItem *item) +{ + return item->next == NULL && item->prev == NULL && + item->parent == NULL && item != tv->tree.root; +} + +/* + $tv detached ?$item? -- + * List detached items (in arbitrary order) or query the detached state of + * $item. + */ +static int TreeviewDetachedCommand( + void *recordPtr, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]) +{ + Treeview *tv = (Treeview *)recordPtr; + TreeItem *item; + + if (objc == 2) { + /* List detached items */ + Tcl_HashSearch search; + Tcl_HashEntry *entryPtr = Tcl_FirstHashEntry(tv->tree.items, &search); + Tcl_Obj *objPtr = Tcl_NewObj(); + + while (entryPtr != NULL) { + item = Tcl_GetHashValue(entryPtr); + entryPtr = Tcl_NextHashEntry(&search); + if (IsDetached(tv, item)) { + Tcl_ListObjAppendElement(NULL, objPtr, ItemID(tv, item)); + } + } + TclSetObjResult(interp, objPtr); + return TCL_OK; + } else if (objc == 3) { + /* Query; the root is never reported as detached */ + if (!(item = FindItem(interp, tv, objv[2]))) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(IsDetached(tv, item))); + return TCL_OK; + } else { + Tcl_WrongNumArgs(interp, 2, objv, "?item?"); + return TCL_ERROR; + } +} /* + $tv delete $items -- * Delete each item in $items. * @@ -4353,6 +4397,7 @@ static const Ttk_Ensemble TreeviewCommands[] = { { "configure", TtkWidgetConfigureCommand,0 }, { "delete", TreeviewDeleteCommand,0 }, { "detach", TreeviewDetachCommand,0 }, + { "detached", TreeviewDetachedCommand,0 }, { "drag", TreeviewDragCommand,0 }, { "drop", TreeviewDropCommand,0 }, { "exists", TreeviewExistsCommand,0 }, -- cgit v0.12 From 61424d8266696b46db3d0a1685b6c13519b84bf3 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 7 Sep 2023 13:39:45 +0000 Subject: Add doc and tests --- doc/ttk_treeview.n | 7 +++++++ tests/ttk/treeview.test | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n index 757be86..c819093 100644 --- a/doc/ttk_treeview.n +++ b/doc/ttk_treeview.n @@ -233,6 +233,13 @@ but will not be displayed until that is done. The root item may not be detached. See also: \fBdelete\fR. .TP +\fIpathname \fBdetached \fR?\fIitem\fR? +. +If \fIitem\fR is provided, returns a boolean value indicating whether it is +the name of a detached item (see \fBdetach\fR). Otherwise, returns a list of +all the detached items (in an arbitrary order). The root item is never +detached. +.TP \fIpathname \fBexists \fIitem\fR Returns 1 if the specified \fIitem\fR is present in the tree, 0 otherwise. diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index 5f2cc84..b424dfb 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -191,10 +191,11 @@ test treeview-3.5 "index - exhaustive test" -body { } -result [list 0 1 2 3 4 5 6] test treeview-3.6 "detach" -body { + set before [.tv detached newnode] .tv detach newnode consistencyCheck .tv - .tv children {} -} -result [list newfirstone firstnode anotherone onemore lastnode newlastone] + list [.tv children {}] [.tv detached] $before [.tv detached newnode] +} -result {{newfirstone firstnode anotherone onemore lastnode newlastone} newnode 0 1} # XREF: treeview-2.13 test treeview-3.7 "detach didn't screw up internal links" -body { @@ -229,17 +230,19 @@ test treeview-3.11 "Can't detach root item" -body { } -returnCodes error -result "Cannot detach root item" test treeview-3.12 "Reattach" -body { + set before [.tv detached newnode] .tv move newnode {} end consistencyCheck .tv - .tv children {} -} -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode] + list [.tv children {}] $before [.tv detached newnode] [.tv detached] +} -result {{newfirstone firstnode anotherone onemore lastnode newlastone newnode} 1 0 {}} # Bug # ????? test treeview-3.13 "Re-reattach" -body { + set before [.tv detached newnode] .tv move newnode {} end consistencyCheck .tv - .tv children {} -} -result [list newfirstone firstnode anotherone onemore lastnode newlastone newnode] + list [.tv children {}] $before [.tv detached newnode] +} -result {{newfirstone firstnode anotherone onemore lastnode newlastone newnode} 0 0} catch { .tv insert newfirstone end -id x1 -- cgit v0.12 From 36fce82447349391ad8b5d8f6b3d16ad1847bfee Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 6 Nov 2023 20:46:00 +0000 Subject: Redo [c306fdd1]. --- tests/font.test | 2 +- unix/tkUnixRFont.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/font.test b/tests/font.test index 69d3b15..f112d16 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2339,7 +2339,7 @@ test font-43.1 {FieldSpecified procedure: specified vs. non-specified} -body { } -result [font actual {times 0} -family] -test font-44.1 {TkFontGetPixels: size < 0} -constraints failsOnUbuntu -setup { +test font-44.1 {TkFontGetPixels: size < 0} -setup { set oldscale [tk scaling] } -body { tk scaling 0.5 diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index a295173..dee9abc 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -178,6 +178,7 @@ GetFont( static void GetTkFontAttributes( + Tk_Window tkwin, XftFont *ftFont, TkFontAttributes *faPtr) { @@ -187,12 +188,12 @@ GetTkFontAttributes( double size, ptsize; (void) XftPatternGetString(ftFont->pattern, XFT_FAMILY, 0, familyPtr); - if (XftPatternGetDouble(ftFont->pattern, XFT_SIZE, 0, - &ptsize) == XftResultMatch) { - size = ptsize; - } else if (XftPatternGetDouble(ftFont->pattern, XFT_PIXEL_SIZE, 0, + if (XftPatternGetDouble(ftFont->pattern, XFT_PIXEL_SIZE, 0, &ptsize) == XftResultMatch) { size = -ptsize; + } else if (XftPatternGetDouble(ftFont->pattern, XFT_SIZE, 0, + &ptsize) == XftResultMatch) { + size = ptsize; } else if (XftPatternGetInteger(ftFont->pattern, XFT_PIXEL_SIZE, 0, &pxsize) == XftResultMatch) { size = (double)-pxsize; @@ -214,7 +215,7 @@ GetTkFontAttributes( #endif /* DEBUG_FONTSEL */ faPtr->family = Tk_GetUid(family); - faPtr->size = size; + faPtr->size = TkFontGetPoints(tkwin, size); faPtr->weight = (weight > XFT_WEIGHT_MEDIUM) ? TK_FW_BOLD : TK_FW_NORMAL; faPtr->slant = (slant > XFT_SLANT_ROMAN) ? TK_FS_ITALIC : TK_FS_ROMAN; faPtr->underline = 0; @@ -350,7 +351,7 @@ InitFont( return NULL; } fontPtr->font.fid = XLoadFont(Tk_Display(tkwin), "fixed"); - GetTkFontAttributes(ftFont, &fontPtr->font.fa); + GetTkFontAttributes(tkwin, ftFont, &fontPtr->font.fa); GetTkFontMetrics(ftFont, &fontPtr->font.fm); Tk_DeleteErrorHandler(handler); if (errorFlag) { @@ -675,7 +676,7 @@ TkpGetSubFonts( void TkpGetFontAttrsForChar( - TCL_UNUSED(Tk_Window), /* Window on the font's display */ + Tk_Window tkwin, /* Window on the font's display */ Tk_Font tkfont, /* Font to query */ int c, /* Character of interest */ TkFontAttributes *faPtr) /* Output: Font attributes */ @@ -687,7 +688,7 @@ TkpGetFontAttrsForChar( XftFont *ftFont = GetFont(fontPtr, ucs4, 0.0); /* Actual font used to render the character */ - GetTkFontAttributes(ftFont, faPtr); + GetTkFontAttributes(tkwin, ftFont, faPtr); faPtr->underline = fontPtr->font.fa.underline; faPtr->overstrike = fontPtr->font.fa.overstrike; } -- cgit v0.12 From 4275dd5c1890953223d6e85f5b1c0f77d38690c4 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 6 Nov 2023 20:46:41 +0000 Subject: Redo [4ac7d975]. --- unix/tkUnixRFont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index dee9abc..2c017e2 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -507,7 +507,7 @@ TkpGetFontFromAttributes( if (faPtr->size > 0.0) { XftPatternAddDouble(pattern, XFT_SIZE, faPtr->size); } else if (faPtr->size < 0.0) { - XftPatternAddDouble(pattern, XFT_SIZE, TkFontGetPoints(tkwin, faPtr->size)); + XftPatternAddDouble(pattern, XFT_PIXEL_SIZE, -faPtr->size); } else { XftPatternAddDouble(pattern, XFT_SIZE, 12.0); } -- cgit v0.12 From 41f60ae2ae84d13e88e2355fdc039c2518aeb0d7 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 6 Nov 2023 20:49:40 +0000 Subject: Make font-44.1 more independent of the actual font size available by still checking the same thing (doubling of the font size). --- tests/font.test | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/font.test b/tests/font.test index f112d16..80a0420 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2342,11 +2342,12 @@ test font-43.1 {FieldSpecified procedure: specified vs. non-specified} -body { test font-44.1 {TkFontGetPixels: size < 0} -setup { set oldscale [tk scaling] } -body { + set oldsize [expr {[font actual {times -12} -size] * $oldscale}] tk scaling 0.5 - font actual {times -12} -size + expr {[font actual {times -12} -size] == $oldsize / 0.5} } -cleanup { tk scaling $oldscale -} -result 24 +} -result 1 test font-44.2 {TkFontGetPoints: size >= 0} -constraints {noExceed haveTimes12Font} -setup { set oldscale [tk scaling] } -body { -- cgit v0.12 From 8ce8c470662389474feee053d57e13b0cc8efafa Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 6 Nov 2023 20:52:47 +0000 Subject: Redo [f61a66d8]. --- .github/workflows/linux-build.yml | 1 + .github/workflows/mac-build.yml | 1 + .github/workflows/win-build.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index d594c0c..d332349 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -4,6 +4,7 @@ on: branches: - "main" - "core-8-6-branch" + - "bug-61550f38bf" tags: - "core-**" permissions: diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 6c06a55..0698ea9 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -4,6 +4,7 @@ on: branches: - "main" - "core-8-6-branch" + - "bug-61550f38bf" tags: - "core-**" permissions: diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 75f3a99..a8ee77b 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -4,6 +4,7 @@ on: branches: - "main" - "core-8-6-branch" + - "bug-61550f38bf" tags: - "core-**" permissions: -- cgit v0.12 From e7086b7d4c5351378c88424e43a74aa1b3db2916 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 7 Nov 2023 20:48:50 +0000 Subject: Pixel sizes in font-44.1 must match as integers, therefore round computations. --- tests/font.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/font.test b/tests/font.test index 80a0420..5884334 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2342,9 +2342,9 @@ test font-43.1 {FieldSpecified procedure: specified vs. non-specified} -body { test font-44.1 {TkFontGetPixels: size < 0} -setup { set oldscale [tk scaling] } -body { - set oldsize [expr {[font actual {times -12} -size] * $oldscale}] + set oldsize [expr {round([font actual {times -12} -size] * $oldscale)}] tk scaling 0.5 - expr {[font actual {times -12} -size] == $oldsize / 0.5} + expr {round([font actual {times -12} -size] - $oldsize / 0.5) == 0} } -cleanup { tk scaling $oldscale } -result 1 -- cgit v0.12 From 803981c7b99b5a3d3bb5f988a66b09f149efed18 Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 8 Nov 2023 20:39:31 +0000 Subject: Add temporary debug output to font-44.1 --- tests/font.test | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/font.test b/tests/font.test index 5884334..45d8af6 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2339,15 +2339,21 @@ test font-43.1 {FieldSpecified procedure: specified vs. non-specified} -body { } -result [font actual {times 0} -family] +puts ">>>>>>>>>> font-44.1 starts" test font-44.1 {TkFontGetPixels: size < 0} -setup { set oldscale [tk scaling] } -body { +puts "oldscale: $oldscale" set oldsize [expr {round([font actual {times -12} -size] * $oldscale)}] +puts "font actual {times -12}: [font actual {times -12}]" +puts "oldsize: $oldsize" tk scaling 0.5 +puts "font actual {times -12}: [font actual {times -12}]" expr {round([font actual {times -12} -size] - $oldsize / 0.5) == 0} } -cleanup { tk scaling $oldscale } -result 1 +puts " font-44.1 ends <<<<<<<<<<" test font-44.2 {TkFontGetPoints: size >= 0} -constraints {noExceed haveTimes12Font} -setup { set oldscale [tk scaling] } -body { -- cgit v0.12 From 46f37f765a6fb9c6ceb94797b9cd4081174d2627 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 11 Nov 2023 09:21:50 +0000 Subject: Unbreak the build. --- generic/ttk/ttkTreeview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 841855e..1197932 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -3265,7 +3265,7 @@ static int TreeviewDetachedCommand( if (objc == 2) { /* List detached items */ Tcl_HashSearch search; - Tcl_HashEntry *entryPtr = Tcl_FirstHashEntry(tv->tree.items, &search); + Tcl_HashEntry *entryPtr = Tcl_FirstHashEntry(&tv->tree.items, &search); Tcl_Obj *objPtr = Tcl_NewObj(); while (entryPtr != NULL) { @@ -3275,7 +3275,7 @@ static int TreeviewDetachedCommand( Tcl_ListObjAppendElement(NULL, objPtr, ItemID(tv, item)); } } - TclSetObjResult(interp, objPtr); + Tcl_SetObjResult(interp, objPtr); return TCL_OK; } else if (objc == 3) { /* Query; the root is never reported as detached */ -- cgit v0.12 From a417a924de5d80940b31da2856b812f3ab10eead Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 12 Nov 2023 09:39:34 +0000 Subject: Switch to a floating point approach in font-44.1 --- tests/font.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/font.test b/tests/font.test index 45d8af6..d260dce 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2344,12 +2344,12 @@ test font-44.1 {TkFontGetPixels: size < 0} -setup { set oldscale [tk scaling] } -body { puts "oldscale: $oldscale" - set oldsize [expr {round([font actual {times -12} -size] * $oldscale)}] + set oldsize [expr {-(-12.0 / $oldscale)}] puts "font actual {times -12}: [font actual {times -12}]" puts "oldsize: $oldsize" tk scaling 0.5 puts "font actual {times -12}: [font actual {times -12}]" - expr {round([font actual {times -12} -size] - $oldsize / 0.5) == 0} + expr {([font actual {times -12} -size] / $oldscale * 0.5 - $oldsize) < 0.001} } -cleanup { tk scaling $oldscale } -result 1 -- cgit v0.12 From f0844f86778394bb001df716ca5dea9aee95abec Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 13 Nov 2023 06:40:07 +0000 Subject: Forgot abs() in previous commit. --- tests/font.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/font.test b/tests/font.test index d260dce..a708242 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2349,7 +2349,7 @@ puts "font actual {times -12}: [font actual {times -12}]" puts "oldsize: $oldsize" tk scaling 0.5 puts "font actual {times -12}: [font actual {times -12}]" - expr {([font actual {times -12} -size] / $oldscale * 0.5 - $oldsize) < 0.001} + expr {abs([font actual {times -12} -size] / $oldscale * 0.5 - $oldsize) < 0.001} } -cleanup { tk scaling $oldscale } -result 1 -- cgit v0.12 From c1b1d0c3da843d8afd85d7b168d400057912080b Mon Sep 17 00:00:00 2001 From: csaba Date: Mon, 13 Nov 2023 17:25:43 +0000 Subject: Using the application's TkMainInfo struct for sharing the nbTabsStickBit in a thread-safe manner. Thanks Christian W.! --- generic/tkInt.h | 3 ++- generic/ttk/ttkClamTheme.c | 16 +++++++++++++--- generic/ttk/ttkElements.c | 15 +++++++++++++-- generic/ttk/ttkNotebook.c | 21 +++++++++++---------- win/ttkWinTheme.c | 15 +++++++++++++-- win/ttkWinXPTheme.c | 15 +++++++++++++-- 6 files changed, 65 insertions(+), 20 deletions(-) diff --git a/generic/tkInt.h b/generic/tkInt.h index ec6d243..464ef74 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -723,7 +723,8 @@ typedef struct TkMainInfo { * Tcl's version of [update] after Tk is shut * down, in case it's a Tcl_ObjCmdProc2 */ #endif - + unsigned int ttkNbTabsStickBit; + /* Information used by ttk::notebook. */ } TkMainInfo; /* diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index c618278..e17ee82 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -956,12 +956,12 @@ static const Ttk_ElementOptionSpec NotebookElementOptions[] = { { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *dummy, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; int borderWidth = 2; (void)dummy; (void)elementRecord; @@ -969,6 +969,10 @@ static void TabElementSize( (void)widthPtr; (void)heightPtr; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + *paddingPtr = Ttk_UniformPadding((short)borderWidth); switch (nbTabsStickBit) { default: @@ -991,15 +995,21 @@ static void TabElementDraw( void *dummy, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; + int borderWidth = 2, delta = 0; NotebookElement *tab = (NotebookElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); Display *display = Tk_Display(tkwin); - int borderWidth = 2, delta = 0; int x1, y1, x2, y2; GC gc; const int w = WIN32_XDRAWLINE_HACK; (void)dummy; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { delta = borderWidth; } diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 5e8351e..16296b2 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -1601,20 +1601,25 @@ static const Ttk_ElementOptionSpec TabElementOptions[] = { {0,TK_OPTION_BOOLEAN,0,0} }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *dummy, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { TabElement *tab = (TabElement *)elementRecord; int borderWidth = 1; + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; (void)dummy; (void)widthPtr; (void)heightPtr; Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth); *paddingPtr = Ttk_UniformPadding((short)borderWidth); + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + switch (nbTabsStickBit) { default: case TTK_STICK_S: @@ -1636,6 +1641,8 @@ static void TabElementDraw( void *dummy, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; TabElement *tab = (TabElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); int highlight = 0; @@ -1647,6 +1654,10 @@ static void TabElementDraw( int borderWidth = 1; (void)dummy; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { /* * Draw slightly outside of the allocated parcel, diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 7bb3683..17ccd3a 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -135,14 +135,11 @@ typedef struct Ttk_Padding padding; /* External padding */ } NotebookStyle; -/* Global variable to be set from within NotebookStyleOptions() to one - * of the values TTK_STICK_S, TTK_STICK_N, TTK_STICK_E, or TTK_STICK_W: - */ -Ttk_PositionSpec nbTabsStickBit; - -static void NotebookStyleOptions(Notebook *nb, NotebookStyle *nbstyle) +static void NotebookStyleOptions( + Notebook *nb, NotebookStyle *nbstyle, Tk_Window tkwin) { Tcl_Obj *objPtr; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; nbstyle->tabPosition = TTK_PACK_TOP | TTK_STICK_W; if ((objPtr = Ttk_QueryOption(nb->core.layout, "-tabposition", 0)) != 0) { @@ -164,9 +161,12 @@ static void NotebookStyleOptions(Notebook *nb, NotebookStyle *nbstyle) TtkGetLabelAnchorFromObj(NULL, objPtr, &nbstyle->tabPlacement); } - /* Save the stick bit in the global variable nbTabsStickBit + /* Save the stick bit for later. One of the values + * TTK_STICK_S, TTK_STICK_N, TTK_STICK_E, or TTK_STICK_W: */ - nbTabsStickBit = (nbstyle->tabPlacement & 0x0f); + if (mainInfoPtr != NULL) { + mainInfoPtr->ttkNbTabsStickBit = (nbstyle->tabPlacement & 0x0f); + } /* Compute tabOrient as function of tabPlacement: */ @@ -395,6 +395,7 @@ static void TabrowSize( static int NotebookSize(void *clientData, int *widthPtr, int *heightPtr) { Notebook *nb = (Notebook *)clientData; + Tk_Window nbwin = nb->core.tkwin; NotebookStyle nbstyle; Ttk_Padding padding; Ttk_Element clientNode = Ttk_FindElement(nb->core.layout, "client"); @@ -403,7 +404,7 @@ static int NotebookSize(void *clientData, int *widthPtr, int *heightPtr) tabrowWidth = 0, tabrowHeight = 0; Tcl_Size i; - NotebookStyleOptions(nb, &nbstyle); + NotebookStyleOptions(nb, &nbstyle, nbwin); /* Compute max requested size of all content windows: */ @@ -553,7 +554,7 @@ static void NotebookDoLayout(void *recordPtr) NotebookStyle nbstyle; Tcl_Size currentIndex = nb->notebook.currentIndex; - NotebookStyleOptions(nb, &nbstyle); + NotebookStyleOptions(nb, &nbstyle, nbwin); /* Notebook internal padding: */ diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index f914cf7..7ce9024 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -738,8 +738,6 @@ static const Ttk_ElementOptionSpec TabElementOptions[] = { {0,TK_OPTION_BOOLEAN,0,0} }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( TCL_UNUSED(void *), void *elementRecord, @@ -750,9 +748,16 @@ static void TabElementSize( { TabElement *tab = (TabElement *)elementRecord; int borderWidth = 1; + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth); *paddingPtr = Ttk_UniformPadding((short)borderWidth); + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + switch (nbTabsStickBit) { default: case TTK_STICK_S: @@ -778,6 +783,8 @@ static void TabElementDraw( Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; TabElement *tab = (TabElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); XPoint pts[6]; @@ -786,6 +793,10 @@ static void TabElementDraw( Display *disp = Tk_Display(tkwin); int borderWidth = 1; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { /* * Draw slightly outside of the allocated parcel, diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 358726b..d64a359 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -726,8 +726,6 @@ static const Ttk_ElementSpec PbarElementSpec = * we can use the same statemap no matter what the partId. */ -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *clientData, void *elementRecord, @@ -736,6 +734,13 @@ static void TabElementSize( int *heightPtr, Ttk_Padding *paddingPtr) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + GenericElementSize(clientData, elementRecord, tkwin, widthPtr, heightPtr, paddingPtr); @@ -765,11 +770,17 @@ static void TabElementDraw( Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; ElementData *elementData = (ElementData *)clientData; int partId = elementData->info->partId; int isSelected = (state & TTK_STATE_SELECTED); int stateId = Ttk_StateTableLookup(elementData->info->statemap, state); + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + /* * Correct the members of b if needed */ -- cgit v0.12 From 77f93393c12a891b1f70d1d192302b41fe82a5a8 Mon Sep 17 00:00:00 2001 From: csaba Date: Mon, 13 Nov 2023 17:26:02 +0000 Subject: Using the application's TkMainInfo struct for sharing the nbTabsStickBit in a thread-safe manner. Thanks Christian W.! --- generic/tkInt.h | 2 ++ generic/ttk/ttkClamTheme.c | 16 +++++++++++++--- generic/ttk/ttkElements.c | 15 +++++++++++++-- generic/ttk/ttkNotebook.c | 21 +++++++++++---------- win/ttkWinTheme.c | 15 +++++++++++++-- win/ttkWinXPTheme.c | 15 +++++++++++++-- 6 files changed, 65 insertions(+), 19 deletions(-) diff --git a/generic/tkInt.h b/generic/tkInt.h index e31bc1b..0742563 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -693,6 +693,8 @@ typedef struct TkMainInfo { /* Saved Tcl [update] command, used to restore * Tcl's version of [update] after Tk is shut * down */ + unsigned int ttkNbTabsStickBit; + /* Information used by ttk::notebook. */ } TkMainInfo; /* diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index 9042770..1081c4b 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -850,12 +850,12 @@ static Ttk_ElementOptionSpec NotebookElementOptions[] = { { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *dummy, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; int borderWidth = 2; (void)dummy; (void)elementRecord; @@ -863,6 +863,10 @@ static void TabElementSize( (void)widthPtr; (void)heightPtr; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + *paddingPtr = Ttk_UniformPadding((short)borderWidth); switch (nbTabsStickBit) { default: @@ -885,15 +889,21 @@ static void TabElementDraw( void *dummy, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; + int borderWidth = 2, delta = 0; NotebookElement *tab = (NotebookElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); Display *display = Tk_Display(tkwin); - int borderWidth = 2, delta = 0; int x1, y1, x2, y2; GC gc; const int w = WIN32_XDRAWLINE_HACK; (void)dummy; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { delta = borderWidth; } diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 61b73ce..2520ced 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -1106,17 +1106,22 @@ static Ttk_ElementOptionSpec TabElementOptions[] = { {0,0,0,0} }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { TabElement *tab = (TabElement *)elementRecord; int borderWidth = 1; + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth); *paddingPtr = Ttk_UniformPadding((short)borderWidth); + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + switch (nbTabsStickBit) { default: case TTK_STICK_S: @@ -1138,6 +1143,8 @@ static void TabElementDraw( void *clientData, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; TabElement *tab = (TabElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); XPoint pts[6]; @@ -1145,6 +1152,10 @@ static void TabElementDraw( Display *disp = Tk_Display(tkwin); int borderWidth = 1; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { /* * Draw slightly outside of the allocated parcel, diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 02a5546..600eca9 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -136,14 +136,11 @@ typedef struct Ttk_Padding padding; /* External padding */ } NotebookStyle; -/* Global variable to be set from within NotebookStyleOptions() to one - * of the values TTK_STICK_S, TTK_STICK_N, TTK_STICK_E, or TTK_STICK_W: - */ -Ttk_PositionSpec nbTabsStickBit; - -static void NotebookStyleOptions(Notebook *nb, NotebookStyle *nbstyle) +static void NotebookStyleOptions( + Notebook *nb, NotebookStyle *nbstyle, Tk_Window tkwin) { Tcl_Obj *objPtr; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; nbstyle->tabPosition = TTK_PACK_TOP | TTK_STICK_W; if ((objPtr = Ttk_QueryOption(nb->core.layout, "-tabposition", 0)) != 0) { @@ -165,9 +162,12 @@ static void NotebookStyleOptions(Notebook *nb, NotebookStyle *nbstyle) TtkGetLabelAnchorFromObj(NULL, objPtr, &nbstyle->tabPlacement); } - /* Save the stick bit in the global variable nbTabsStickBit + /* Save the stick bit for later. One of the values + * TTK_STICK_S, TTK_STICK_N, TTK_STICK_E, or TTK_STICK_W: */ - nbTabsStickBit = (nbstyle->tabPlacement & 0x0f); + if (mainInfoPtr != NULL) { + mainInfoPtr->ttkNbTabsStickBit = (nbstyle->tabPlacement & 0x0f); + } /* Compute tabOrient as function of tabPlacement: */ @@ -395,6 +395,7 @@ static void TabrowSize( static int NotebookSize(void *clientData, int *widthPtr, int *heightPtr) { Notebook *nb = (Notebook *)clientData; + Tk_Window nbwin = nb->core.tkwin; NotebookStyle nbstyle; Ttk_Padding padding; Ttk_Element clientNode = Ttk_FindElement(nb->core.layout, "client"); @@ -403,7 +404,7 @@ static int NotebookSize(void *clientData, int *widthPtr, int *heightPtr) tabrowWidth = 0, tabrowHeight = 0; int i; - NotebookStyleOptions(nb, &nbstyle); + NotebookStyleOptions(nb, &nbstyle, nbwin); /* Compute max requested size of all content windows: */ @@ -553,7 +554,7 @@ static void NotebookDoLayout(void *recordPtr) NotebookStyle nbstyle; int currentIndex = nb->notebook.currentIndex; - NotebookStyleOptions(nb, &nbstyle); + NotebookStyleOptions(nb, &nbstyle, nbwin); /* Notebook internal padding: */ diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index 46be6f0..e797206 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -658,17 +658,22 @@ static const Ttk_ElementOptionSpec TabElementOptions[] = { {0,TK_OPTION_BOOLEAN,0,0} }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { TabElement *tab = (TabElement *)elementRecord; int borderWidth = 1; + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth); *paddingPtr = Ttk_UniformPadding((short)borderWidth); + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + switch (nbTabsStickBit) { default: case TTK_STICK_S: @@ -690,6 +695,8 @@ static void TabElementDraw( void *clientData, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; TabElement *tab = (TabElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); XPoint pts[6]; @@ -697,6 +704,10 @@ static void TabElementDraw( Display *disp = Tk_Display(tkwin); int borderWidth = 1; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { /* * Draw slightly outside of the allocated parcel, diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index cfa6bf4..3593c9a 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -728,12 +728,17 @@ static Ttk_ElementSpec PbarElementSpec = * we can use the same statemap no matter what the partId. */ -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + GenericElementSize(clientData, elementRecord, tkwin, widthPtr, heightPtr, paddingPtr); @@ -759,11 +764,17 @@ static void TabElementDraw( void *clientData, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; ElementData *elementData = (ElementData *)clientData; int partId = elementData->info->partId; int isSelected = (state & TTK_STATE_SELECTED); int stateId = Ttk_StateTableLookup(elementData->info->statemap, state); + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + /* * Correct the members of b if needed */ -- cgit v0.12 From 29377ce482568009ea57aa8c29955df95e9c066a Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 13 Nov 2023 21:52:13 +0000 Subject: Reintroduce rounding in font-44.1 --- tests/font.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/font.test b/tests/font.test index a708242..a1bf9b8 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2349,7 +2349,7 @@ puts "font actual {times -12}: [font actual {times -12}]" puts "oldsize: $oldsize" tk scaling 0.5 puts "font actual {times -12}: [font actual {times -12}]" - expr {abs([font actual {times -12} -size] / $oldscale * 0.5 - $oldsize) < 0.001} + expr {abs(round([font actual {times -12} -size] / $oldscale * 0.5) - round($oldsize)) == 0} } -cleanup { tk scaling $oldscale } -result 1 -- cgit v0.12 From 37887ffb2c8e05dd5c9f04ae5deb8e9e4cf6ce89 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 14 Nov 2023 04:44:32 +0000 Subject: Remove useless abs() in font-44.1 --- tests/font.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/font.test b/tests/font.test index a1bf9b8..ece49d7 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2349,7 +2349,7 @@ puts "font actual {times -12}: [font actual {times -12}]" puts "oldsize: $oldsize" tk scaling 0.5 puts "font actual {times -12}: [font actual {times -12}]" - expr {abs(round([font actual {times -12} -size] / $oldscale * 0.5) - round($oldsize)) == 0} + expr {round([font actual {times -12} -size] / $oldscale * 0.5) - round($oldsize) == 0} } -cleanup { tk scaling $oldscale } -result 1 -- cgit v0.12 From 5bf51441dc9e76798a384cffcec208e3db3a2962 Mon Sep 17 00:00:00 2001 From: csaba Date: Tue, 14 Nov 2023 18:34:58 +0000 Subject: Using the application's TkMainInfo struct for sharing the nbTabsStickBit in a thread-safe manner. Thanks Christian W.! --- generic/tkInt.h | 3 ++- generic/ttk/ttkClamTheme.c | 37 ++++++++++++++++++++++--------------- generic/ttk/ttkElements.c | 15 +++++++++++++-- generic/ttk/ttkNotebook.c | 21 +++++++++++---------- win/ttkWinTheme.c | 15 +++++++++++++-- win/ttkWinXPTheme.c | 15 +++++++++++++-- 6 files changed, 74 insertions(+), 32 deletions(-) diff --git a/generic/tkInt.h b/generic/tkInt.h index ec6d243..464ef74 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -723,7 +723,8 @@ typedef struct TkMainInfo { * Tcl's version of [update] after Tk is shut * down, in case it's a Tcl_ObjCmdProc2 */ #endif - + unsigned int ttkNbTabsStickBit; + /* Information used by ttk::notebook. */ } TkMainInfo; /* diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index 70d1938..e17ee82 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -545,7 +545,7 @@ static const Ttk_ElementSpec IndicatorElementSpec = { typedef struct { Tcl_Obj *lightColorObj; Tcl_Obj *borderColorObj; - Tcl_Obj *gripCountObj; + Tcl_Obj *gripSizeObj; } GripElement; static const Ttk_ElementOptionSpec GripElementOptions[] = { @@ -553,8 +553,8 @@ static const Ttk_ElementOptionSpec GripElementOptions[] = { offsetof(GripElement,lightColorObj), LIGHT_COLOR }, { "-bordercolor", TK_OPTION_COLOR, offsetof(GripElement,borderColorObj), DARKEST_COLOR }, - { "-gripcount", TK_OPTION_PIXELS, - offsetof(GripElement,gripCountObj), "5" }, + { "-gripsize", TK_OPTION_PIXELS, + offsetof(GripElement,gripSizeObj), "7.5p" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; @@ -567,8 +567,7 @@ static void GripElementSize( int gripSize = 0; (void)paddingPtr; - Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize); - gripSize *= 2; + Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = gripSize; } else { @@ -589,8 +588,7 @@ static void GripElementDraw( int i; (void)state; - Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize); - gripSize *= 2; + Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize); if (orient == TTK_ORIENT_HORIZONTAL) { int x = b.x + (b.width - gripSize) / 2; @@ -633,7 +631,7 @@ typedef struct { /* Common element record for scrollbar elements */ Tcl_Obj *darkColorObj; Tcl_Obj *arrowColorObj; Tcl_Obj *arrowSizeObj; - Tcl_Obj *gripCountObj; + Tcl_Obj *gripSizeObj; Tcl_Obj *sliderlengthObj; } ScrollbarElement; @@ -654,8 +652,8 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = { offsetof(ScrollbarElement,arrowColorObj), "#000000" }, { "-arrowsize", TK_OPTION_PIXELS, offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) }, - { "-gripcount", TK_OPTION_PIXELS, - offsetof(ScrollbarElement,gripCountObj), "5" }, + { "-gripsize", TK_OPTION_PIXELS, + offsetof(ScrollbarElement,gripSizeObj), "7.5p" }, { "-sliderlength", TK_OPTION_PIXELS, offsetof(ScrollbarElement,sliderlengthObj), "30" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } @@ -720,8 +718,7 @@ static void ThumbElementDraw( * Draw grip: */ TtkGetOrientFromObj(NULL, sb->orientObj, &orient); - Tk_GetPixelsFromObj(NULL, tkwin, sb->gripCountObj, &gripSize); - gripSize *= 2; + Tk_GetPixelsFromObj(NULL, tkwin, sb->gripSizeObj, &gripSize); lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d); darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d); @@ -959,12 +956,12 @@ static const Ttk_ElementOptionSpec NotebookElementOptions[] = { { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *dummy, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; int borderWidth = 2; (void)dummy; (void)elementRecord; @@ -972,6 +969,10 @@ static void TabElementSize( (void)widthPtr; (void)heightPtr; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + *paddingPtr = Ttk_UniformPadding((short)borderWidth); switch (nbTabsStickBit) { default: @@ -994,15 +995,21 @@ static void TabElementDraw( void *dummy, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; + int borderWidth = 2, delta = 0; NotebookElement *tab = (NotebookElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); Display *display = Tk_Display(tkwin); - int borderWidth = 2, delta = 0; int x1, y1, x2, y2; GC gc; const int w = WIN32_XDRAWLINE_HACK; (void)dummy; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { delta = borderWidth; } diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 5e8351e..16296b2 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -1601,20 +1601,25 @@ static const Ttk_ElementOptionSpec TabElementOptions[] = { {0,TK_OPTION_BOOLEAN,0,0} }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *dummy, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { TabElement *tab = (TabElement *)elementRecord; int borderWidth = 1; + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; (void)dummy; (void)widthPtr; (void)heightPtr; Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth); *paddingPtr = Ttk_UniformPadding((short)borderWidth); + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + switch (nbTabsStickBit) { default: case TTK_STICK_S: @@ -1636,6 +1641,8 @@ static void TabElementDraw( void *dummy, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; TabElement *tab = (TabElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); int highlight = 0; @@ -1647,6 +1654,10 @@ static void TabElementDraw( int borderWidth = 1; (void)dummy; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { /* * Draw slightly outside of the allocated parcel, diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 7bb3683..17ccd3a 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -135,14 +135,11 @@ typedef struct Ttk_Padding padding; /* External padding */ } NotebookStyle; -/* Global variable to be set from within NotebookStyleOptions() to one - * of the values TTK_STICK_S, TTK_STICK_N, TTK_STICK_E, or TTK_STICK_W: - */ -Ttk_PositionSpec nbTabsStickBit; - -static void NotebookStyleOptions(Notebook *nb, NotebookStyle *nbstyle) +static void NotebookStyleOptions( + Notebook *nb, NotebookStyle *nbstyle, Tk_Window tkwin) { Tcl_Obj *objPtr; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; nbstyle->tabPosition = TTK_PACK_TOP | TTK_STICK_W; if ((objPtr = Ttk_QueryOption(nb->core.layout, "-tabposition", 0)) != 0) { @@ -164,9 +161,12 @@ static void NotebookStyleOptions(Notebook *nb, NotebookStyle *nbstyle) TtkGetLabelAnchorFromObj(NULL, objPtr, &nbstyle->tabPlacement); } - /* Save the stick bit in the global variable nbTabsStickBit + /* Save the stick bit for later. One of the values + * TTK_STICK_S, TTK_STICK_N, TTK_STICK_E, or TTK_STICK_W: */ - nbTabsStickBit = (nbstyle->tabPlacement & 0x0f); + if (mainInfoPtr != NULL) { + mainInfoPtr->ttkNbTabsStickBit = (nbstyle->tabPlacement & 0x0f); + } /* Compute tabOrient as function of tabPlacement: */ @@ -395,6 +395,7 @@ static void TabrowSize( static int NotebookSize(void *clientData, int *widthPtr, int *heightPtr) { Notebook *nb = (Notebook *)clientData; + Tk_Window nbwin = nb->core.tkwin; NotebookStyle nbstyle; Ttk_Padding padding; Ttk_Element clientNode = Ttk_FindElement(nb->core.layout, "client"); @@ -403,7 +404,7 @@ static int NotebookSize(void *clientData, int *widthPtr, int *heightPtr) tabrowWidth = 0, tabrowHeight = 0; Tcl_Size i; - NotebookStyleOptions(nb, &nbstyle); + NotebookStyleOptions(nb, &nbstyle, nbwin); /* Compute max requested size of all content windows: */ @@ -553,7 +554,7 @@ static void NotebookDoLayout(void *recordPtr) NotebookStyle nbstyle; Tcl_Size currentIndex = nb->notebook.currentIndex; - NotebookStyleOptions(nb, &nbstyle); + NotebookStyleOptions(nb, &nbstyle, nbwin); /* Notebook internal padding: */ diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index f914cf7..7ce9024 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -738,8 +738,6 @@ static const Ttk_ElementOptionSpec TabElementOptions[] = { {0,TK_OPTION_BOOLEAN,0,0} }; -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( TCL_UNUSED(void *), void *elementRecord, @@ -750,9 +748,16 @@ static void TabElementSize( { TabElement *tab = (TabElement *)elementRecord; int borderWidth = 1; + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth); *paddingPtr = Ttk_UniformPadding((short)borderWidth); + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + switch (nbTabsStickBit) { default: case TTK_STICK_S: @@ -778,6 +783,8 @@ static void TabElementDraw( Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; TabElement *tab = (TabElement *)elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, tab->backgroundObj); XPoint pts[6]; @@ -786,6 +793,10 @@ static void TabElementDraw( Display *disp = Tk_Display(tkwin); int borderWidth = 1; + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + if (state & TTK_STATE_SELECTED) { /* * Draw slightly outside of the allocated parcel, diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 358726b..d64a359 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -726,8 +726,6 @@ static const Ttk_ElementSpec PbarElementSpec = * we can use the same statemap no matter what the partId. */ -extern Ttk_PositionSpec nbTabsStickBit; /* see ttkNotebook.c */ - static void TabElementSize( void *clientData, void *elementRecord, @@ -736,6 +734,13 @@ static void TabElementSize( int *heightPtr, Ttk_Padding *paddingPtr) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; + + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + GenericElementSize(clientData, elementRecord, tkwin, widthPtr, heightPtr, paddingPtr); @@ -765,11 +770,17 @@ static void TabElementDraw( Ttk_Box b, unsigned int state) { + Ttk_PositionSpec nbTabsStickBit = TTK_STICK_S; + TkMainInfo *mainInfoPtr = ((TkWindow *) tkwin)->mainPtr; ElementData *elementData = (ElementData *)clientData; int partId = elementData->info->partId; int isSelected = (state & TTK_STATE_SELECTED); int stateId = Ttk_StateTableLookup(elementData->info->statemap, state); + if (mainInfoPtr != NULL) { + nbTabsStickBit = (Ttk_PositionSpec) mainInfoPtr->ttkNbTabsStickBit; + } + /* * Correct the members of b if needed */ -- cgit v0.12 From 94ce89f89b77378ab4b463f1bbef41e3c55f4e97 Mon Sep 17 00:00:00 2001 From: csaba Date: Tue, 14 Nov 2023 19:00:14 +0000 Subject: For now undo the changes related to -gripcount/-gripsize, slipped from trunk into ttkClamTheme.c. --- generic/ttk/ttkClamTheme.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index e17ee82..2a13bb6 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -545,7 +545,7 @@ static const Ttk_ElementSpec IndicatorElementSpec = { typedef struct { Tcl_Obj *lightColorObj; Tcl_Obj *borderColorObj; - Tcl_Obj *gripSizeObj; + Tcl_Obj *gripCountObj; } GripElement; static const Ttk_ElementOptionSpec GripElementOptions[] = { @@ -553,8 +553,8 @@ static const Ttk_ElementOptionSpec GripElementOptions[] = { offsetof(GripElement,lightColorObj), LIGHT_COLOR }, { "-bordercolor", TK_OPTION_COLOR, offsetof(GripElement,borderColorObj), DARKEST_COLOR }, - { "-gripsize", TK_OPTION_PIXELS, - offsetof(GripElement,gripSizeObj), "7.5p" }, + { "-gripcount", TK_OPTION_PIXELS, + offsetof(GripElement,gripCountObj), "5" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } }; @@ -567,7 +567,8 @@ static void GripElementSize( int gripSize = 0; (void)paddingPtr; - Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize); + Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize); + gripSize *= 2; if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = gripSize; } else { @@ -588,7 +589,8 @@ static void GripElementDraw( int i; (void)state; - Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize); + Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize); + gripSize *= 2; if (orient == TTK_ORIENT_HORIZONTAL) { int x = b.x + (b.width - gripSize) / 2; @@ -631,7 +633,7 @@ typedef struct { /* Common element record for scrollbar elements */ Tcl_Obj *darkColorObj; Tcl_Obj *arrowColorObj; Tcl_Obj *arrowSizeObj; - Tcl_Obj *gripSizeObj; + Tcl_Obj *gripCountObj; Tcl_Obj *sliderlengthObj; } ScrollbarElement; @@ -652,8 +654,8 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = { offsetof(ScrollbarElement,arrowColorObj), "#000000" }, { "-arrowsize", TK_OPTION_PIXELS, offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) }, - { "-gripsize", TK_OPTION_PIXELS, - offsetof(ScrollbarElement,gripSizeObj), "7.5p" }, + { "-gripcount", TK_OPTION_PIXELS, + offsetof(ScrollbarElement,gripCountObj), "5" }, { "-sliderlength", TK_OPTION_PIXELS, offsetof(ScrollbarElement,sliderlengthObj), "30" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } @@ -718,7 +720,8 @@ static void ThumbElementDraw( * Draw grip: */ TtkGetOrientFromObj(NULL, sb->orientObj, &orient); - Tk_GetPixelsFromObj(NULL, tkwin, sb->gripSizeObj, &gripSize); + Tk_GetPixelsFromObj(NULL, tkwin, sb->gripCountObj, &gripSize); + gripSize *= 2; lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d); darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d); -- cgit v0.12 From 2396bd5523304d4938cec1aa241067fcd29f8d9a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 15 Nov 2023 13:20:49 +0000 Subject: Fix compiler warning --- win/ttkWinTheme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index 7ce9024..640573e 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -742,8 +742,8 @@ static void TabElementSize( TCL_UNUSED(void *), void *elementRecord, Tk_Window tkwin, - TCL_UNUSED(void *), - TCL_UNUSED(void *), + TCL_UNUSED(int *), + TCL_UNUSED(int *), Ttk_Padding *paddingPtr) { TabElement *tab = (TabElement *)elementRecord; -- cgit v0.12 From 26f4d2bf8b589ae78776a8228188384588ffd24c Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 15 Nov 2023 19:54:27 +0000 Subject: Remove debug outputs. --- tests/font.test | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/font.test b/tests/font.test index ece49d7..d57b998 100644 --- a/tests/font.test +++ b/tests/font.test @@ -2339,21 +2339,15 @@ test font-43.1 {FieldSpecified procedure: specified vs. non-specified} -body { } -result [font actual {times 0} -family] -puts ">>>>>>>>>> font-44.1 starts" test font-44.1 {TkFontGetPixels: size < 0} -setup { set oldscale [tk scaling] } -body { -puts "oldscale: $oldscale" set oldsize [expr {-(-12.0 / $oldscale)}] -puts "font actual {times -12}: [font actual {times -12}]" -puts "oldsize: $oldsize" tk scaling 0.5 -puts "font actual {times -12}: [font actual {times -12}]" expr {round([font actual {times -12} -size] / $oldscale * 0.5) - round($oldsize) == 0} } -cleanup { tk scaling $oldscale } -result 1 -puts " font-44.1 ends <<<<<<<<<<" test font-44.2 {TkFontGetPoints: size >= 0} -constraints {noExceed haveTimes12Font} -setup { set oldscale [tk scaling] } -body { -- cgit v0.12 From 8a1ad98c65dfee7455ba11435fd63de6fbf46c70 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 15 Nov 2023 20:13:09 +0000 Subject: Introduce TCL_ENCODING_PROFILE_TCL8, making the behavior of Tk independant on what the default profile is --- generic/tk.h | 1 + unix/tkUnixFont.c | 2 +- unix/tkUnixSelect.c | 6 +++--- win/tkWinDialog.c | 6 +++--- win/tkWinFont.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index 481714a..8c0406d 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -153,6 +153,7 @@ typedef const char *Tk_Uid; # endif # define TCL_SIZE_MAX INT_MAX # define TCL_SIZE_MODIFIER "" +# define TCL_ENCODING_PROFILE_TCL8 0x01000000 #endif /* diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index c32518c..56d1797 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -1122,7 +1122,7 @@ Tk_MeasureChars( } else { lastSubFontPtr = FindSubFontForChar(fontPtr, ch, NULL); familyPtr = lastSubFontPtr->familyPtr; - Tcl_UtfToExternal(NULL, familyPtr->encoding, p, next - p, 0, NULL, + Tcl_UtfToExternal(NULL, familyPtr->encoding, p, next - p, TCL_ENCODING_PROFILE_TCL8, NULL, (char *)&buf[0].byte1, sizeof(buf), NULL, &dstWrote, NULL); if (familyPtr->isTwoByteFont) { newX += XTextWidth16(lastSubFontPtr->fontStructPtr, diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c index 9b0437f..db9fa96 100644 --- a/unix/tkUnixSelect.c +++ b/unix/tkUnixSelect.c @@ -377,7 +377,7 @@ TkSelPropProc( * this is the first and/or last chunk. */ - encodingCvtFlags = 0; + encodingCvtFlags = TCL_ENCODING_PROFILE_TCL8; if (incrPtr->converts[i].offset == 0) { encodingCvtFlags |= TCL_ENCODING_START; } @@ -1226,8 +1226,8 @@ SelRcvIncrProc( while (1) { result = Tcl_ExternalToUtf(NULL, encoding, src, srcLen, - retrPtr->encFlags, &retrPtr->encState, - dst, dstLen, &srcRead, &dstWrote, NULL); + TCL_ENCODING_PROFILE_TCL8|retrPtr->encFlags, + &retrPtr->encState, dst, dstLen, &srcRead, &dstWrote, NULL); soFar = dst + dstWrote - Tcl_DStringValue(dstPtr); retrPtr->encFlags &= ~TCL_ENCODING_START; src += srcRead; diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 5bbd0f2..50402a8 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -1085,9 +1085,9 @@ ParseOFNOptions( if (Tcl_TranslateFileName(interp, string, &ds) == NULL) goto error_return; Tcl_UtfToExternal(NULL, TkWinGetUnicodeEncoding(), - Tcl_DStringValue(&ds), Tcl_DStringLength(&ds), 0, NULL, - (char *) &optsPtr->file[0], sizeof(optsPtr->file), - NULL, NULL, NULL); + Tcl_DStringValue(&ds), Tcl_DStringLength(&ds), + TCL_ENCODING_PROFILE_TCL8, NULL, (char *)&optsPtr->file[0], + sizeof(optsPtr->file), NULL, NULL, NULL); Tcl_DStringFree(&ds); break; case FILE_PARENT: diff --git a/win/tkWinFont.c b/win/tkWinFont.c index f9f5131..34bb37f 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -909,7 +909,7 @@ Tk_MeasureChars( for (p = start; p < end; ) { next = p + TkUtfToUniChar(p, &ch); Tcl_UtfToExternal(NULL, familyPtr->encoding, p, - (int) (next - p), 0, NULL, buf, sizeof(buf), NULL, + (int) (next - p), TCL_ENCODING_PROFILE_TCL8, NULL, buf, sizeof(buf), NULL, &dstWrote, NULL); Tcl_DStringAppend(&runString,buf,dstWrote); size.cx = 0; -- cgit v0.12 From 0b8e693f8fee267c596ede0aa80c2b947925c606 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 15 Nov 2023 20:50:03 +0000 Subject: 2 more ... --- unix/tkUnixFont.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 6c45bc4..87863a2 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -2080,7 +2080,7 @@ FontMapLoadPage( int hi, lo; if (Tcl_UtfToExternal(NULL, encoding, src, TkUniCharToUtf(i, src), - TCL_ENCODING_STOPONERROR, NULL, buf, sizeof(buf), NULL, + TCL_ENCODING_PROFILE_STRICT, NULL, buf, sizeof(buf), NULL, NULL, NULL) != TCL_OK) { continue; } @@ -2354,7 +2354,7 @@ CanUseFallback( numEncodings++; } Tcl_UtfToExternal(NULL, encoding, src, srcLen, - TCL_ENCODING_STOPONERROR, NULL, dst, sizeof(dst), &srcRead, + TCL_ENCODING_PROFILE_STRICT, NULL, dst, sizeof(dst), &srcRead, &dstWrote, NULL); if (dstWrote == 0) { goto crossout; -- cgit v0.12 From b571874acdb6907f92b4bc630a8c5db172a771a8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 08:28:42 +0000 Subject: Give Ttk_GetOrientFromObj the signature it always should have had. --- generic/ttk/ttk.decls | 9 +++++++++ generic/ttk/ttkClamTheme.c | 4 ++-- generic/ttk/ttkClassicTheme.c | 4 ++-- generic/ttk/ttkDecls.h | 26 ++++++++++++++++++++------ generic/ttk/ttkDefaultTheme.c | 4 ++-- generic/ttk/ttkElements.c | 10 +++++----- generic/ttk/ttkInit.c | 2 +- generic/ttk/ttkLabel.c | 8 -------- generic/ttk/ttkNotebook.c | 14 ++++++-------- generic/ttk/ttkProgress.c | 4 ++-- generic/ttk/ttkStubInit.c | 5 +++++ generic/ttk/ttkTheme.h | 3 --- generic/ttk/ttkThemeInt.h | 6 +----- generic/ttk/ttkWidget.c | 2 +- macosx/ttkMacOSXTheme.c | 12 ++++++------ win/ttkWinTheme.c | 4 ++-- 16 files changed, 64 insertions(+), 53 deletions(-) diff --git a/generic/ttk/ttk.decls b/generic/ttk/ttk.decls index e3a788e..7826c99 100644 --- a/generic/ttk/ttk.decls +++ b/generic/ttk/ttk.decls @@ -139,3 +139,12 @@ declare 34 { declare 35 { Tcl_Obj *Ttk_NewBoxObj(Ttk_Box box) } + +# +# Utilities. +# +declare 40 { + int Ttk_GetOrientFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *orient) +} + + diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index e17ee82..08d2df9 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -717,7 +717,7 @@ static void ThumbElementDraw( /* * Draw grip: */ - TtkGetOrientFromObj(NULL, sb->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, sb->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, sb->gripSizeObj, &gripSize); lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d); darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d); @@ -763,7 +763,7 @@ static void SliderElementSize( (void)paddingPtr; length = thickness = SCROLLBAR_THICKNESS; - TtkGetOrientFromObj(NULL, sb->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, sb->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, sb->arrowSizeObj, &thickness); Tk_GetPixelsFromObj(NULL, tkwin, sb->sliderlengthObj, &length); if (orient == TTK_ORIENT_VERTICAL) { diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index a9d07ee..e102e7f 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -564,7 +564,7 @@ static void SliderElementSize( (void)dummy; (void)paddingPtr; - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, slider->lengthObj, &length); Tk_GetPixelsFromObj(NULL, tkwin, slider->thicknessObj, &thickness); @@ -593,7 +593,7 @@ static void SliderElementDraw( (void)state; border = Tk_Get3DBorderFromObj(tkwin, slider->borderObj); - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth); Tk_GetReliefFromObj(NULL, slider->reliefObj, &relief); diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h index 33274aa..9c40904 100644 --- a/generic/ttk/ttkDecls.h +++ b/generic/ttk/ttkDecls.h @@ -13,11 +13,7 @@ extern const char *TtkInitializeStubs( interp, TTK_VERSION, TTK_STUBS_EPOCH, TTK_STUBS_REVISION) #else -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "Ttk", TTK_VERSION, 0, NULL) -#else -# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "ttk", TTK_VERSION, 0, NULL) -#endif +#define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "ttk", TTK_VERSION, 0, NULL) #endif @@ -34,7 +30,7 @@ extern const char *TtkInitializeStubs( /* !BEGIN!: Do not edit below this line. */ #define TTK_STUBS_EPOCH 0 -#define TTK_STUBS_REVISION 30 +#define TTK_STUBS_REVISION 31 #ifdef __cplusplus extern "C" { @@ -138,6 +134,13 @@ TTKAPI Ttk_Box Ttk_PlaceBox(Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky); /* 35 */ TTKAPI Tcl_Obj * Ttk_NewBoxObj(Ttk_Box box); +/* Slot 36 is reserved */ +/* Slot 37 is reserved */ +/* Slot 38 is reserved */ +/* Slot 39 is reserved */ +/* 40 */ +TTKAPI int Ttk_GetOrientFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Ttk_Orient *orient); typedef struct TtkStubs { int magic; @@ -181,6 +184,11 @@ typedef struct TtkStubs { Ttk_Box (*ttk_ExpandBox) (Ttk_Box b, Ttk_Padding p); /* 33 */ Ttk_Box (*ttk_PlaceBox) (Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky); /* 34 */ Tcl_Obj * (*ttk_NewBoxObj) (Ttk_Box box); /* 35 */ + void (*reserved36)(void); + void (*reserved37)(void); + void (*reserved38)(void); + void (*reserved39)(void); + int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *orient); /* 40 */ } TtkStubs; extern const TtkStubs *ttkStubsPtr; @@ -261,6 +269,12 @@ extern const TtkStubs *ttkStubsPtr; (ttkStubsPtr->ttk_PlaceBox) /* 34 */ #define Ttk_NewBoxObj \ (ttkStubsPtr->ttk_NewBoxObj) /* 35 */ +/* Slot 36 is reserved */ +/* Slot 37 is reserved */ +/* Slot 38 is reserved */ +/* Slot 39 is reserved */ +#define Ttk_GetOrientFromObj \ + (ttkStubsPtr->ttk_GetOrientFromObj) /* 40 */ #endif /* defined(USE_TTK_STUBS) */ diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 431a5af..d15f1c9 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1056,7 +1056,7 @@ static void ThumbElementSize( (void)paddingPtr; Tk_GetPixelsFromObj(NULL, tkwin, thumb->sizeObj, &size); - TtkGetOrientFromObj(NULL, thumb->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, thumb->orientObj, &orient); if (orient == TTK_ORIENT_VERTICAL) { *widthPtr = size; @@ -1147,7 +1147,7 @@ static void SliderElementSize( (void)dummy; (void)paddingPtr; - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, slider->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, tkwin, slider->thicknessObj, &thickness); diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 16296b2..cee050f 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -497,7 +497,7 @@ static void GeneralSeparatorElementDraw( SeparatorElement *separator = (SeparatorElement *)elementRecord; Ttk_Orient orient; - TtkGetOrientFromObj(NULL, separator->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, separator->orientObj, &orient); switch (orient) { case TTK_ORIENT_HORIZONTAL: HorizontalSeparatorElementDraw( @@ -1199,7 +1199,7 @@ static void TroughElementDraw( Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, tkwin, troughPtr->grooveWidthObj, &grooveWidth); Tk_GetReliefFromObj(NULL, troughPtr->reliefObj, &relief); - TtkGetOrientFromObj(NULL, troughPtr->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, troughPtr->orientObj, &orient); if (grooveWidth > 0 && grooveWidth < b.height && grooveWidth < b.width) { if (orient == TTK_ORIENT_HORIZONTAL) { @@ -1268,7 +1268,7 @@ static void ThumbElementSize( (void)paddingPtr; Tk_GetPixelsFromObj(NULL, tkwin, thumb->thicknessObj, &thickness); - TtkGetOrientFromObj(NULL, thumb->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, thumb->orientObj, &orient); if (orient == TTK_ORIENT_VERTICAL) { *widthPtr = thickness; @@ -1399,7 +1399,7 @@ static void SliderElementDraw( * Fill the thin trough area preceding the * slider's center with the inner color */ - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); switch (orient) { case TTK_ORIENT_HORIZONTAL: XFillRectangle(disp, d, gc, troughInnerBox.x, troughInnerBox.y, @@ -1535,7 +1535,7 @@ static void PbarElementSize( (void)dummy; (void)paddingPtr; - TtkGetOrientFromObj(NULL, pbar->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orient); Tk_GetPixelsFromObj(NULL, tkwin, pbar->thicknessObj, &thickness); Tk_GetPixelsFromObj(NULL, tkwin, pbar->lengthObj, &length); Tk_GetPixelsFromObj(NULL, tkwin, pbar->borderWidthObj, &borderWidth); diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c index 7ab55d6..fcc069b 100644 --- a/generic/ttk/ttkInit.c +++ b/generic/ttk/ttkInit.c @@ -55,7 +55,7 @@ const char *const ttkOrientStrings[] = { "horizontal", "vertical", NULL }; -int TtkGetOrientFromObj( +int Ttk_GetOrientFromObj( Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Orient *resultPtr) { int orient = (int)TTK_ORIENT_HORIZONTAL; diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index d94cb23..7210c26 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -54,11 +54,7 @@ static const Ttk_ElementOptionSpec TextElementOptions[] = { { "-foreground", TK_OPTION_COLOR, offsetof(TextElement,foregroundObj), "black" }, { "-underline", TK_OPTION_INDEX, -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) - offsetof(TextElement,underlineObj), "-1"}, -#else offsetof(TextElement,underlineObj), NULL}, -#endif { "-width", TK_OPTION_INT, offsetof(TextElement,widthObj), "-1"}, { "-anchor", TK_OPTION_ANCHOR, @@ -518,11 +514,7 @@ static const Ttk_ElementOptionSpec LabelElementOptions[] = { { "-foreground", TK_OPTION_COLOR, offsetof(LabelElement,text.foregroundObj), "black" }, { "-underline", TK_OPTION_INDEX, -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) offsetof(LabelElement,text.underlineObj), "-1"}, -#else - offsetof(LabelElement,text.underlineObj), NULL}, -#endif { "-width", TK_OPTION_INT, offsetof(LabelElement,text.widthObj), ""}, { "-anchor", TK_OPTION_ANCHOR, diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 17ccd3a..d365c99 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -1123,10 +1123,9 @@ static int NotebookIdentifyCommand( } break; case IDENTIFY_TAB: -#if !defined TK_NO_DEPRECATED && (TCL_MAJOR_VERSION < 9) - if (tabIndex >= 0) -#endif - Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex)); + if (tabIndex >= 0) { + Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex)); + } break; } return TCL_OK; @@ -1151,10 +1150,9 @@ static int NotebookIndexCommand( status = FindTabIndex(interp, nb, objv[2], &index); if (status == TCL_OK) { -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) - if (index >= 0) -#endif - Tcl_SetObjResult(interp, TkNewIndexObj(index)); + if (index >= 0) { + Tcl_SetObjResult(interp, TkNewIndexObj(index)); + } } return status; diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c index b23c698..2b551b6 100644 --- a/generic/ttk/ttkProgress.c +++ b/generic/ttk/ttkProgress.c @@ -303,7 +303,7 @@ static int ProgressbarSize(void *recordPtr, int *widthPtr, int *heightPtr) /* Override requested width (height) based on -length and -orient */ Tk_GetPixelsFromObj(NULL, pb->core.tkwin, pb->progress.lengthObj, &length); - TtkGetOrientFromObj(NULL, pb->progress.orientObj, &orient); + Ttk_GetOrientFromObj(NULL, pb->progress.orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = length; @@ -376,7 +376,7 @@ static void ProgressbarDoLayout(void *recordPtr) Tcl_GetDoubleFromObj(NULL, pb->progress.valueObj, &value); Tcl_GetDoubleFromObj(NULL, pb->progress.maximumObj, &maximum); - TtkGetOrientFromObj(NULL, pb->progress.orientObj, &orient); + Ttk_GetOrientFromObj(NULL, pb->progress.orientObj, &orient); if (pbar) { double fraction = value / maximum; diff --git a/generic/ttk/ttkStubInit.c b/generic/ttk/ttkStubInit.c index f123ec5..9d7d4fc 100644 --- a/generic/ttk/ttkStubInit.c +++ b/generic/ttk/ttkStubInit.c @@ -59,6 +59,11 @@ const TtkStubs ttkStubs = { Ttk_ExpandBox, /* 33 */ Ttk_PlaceBox, /* 34 */ Ttk_NewBoxObj, /* 35 */ + 0, /* 36 */ + 0, /* 37 */ + 0, /* 38 */ + 0, /* 39 */ + Ttk_GetOrientFromObj, /* 40 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h index a00dbc5..b6d7626 100644 --- a/generic/ttk/ttkTheme.h +++ b/generic/ttk/ttkTheme.h @@ -369,9 +369,6 @@ typedef enum { /* -orient option values */ TTK_ORIENT_VERTICAL } Ttk_Orient; -MODULE_SCOPE int TtkGetOrientFromObj(Tcl_Interp *interp, - Tcl_Obj *objPtr, Ttk_Orient *orient); - /*------------------------------------------------------------------------ * +++ Utilities. */ diff --git a/generic/ttk/ttkThemeInt.h b/generic/ttk/ttkThemeInt.h index 23bbcd6..8758f85 100644 --- a/generic/ttk/ttkThemeInt.h +++ b/generic/ttk/ttkThemeInt.h @@ -43,10 +43,6 @@ MODULE_SCOPE void TtkSetBlinkCursorTimes(Tcl_Interp* interp); MODULE_SCOPE int TtkBoxEqual(Ttk_Box, Ttk_Box); -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -# define TTK_OPTION_UNDERLINE_DEF(type, field) "-1", offsetof(type, field), TCL_INDEX_NONE, 0, NULL -#else -# define TTK_OPTION_UNDERLINE_DEF(type, field) NULL, offsetof(type, field), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL -#endif +#define TTK_OPTION_UNDERLINE_DEF(type, field) NULL, offsetof(type, field), TCL_INDEX_NONE, TK_OPTION_NULL_OK, NULL #endif /* _TTKTHEMEINT */ diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index d819af7..f967b7e 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -480,7 +480,7 @@ Ttk_Layout TtkWidgetGetOrientedLayout( /* Prefix: */ - TtkGetOrientFromObj(NULL, orientObj, &orient); + Ttk_GetOrientFromObj(NULL, orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) Tcl_DStringAppend(&styleName, "Horizontal.", -1); else diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 504446b..7495741 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -2480,7 +2480,7 @@ static void TrackElementDraw( double from = 0, to = 100, value = 0, fraction, max; CGRect bounds = BoxToRect(d, b); - TtkGetOrientFromObj(NULL, elem->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, elem->orientObj, &orientation); Tcl_GetDoubleFromObj(NULL, elem->fromObj, &from); Tcl_GetDoubleFromObj(NULL, elem->toObj, &to); Tcl_GetDoubleFromObj(NULL, elem->valueObj, &value); @@ -2622,7 +2622,7 @@ static void PbarElementDraw( int isIndeterminate = !strcmp("indeterminate", Tcl_GetString(pbar->modeObj)); - TtkGetOrientFromObj(NULL, pbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orientation); Tcl_GetDoubleFromObj(NULL, pbar->valueObj, &value); Tcl_GetDoubleFromObj(NULL, pbar->maximumObj, &maximum); Tcl_GetIntFromObj(NULL, pbar->phaseObj, &phase); @@ -2697,7 +2697,7 @@ static void TroughElementSize( Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL; SInt32 thickness = 15; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); ChkErr(GetThemeMetric, kThemeMetricScrollBarWidth, &thickness); if (orientation == TTK_ORIENT_HORIZONTAL) { *minHeight = thickness; @@ -2725,7 +2725,7 @@ static void TroughElementDraw( CGRect bounds = BoxToRect(d, b); GrayColor bgGray; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); if (orientation == TTK_ORIENT_HORIZONTAL) { bounds = CGRectInset(bounds, 0, 1); } else { @@ -2761,7 +2761,7 @@ static void ThumbElementSize( ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); if (orientation == TTK_ORIENT_VERTICAL) { *minHeight = 18; *minWidth = 8; @@ -2782,7 +2782,7 @@ static void ThumbElementDraw( ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL; - TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation); + Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); /* * In order to make ttk scrollbars work correctly it is necessary to be diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index 640573e..3c7bf1d 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -621,7 +621,7 @@ static void ThumbElementSize( ThumbElement *thumbPtr = (ThumbElement *)elementRecord; Ttk_Orient orient; - TtkGetOrientFromObj(NULL, thumbPtr->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, thumbPtr->orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = GetSystemMetrics(SM_CXHTHUMB); *heightPtr = GetSystemMetrics(SM_CYHSCROLL); @@ -686,7 +686,7 @@ static void SliderElementSize( SliderElement *slider = (SliderElement *)elementRecord; Ttk_Orient orient; - TtkGetOrientFromObj(NULL, slider->orientObj, &orient); + Ttk_GetOrientFromObj(NULL, slider->orientObj, &orient); if (orient == TTK_ORIENT_HORIZONTAL) { *widthPtr = (GetSystemMetrics(SM_CXHTHUMB) / 2) | 1; *heightPtr = GetSystemMetrics(SM_CYHSCROLL); -- cgit v0.12 From 05ff9d164e5127a86cf2e93236624193fef3135e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 11:08:53 +0000 Subject: Remove some (very old!) Image-related stuff, and unused stub entries --- doc/ConfigWidg.3 | 8 - doc/CrtImgType.3 | 22 -- doc/CrtPhImgFmt.3 | 39 ---- generic/tk.decls | 78 ------- generic/tk.h | 104 --------- generic/tkCanvText.c | 4 - generic/tkDecls.h | 158 ++++---------- generic/tkImage.c | 23 +- generic/tkImgPhoto.c | 126 +---------- generic/tkInt.decls | 3 - generic/tkInt.h | 23 +- generic/tkIntDecls.h | 19 +- generic/tkIntPlatDecls.h | 24 +-- generic/tkOldTest.c | 418 ------------------------------------ generic/tkPlatDecls.h | 22 +- generic/tkStubInit.c | 74 ++----- macosx/Tk.xcodeproj/project.pbxproj | 6 - macosx/tkMacOSXEmbed.c | 2 +- macosx/tkMacOSXNotify.c | 28 --- macosx/tkMacOSXXStubs.c | 11 + tests/imgPhoto.test | 6 - tests/unixEmbed.test | 2 +- tests/unixMenu.test | 2 +- tests/winMenu.test | 2 +- unix/Makefile.in | 7 +- win/Makefile.in | 4 - win/makefile.vc | 4 - win/tkWinWindow.c | 2 +- 28 files changed, 92 insertions(+), 1129 deletions(-) delete mode 100644 generic/tkOldTest.c diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3 index e29daa8..6fa6de4 100644 --- a/doc/ConfigWidg.3 +++ b/doc/ConfigWidg.3 @@ -429,14 +429,6 @@ to process the default string: the client can compute the default once, save the value, and provide it before calling \fBTk_ConfigureWidget\fR. .TP -\fBTK_CONFIG_OPTION_SPECIFIED\fR -This bit is -deprecated. It used to be set and cleared by \fBTk_ConfigureWidget\fR -so that callers could detect what entries were specified in -\fIargv\fR, but it was removed because it was inherently -thread-unsafe. Code that wishes to detect what options were specified -should use \fBTk_SetOptions\fR instead. -.PP The \fBTK_CONFIG_MONO_ONLY\fR and \fBTK_CONFIG_COLOR_ONLY\fR flags are typically used to specify different default values for monochrome and color displays. This is done by creating two diff --git a/doc/CrtImgType.3 b/doc/CrtImgType.3 index b0a14fc..b1f03dd 100644 --- a/doc/CrtImgType.3 +++ b/doc/CrtImgType.3 @@ -255,28 +255,6 @@ typedef int \fBTk_ImageCreateProc\fR( Tk_ImageModel \fImodel\fR, ClientData *\fImodelDataPtr\fR); .CE -Legacy programs and libraries dating from those days may still -contain code that defines extended Tk image types using the old -interface. The Tk header file will still support this legacy -interface if the code is compiled with the macro \fBUSE_OLD_IMAGE\fR -defined. -.PP -When the \fBUSE_OLD_IMAGE\fR legacy support is enabled, you may -see the routine \fBTk_InitImageArgs\fR in use. This was a migration -tool used to create stub-enabled extensions that could be loaded -into interps containing all versions of Tk 8.1 and later. Tk 8.5 no longer -provides this routine, but uses a macro to convert any attempted -calls of this routine into an empty comment. Any stub-enabled -extension providing an extended image type via the legacy interface -that is compiled against Tk 8.5 headers and linked against the -Tk 8.5 stub library will produce a file that can be loaded only -into interps with Tk 8.5 or later; that is, the normal stub-compatibility -rules. If a developer needs to generate from such code a file -that is loadable into interps with Tk 8.4 or earlier, they must -use Tk 8.4 headers and stub libraries to do so. -.PP -Any new code written today should not make use of the legacy -interfaces. Expect their support to go away in Tk 9. .SH "SEE ALSO" Tk_ImageChanged, Tk_GetImage, Tk_FreeImage, Tk_RedrawImage, Tk_SizeOfImage .SH KEYWORDS diff --git a/doc/CrtPhImgFmt.3 b/doc/CrtPhImgFmt.3 index c7accdb..03a4046 100644 --- a/doc/CrtPhImgFmt.3 +++ b/doc/CrtPhImgFmt.3 @@ -457,45 +457,6 @@ typedef int \fBTk_ImageStringWriteProc\fR( Tcl_Obj *\fIformat\fR, Tk_PhotoImageBlock *\fIblockPtr\fR); .CE -.PP -.SH "LEGACY INTERFACE SUPPORT" -.PP -In Tk 8.2 and earlier, the definition of all the function pointer -types stored in fields of a \fBTk_PhotoImageFormat\fR struct were -incompatibly different. Legacy programs and libraries dating from -those days may still contain code that defines extended Tk photo image -formats using the old interface. The Tk header file will still support -this legacy interface if the code is compiled with the -macro \fBUSE_OLD_IMAGE\fR defined. Alternatively, the legacy interfaces -are used if the first character of \fIformatPtr->name\fR is an -uppercase ASCII character (\fBA\fR-\fBZ\fR), and explicit casts -are used to forgive the type mismatch. For example, -.CS -static Tk_PhotoImageFormat myFormat = { - "MyFormat", - (Tk_ImageFileMatchProc *) FileMatch, - NULL, - (Tk_ImageFileReadProc *) FileRead, - NULL, - NULL, - NULL -}; -.CE -would define a minimal \fBTk_PhotoImageFormat\fR that operates provide -only file reading capability, where \fBFileMatch\fR and \fBFileRead\fR -are written according to the legacy interfaces of Tk 8.2 or earlier. -.PP -Any stub-enabled extension providing an extended photo image format -via the legacy interface enabled by the \fBUSE_OLD_IMAGE\fR macro -that is compiled against Tk 8.5 headers and linked against the -Tk 8.5 stub library will produce a file that can be loaded only -into interps with Tk 8.5 or later; that is, the normal stub-compatibility -rules. If a developer needs to generate from such code a file -that is loadable into interps with Tk 8.4 or earlier, they must -use Tk 8.4 headers and stub libraries to do so. -.PP -Any new code written today should not make use of the legacy -interfaces. Expect their support to go away in Tk 9. .SH "SEE ALSO" Tk_FindPhoto, Tk_PhotoPutBlock .SH KEYWORDS diff --git a/generic/tk.decls b/generic/tk.decls index 8d936c7..e6c534f 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -326,9 +326,6 @@ declare 75 { declare 76 { void Tk_FreeTextLayout(Tk_TextLayout textLayout) } -declare 77 {deprecated {function does nothing, call can be removed}} { - void Tk_FreeXId(Display *display, XID xid) -} declare 78 { GC Tk_GCForColor(XColor *colorPtr, Drawable drawable) } @@ -475,9 +472,6 @@ declare 117 { void Tk_ImageChanged(Tk_ImageModel model, int x, int y, int width, int height, int imageWidth, int imageHeight) } -declare 118 { - int Tk_Init(Tcl_Interp *interp) -} declare 119 { Atom Tk_InternAtom(Tk_Window tkwin, const char *name) } @@ -564,32 +558,15 @@ declare 143 { Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags) } -declare 144 {deprecated {function signature changed}} { - void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height) -} -declare 145 {deprecated {function signature changed}} { - void Tk_PhotoPutZoomedBlock_NoComposite(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY) -} declare 146 { int Tk_PhotoGetImage(Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr) } declare 147 { void Tk_PhotoBlank(Tk_PhotoHandle handle) } -declare 148 {deprecated {function signature changed}} { - void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle, int width, int height ) -} declare 149 { void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr, int *heightPtr) } -declare 150 {deprecated {function signature changed}} { - void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle, int width, int height) -} declare 151 { int Tk_PointToChar(Tk_TextLayout layout, int x, int y) } @@ -617,9 +594,6 @@ declare 158 { Tk_RestrictProc *Tk_RestrictEvents(Tk_RestrictProc *proc, void *arg, void **prevArgPtr) } -declare 159 { - int Tk_SafeInit(Tcl_Interp *interp) -} declare 160 { const char *Tk_SetAppName(Tk_Window tkwin, const char *name) } @@ -817,9 +791,6 @@ declare 214 { declare 215 { void Tk_InitConsoleChannels(Tcl_Interp *interp) } -declare 216 { - int Tk_CreateConsoleWindow(Tcl_Interp *interp) -} declare 217 { void Tk_CreateSmoothMethod(Tcl_Interp *interp, const Tk_SmoothMethod *method) } @@ -939,17 +910,6 @@ declare 244 { declare 245 { void Tk_SetCaretPos(Tk_Window tkwin, int x, int y, int height) } -declare 246 {deprecated {function signature changed}} { - void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int compRule) -} -declare 247 {deprecated {function signature changed}} { - void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY, int compRule) -} declare 248 { int Tk_CollapseMotionEvents(Display *display, int collapse) } @@ -985,12 +945,6 @@ declare 256 { declare 257 { Tk_Style Tk_AllocStyleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr) } -declare 258 { - Tk_Style Tk_GetStyleFromObj(Tcl_Obj *objPtr) -} -declare 259 { - void Tk_FreeStyleFromObj(Tcl_Obj *objPtr) -} declare 260 { Tk_StyledElement Tk_GetStyledElement(Tk_Style style, Tcl_Size elementId, Tk_OptionTable optionTable) @@ -1048,23 +1002,6 @@ declare 271 { Tcl_Interp *Tk_Interp(Tk_Window tkwin) } -# Now that the Tk 8.2 -> 8.3 transition is long past, use more conventional -# means to continue support for extensions using the USE_OLD_IMAGE to -# continue use of their string-based Tcl_ImageTypes and Tcl_PhotoImageFormats. -# -# Note that this restores the usual rules for stub compatibility. Stub-enabled -# extensions compiled against 8.5 headers and linked to the 8.5 stub library -# will produce a file [load]able into an interp with Tk 8.X, for X >= 5. -# It will *not* be [load]able into interps with Tk 8.4 (or Tk 8.2!). -# Developers who need to produce a file [load]able into legacy interps must -# build against legacy sources. -declare 272 { - void Tk_CreateOldImageType(const Tk_ImageType *typePtr) -} -declare 273 { - void Tk_CreateOldPhotoImageFormat(const Tk_PhotoImageFormat *formatPtr) -} - # TIP#580 declare 274 { int Tk_AlwaysShowSelection(Tk_Window tkwin) @@ -1151,27 +1088,12 @@ declare 2 win { declare 3 win { Tk_Window Tk_HWNDToWindow(HWND hwnd) } -declare 4 win { - void Tk_PointerEvent(HWND hwnd, int x, int y) -} -declare 5 win { - int Tk_TranslateWinEvent(HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result) -} ################################ # Aqua specific functions -# Stub removed because the function no longer exists. -#declare 3 aqua { -# void TkMacOSXInitMenus(Tcl_Interp *interp) -#} declare 4 aqua { void TkMacOSXInitAppleEvents(Tcl_Interp *interp) } -declare 5 aqua { - void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, int width, - int height, int flags) -} declare 6 aqua { void TkMacOSXInvalClipRgns(Tk_Window tkwin) } diff --git a/generic/tk.h b/generic/tk.h index c20065a..32fcc17 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -409,9 +409,6 @@ typedef enum { #define TK_CONFIG_COLOR_ONLY (1 << 1) #define TK_CONFIG_MONO_ONLY (1 << 2) #define TK_CONFIG_DONT_SET_DEFAULT (1 << 3) -#ifndef TK_NO_DEPRECATED -# define TK_CONFIG_OPTION_SPECIFIED (1 << 4) -#endif /* !TK_NO_DEPRECATED */ #define TK_CONFIG_USER_BIT 0x100 #endif /* __NO_OLD_CONFIG */ @@ -1228,15 +1225,9 @@ typedef struct Tk_Outline { */ typedef struct Tk_ImageType Tk_ImageType; -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 && defined(USE_OLD_IMAGE) -typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, char *name, Tcl_Size argc, - char **argv, Tk_ImageType *typePtr, Tk_ImageModel model, - void **clientDataPtr); -#else typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, const char *name, Tcl_Size objc, Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageModel model, void **clientDataPtr); -#endif /* USE_OLD_IMAGE */ typedef void *(Tk_ImageGetProc) (Tk_Window tkwin, void *clientData); typedef void (Tk_ImageDisplayProc) (void *clientData, Display *display, Drawable drawable, int imageX, int imageY, int width, int height, @@ -1331,22 +1322,6 @@ typedef struct Tk_PhotoImageBlock { */ typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat; -#ifdef USE_OLD_IMAGE -typedef int (Tk_ImageFileMatchProc) (Tcl_Channel chan, char *fileName, - char *formatString, int *widthPtr, int *heightPtr); -typedef int (Tk_ImageStringMatchProc) (char *string, char *formatString, - int *widthPtr, int *heightPtr); -typedef int (Tk_ImageFileReadProc) (Tcl_Interp *interp, Tcl_Channel chan, - char *fileName, char *formatString, Tk_PhotoHandle imageHandle, - int destX, int destY, int width, int height, int srcX, int srcY); -typedef int (Tk_ImageStringReadProc) (Tcl_Interp *interp, char *string, - char *formatString, Tk_PhotoHandle imageHandle, int destX, int destY, - int width, int height, int srcX, int srcY); -typedef int (Tk_ImageFileWriteProc) (Tcl_Interp *interp, char *fileName, - char *formatString, Tk_PhotoImageBlock *blockPtr); -typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, - Tcl_DString *dataPtr, char *formatString, Tk_PhotoImageBlock *blockPtr); -#else typedef int (Tk_ImageFileMatchProc) (Tcl_Channel chan, const char *fileName, Tcl_Obj *format, int *widthPtr, int *heightPtr, Tcl_Interp *interp); typedef int (Tk_ImageStringMatchProc) (Tcl_Obj *dataObj, Tcl_Obj *format, @@ -1361,7 +1336,6 @@ typedef int (Tk_ImageFileWriteProc) (Tcl_Interp *interp, const char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr); typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr); -#endif /* USE_OLD_IMAGE */ /* * The following alternate definitions are used with the Tk8.7 file format @@ -1536,42 +1510,6 @@ typedef struct Tk_ElementSpec { *---------------------------------------------------------------------- */ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -#define TK_READABLE TCL_READABLE -#define TK_WRITABLE TCL_WRITABLE -#define TK_EXCEPTION TCL_EXCEPTION - -#define TK_DONT_WAIT TCL_DONT_WAIT -#define TK_X_EVENTS TCL_WINDOW_EVENTS -#define TK_WINDOW_EVENTS TCL_WINDOW_EVENTS -#define TK_FILE_EVENTS TCL_FILE_EVENTS -#define TK_TIMER_EVENTS TCL_TIMER_EVENTS -#define TK_IDLE_EVENTS TCL_IDLE_EVENTS -#define TK_ALL_EVENTS TCL_ALL_EVENTS - -#define Tk_IdleProc Tcl_IdleProc -#define Tk_FileProc Tcl_FileProc -#define Tk_TimerProc Tcl_TimerProc -#define Tk_TimerToken Tcl_TimerToken - -#define Tk_BackgroundError Tcl_BackgroundError -#define Tk_CancelIdleCall Tcl_CancelIdleCall -#define Tk_CreateFileHandler Tcl_CreateFileHandler -#define Tk_CreateTimerHandler Tcl_CreateTimerHandler -#define Tk_DeleteFileHandler Tcl_DeleteFileHandler -#define Tk_DeleteTimerHandler Tcl_DeleteTimerHandler -#define Tk_DoOneEvent Tcl_DoOneEvent -#define Tk_DoWhenIdle Tcl_DoWhenIdle -#define Tk_Sleep Tcl_Sleep - -/* Additional stuff that has moved to Tcl: */ - -#define Tk_EventuallyFree Tcl_EventuallyFree -#define Tk_FreeProc Tcl_FreeProc -#define Tk_Preserve Tcl_Preserve -#define Tk_Release Tcl_Release -#endif - /* Removed Tk_Main, use macro instead */ #if defined(_WIN32) || defined(__CYGWIN__) #define Tk_Main(argc, argv, proc) Tk_MainEx(argc, argv, proc, \ @@ -1622,13 +1560,6 @@ typedef Tcl_Size (Tk_SelectionProc) (void *clientData, Tcl_Size offset, #include "tkDecls.h" -#ifdef USE_OLD_IMAGE -#undef Tk_CreateImageType -#define Tk_CreateImageType Tk_CreateOldImageType -#undef Tk_CreatePhotoImageFormat -#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat -#endif /* USE_OLD_IMAGE */ - /* *---------------------------------------------------------------------- * @@ -1638,41 +1569,6 @@ typedef Tcl_Size (Tk_SelectionProc) (void *clientData, Tcl_Size offset, * This goes after the inclusion of the stubbed-decls so that the declarations * of what is actually there can be correct. */ - -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -#ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK -# ifdef Tk_PhotoPutBlock -# undef Tk_PhotoPutBlock -# endif -# define Tk_PhotoPutBlock Tk_PhotoPutBlock_NoComposite -# ifdef Tk_PhotoPutZoomedBlock -# undef Tk_PhotoPutZoomedBlock -# endif -# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_NoComposite -# define USE_PANIC_ON_PHOTO_ALLOC_FAILURE -#else /* !USE_COMPOSITELESS_PHOTO_PUT_BLOCK */ -# ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE -# ifdef Tk_PhotoPutBlock -# undef Tk_PhotoPutBlock -# endif -# define Tk_PhotoPutBlock Tk_PhotoPutBlock_Panic -# ifdef Tk_PhotoPutZoomedBlock -# undef Tk_PhotoPutZoomedBlock -# endif -# define Tk_PhotoPutZoomedBlock Tk_PhotoPutZoomedBlock_Panic -# endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */ -#endif /* USE_COMPOSITELESS_PHOTO_PUT_BLOCK */ -#ifdef USE_PANIC_ON_PHOTO_ALLOC_FAILURE -# ifdef Tk_PhotoExpand -# undef Tk_PhotoExpand -# endif -# define Tk_PhotoExpand Tk_PhotoExpand_Panic -# ifdef Tk_PhotoSetSize -# undef Tk_PhotoSetSize -# endif -# define Tk_PhotoSetSize Tk_PhotoSetSize_Panic -#endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */ -#endif /* !TK_NO_DEPRECATED */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index abc050c..0203343 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -150,11 +150,7 @@ UnderlinePrintProc( char *p; if (underline == INT_MIN) { -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - p = (char *)"-1"; -#else p = (char *)""; -#endif *freeProcPtr = TCL_STATIC; return p; } else if (underline == INT_MAX) { diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 8acef68..a7ae350 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -288,9 +288,7 @@ EXTERN void Tk_FreeOptions(const Tk_ConfigSpec *specs, EXTERN void Tk_FreePixmap(Display *display, Pixmap pixmap); /* 76 */ EXTERN void Tk_FreeTextLayout(Tk_TextLayout textLayout); -/* 77 */ -TK_DEPRECATED("function does nothing, call can be removed") -void Tk_FreeXId(Display *display, XID xid); +/* Slot 77 is reserved */ /* 78 */ EXTERN GC Tk_GCForColor(XColor *colorPtr, Drawable drawable); /* 79 */ @@ -413,8 +411,7 @@ EXTERN Tk_Window Tk_IdToWindow(Display *display, Window window); EXTERN void Tk_ImageChanged(Tk_ImageModel model, int x, int y, int width, int height, int imageWidth, int imageHeight); -/* 118 */ -EXTERN int Tk_Init(Tcl_Interp *interp); +/* Slot 118 is reserved */ /* 119 */ EXTERN Atom Tk_InternAtom(Tk_Window tkwin, const char *name); /* 120 */ @@ -476,34 +473,18 @@ EXTERN void Tk_OwnSelection(Tk_Window tkwin, Atom selection, EXTERN int Tk_ParseArgv(Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags); -/* 144 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height); -/* 145 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutZoomedBlock_NoComposite( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY); +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ /* 146 */ EXTERN int Tk_PhotoGetImage(Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr); /* 147 */ EXTERN void Tk_PhotoBlank(Tk_PhotoHandle handle); -/* 148 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle, - int width, int height); +/* Slot 148 is reserved */ /* 149 */ EXTERN void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr, int *heightPtr); -/* 150 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle, - int width, int height); +/* Slot 150 is reserved */ /* 151 */ EXTERN int Tk_PointToChar(Tk_TextLayout layout, int x, int y); /* 152 */ @@ -529,8 +510,7 @@ EXTERN int Tk_RestackWindow(Tk_Window tkwin, int aboveBelow, /* 158 */ EXTERN Tk_RestrictProc * Tk_RestrictEvents(Tk_RestrictProc *proc, void *arg, void **prevArgPtr); -/* 159 */ -EXTERN int Tk_SafeInit(Tcl_Interp *interp); +/* Slot 159 is reserved */ /* 160 */ EXTERN const char * Tk_SetAppName(Tk_Window tkwin, const char *name); /* 161 */ @@ -689,8 +669,7 @@ EXTERN int Tk_SetOptions(Tcl_Interp *interp, void *recordPtr, Tk_SavedOptions *savePtr, int *maskPtr); /* 215 */ EXTERN void Tk_InitConsoleChannels(Tcl_Interp *interp); -/* 216 */ -EXTERN int Tk_CreateConsoleWindow(Tcl_Interp *interp); +/* Slot 216 is reserved */ /* 217 */ EXTERN void Tk_CreateSmoothMethod(Tcl_Interp *interp, const Tk_SmoothMethod *method); @@ -782,17 +761,8 @@ EXTERN void Tk_SetMinimumRequestSize(Tk_Window tkwin, /* 245 */ EXTERN void Tk_SetCaretPos(Tk_Window tkwin, int x, int y, int height); -/* 246 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int compRule); -/* 247 */ -TK_DEPRECATED("function signature changed") -void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, int x, int y, - int width, int height, int zoomX, int zoomY, - int subsampleX, int subsampleY, int compRule); +/* Slot 246 is reserved */ +/* Slot 247 is reserved */ /* 248 */ EXTERN int Tk_CollapseMotionEvents(Display *display, int collapse); @@ -818,10 +788,8 @@ EXTERN const char * Tk_NameOfStyle(Tk_Style style); /* 257 */ EXTERN Tk_Style Tk_AllocStyleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr); -/* 258 */ -EXTERN Tk_Style Tk_GetStyleFromObj(Tcl_Obj *objPtr); -/* 259 */ -EXTERN void Tk_FreeStyleFromObj(Tcl_Obj *objPtr); +/* Slot 258 is reserved */ +/* Slot 259 is reserved */ /* 260 */ EXTERN Tk_StyledElement Tk_GetStyledElement(Tk_Style style, Tcl_Size elementId, @@ -869,11 +837,8 @@ EXTERN long Tk_GetUserInactiveTime(Display *dpy); EXTERN void Tk_ResetUserInactiveTime(Display *dpy); /* 271 */ EXTERN Tcl_Interp * Tk_Interp(Tk_Window tkwin); -/* 272 */ -EXTERN void Tk_CreateOldImageType(const Tk_ImageType *typePtr); -/* 273 */ -EXTERN void Tk_CreateOldPhotoImageFormat( - const Tk_PhotoImageFormat *formatPtr); +/* Slot 272 is reserved */ +/* Slot 273 is reserved */ /* 274 */ EXTERN int Tk_AlwaysShowSelection(Tk_Window tkwin); /* 275 */ @@ -1011,7 +976,7 @@ typedef struct TkStubs { void (*tk_FreeOptions) (const Tk_ConfigSpec *specs, char *widgRec, Display *display, int needFlags); /* 74 */ void (*tk_FreePixmap) (Display *display, Pixmap pixmap); /* 75 */ void (*tk_FreeTextLayout) (Tk_TextLayout textLayout); /* 76 */ - TCL_DEPRECATED_API("function does nothing, call can be removed") void (*tk_FreeXId) (Display *display, XID xid); /* 77 */ + void (*reserved77)(void); GC (*tk_GCForColor) (XColor *colorPtr, Drawable drawable); /* 78 */ void (*tk_GeometryRequest) (Tk_Window tkwin, int reqWidth, int reqHeight); /* 79 */ Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid colorName); /* 80 */ @@ -1052,7 +1017,7 @@ typedef struct TkStubs { void (*tk_HandleEvent) (XEvent *eventPtr); /* 115 */ Tk_Window (*tk_IdToWindow) (Display *display, Window window); /* 116 */ void (*tk_ImageChanged) (Tk_ImageModel model, int x, int y, int width, int height, int imageWidth, int imageHeight); /* 117 */ - int (*tk_Init) (Tcl_Interp *interp); /* 118 */ + void (*reserved118)(void); Atom (*tk_InternAtom) (Tk_Window tkwin, const char *name); /* 119 */ int (*tk_IntersectTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height); /* 120 */ void (*tk_MaintainGeometry) (Tk_Window window, Tk_Window container, int x, int y, int width, int height); /* 121 */ @@ -1078,13 +1043,13 @@ typedef struct TkStubs { Tk_Window (*tk_NameToWindow) (Tcl_Interp *interp, const char *pathName, Tk_Window tkwin); /* 141 */ void (*tk_OwnSelection) (Tk_Window tkwin, Atom selection, Tk_LostSelProc *proc, void *clientData); /* 142 */ int (*tk_ParseArgv) (Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags); /* 143 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height); /* 144 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY); /* 145 */ + void (*reserved144)(void); + void (*reserved145)(void); int (*tk_PhotoGetImage) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr); /* 146 */ void (*tk_PhotoBlank) (Tk_PhotoHandle handle); /* 147 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoExpand_Panic) (Tk_PhotoHandle handle, int width, int height); /* 148 */ + void (*reserved148)(void); void (*tk_PhotoGetSize) (Tk_PhotoHandle handle, int *widthPtr, int *heightPtr); /* 149 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoSetSize_Panic) (Tk_PhotoHandle handle, int width, int height); /* 150 */ + void (*reserved150)(void); int (*tk_PointToChar) (Tk_TextLayout layout, int x, int y); /* 151 */ int (*tk_PostscriptFontName) (Tk_Font tkfont, Tcl_DString *dsPtr); /* 152 */ void (*tk_PreserveColormap) (Display *display, Colormap colormap); /* 153 */ @@ -1093,7 +1058,7 @@ typedef struct TkStubs { void (*tk_ResizeWindow) (Tk_Window tkwin, int width, int height); /* 156 */ int (*tk_RestackWindow) (Tk_Window tkwin, int aboveBelow, Tk_Window other); /* 157 */ Tk_RestrictProc * (*tk_RestrictEvents) (Tk_RestrictProc *proc, void *arg, void **prevArgPtr); /* 158 */ - int (*tk_SafeInit) (Tcl_Interp *interp); /* 159 */ + void (*reserved159)(void); const char * (*tk_SetAppName) (Tk_Window tkwin, const char *name); /* 160 */ void (*tk_SetBackgroundFromBorder) (Tk_Window tkwin, Tk_3DBorder border); /* 161 */ void (*tk_SetClass) (Tk_Window tkwin, const char *className); /* 162 */ @@ -1150,7 +1115,7 @@ typedef struct TkStubs { void (*tk_RestoreSavedOptions) (Tk_SavedOptions *savePtr); /* 213 */ int (*tk_SetOptions) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionTable, Tcl_Size objc, Tcl_Obj *const objv[], Tk_Window tkwin, Tk_SavedOptions *savePtr, int *maskPtr); /* 214 */ void (*tk_InitConsoleChannels) (Tcl_Interp *interp); /* 215 */ - int (*tk_CreateConsoleWindow) (Tcl_Interp *interp); /* 216 */ + void (*reserved216)(void); void (*tk_CreateSmoothMethod) (Tcl_Interp *interp, const Tk_SmoothMethod *method); /* 217 */ void (*reserved218)(void); void (*reserved219)(void); @@ -1180,8 +1145,8 @@ typedef struct TkStubs { void (*tk_SetInternalBorderEx) (Tk_Window tkwin, int left, int right, int top, int bottom); /* 243 */ void (*tk_SetMinimumRequestSize) (Tk_Window tkwin, int minWidth, int minHeight); /* 244 */ void (*tk_SetCaretPos) (Tk_Window tkwin, int x, int y, int height); /* 245 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int compRule); /* 246 */ - TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 247 */ + void (*reserved246)(void); + void (*reserved247)(void); int (*tk_CollapseMotionEvents) (Display *display, int collapse); /* 248 */ Tk_StyleEngine (*tk_RegisterStyleEngine) (const char *name, Tk_StyleEngine parent); /* 249 */ Tk_StyleEngine (*tk_GetStyleEngine) (const char *name); /* 250 */ @@ -1192,8 +1157,8 @@ typedef struct TkStubs { void (*tk_FreeStyle) (Tk_Style style); /* 255 */ const char * (*tk_NameOfStyle) (Tk_Style style); /* 256 */ Tk_Style (*tk_AllocStyleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 257 */ - Tk_Style (*tk_GetStyleFromObj) (Tcl_Obj *objPtr); /* 258 */ - void (*tk_FreeStyleFromObj) (Tcl_Obj *objPtr); /* 259 */ + void (*reserved258)(void); + void (*reserved259)(void); Tk_StyledElement (*tk_GetStyledElement) (Tk_Style style, Tcl_Size elementId, Tk_OptionTable optionTable); /* 260 */ void (*tk_GetElementSize) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int width, int height, int inner, int *widthPtr, int *heightPtr); /* 261 */ void (*tk_GetElementBox) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int x, int y, int width, int height, int inner, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr); /* 262 */ @@ -1206,8 +1171,8 @@ typedef struct TkStubs { long (*tk_GetUserInactiveTime) (Display *dpy); /* 269 */ void (*tk_ResetUserInactiveTime) (Display *dpy); /* 270 */ Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */ - void (*tk_CreateOldImageType) (const Tk_ImageType *typePtr); /* 272 */ - void (*tk_CreateOldPhotoImageFormat) (const Tk_PhotoImageFormat *formatPtr); /* 273 */ + void (*reserved272)(void); + void (*reserved273)(void); int (*tk_AlwaysShowSelection) (Tk_Window tkwin); /* 274 */ unsigned (*tk_GetButtonMask) (unsigned button); /* 275 */ int (*tk_GetDoublePixelsFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, double *doublePtr); /* 276 */ @@ -1393,8 +1358,7 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_FreePixmap) /* 75 */ #define Tk_FreeTextLayout \ (tkStubsPtr->tk_FreeTextLayout) /* 76 */ -#define Tk_FreeXId \ - (tkStubsPtr->tk_FreeXId) /* 77 */ +/* Slot 77 is reserved */ #define Tk_GCForColor \ (tkStubsPtr->tk_GCForColor) /* 78 */ #define Tk_GeometryRequest \ @@ -1475,8 +1439,7 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_IdToWindow) /* 116 */ #define Tk_ImageChanged \ (tkStubsPtr->tk_ImageChanged) /* 117 */ -#define Tk_Init \ - (tkStubsPtr->tk_Init) /* 118 */ +/* Slot 118 is reserved */ #define Tk_InternAtom \ (tkStubsPtr->tk_InternAtom) /* 119 */ #define Tk_IntersectTextLayout \ @@ -1527,20 +1490,16 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_OwnSelection) /* 142 */ #define Tk_ParseArgv \ (tkStubsPtr->tk_ParseArgv) /* 143 */ -#define Tk_PhotoPutBlock_NoComposite \ - (tkStubsPtr->tk_PhotoPutBlock_NoComposite) /* 144 */ -#define Tk_PhotoPutZoomedBlock_NoComposite \ - (tkStubsPtr->tk_PhotoPutZoomedBlock_NoComposite) /* 145 */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ #define Tk_PhotoGetImage \ (tkStubsPtr->tk_PhotoGetImage) /* 146 */ #define Tk_PhotoBlank \ (tkStubsPtr->tk_PhotoBlank) /* 147 */ -#define Tk_PhotoExpand_Panic \ - (tkStubsPtr->tk_PhotoExpand_Panic) /* 148 */ +/* Slot 148 is reserved */ #define Tk_PhotoGetSize \ (tkStubsPtr->tk_PhotoGetSize) /* 149 */ -#define Tk_PhotoSetSize_Panic \ - (tkStubsPtr->tk_PhotoSetSize_Panic) /* 150 */ +/* Slot 150 is reserved */ #define Tk_PointToChar \ (tkStubsPtr->tk_PointToChar) /* 151 */ #define Tk_PostscriptFontName \ @@ -1557,8 +1516,7 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_RestackWindow) /* 157 */ #define Tk_RestrictEvents \ (tkStubsPtr->tk_RestrictEvents) /* 158 */ -#define Tk_SafeInit \ - (tkStubsPtr->tk_SafeInit) /* 159 */ +/* Slot 159 is reserved */ #define Tk_SetAppName \ (tkStubsPtr->tk_SetAppName) /* 160 */ #define Tk_SetBackgroundFromBorder \ @@ -1670,8 +1628,7 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_SetOptions) /* 214 */ #define Tk_InitConsoleChannels \ (tkStubsPtr->tk_InitConsoleChannels) /* 215 */ -#define Tk_CreateConsoleWindow \ - (tkStubsPtr->tk_CreateConsoleWindow) /* 216 */ +/* Slot 216 is reserved */ #define Tk_CreateSmoothMethod \ (tkStubsPtr->tk_CreateSmoothMethod) /* 217 */ /* Slot 218 is reserved */ @@ -1728,10 +1685,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_SetMinimumRequestSize) /* 244 */ #define Tk_SetCaretPos \ (tkStubsPtr->tk_SetCaretPos) /* 245 */ -#define Tk_PhotoPutBlock_Panic \ - (tkStubsPtr->tk_PhotoPutBlock_Panic) /* 246 */ -#define Tk_PhotoPutZoomedBlock_Panic \ - (tkStubsPtr->tk_PhotoPutZoomedBlock_Panic) /* 247 */ +/* Slot 246 is reserved */ +/* Slot 247 is reserved */ #define Tk_CollapseMotionEvents \ (tkStubsPtr->tk_CollapseMotionEvents) /* 248 */ #define Tk_RegisterStyleEngine \ @@ -1752,10 +1707,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_NameOfStyle) /* 256 */ #define Tk_AllocStyleFromObj \ (tkStubsPtr->tk_AllocStyleFromObj) /* 257 */ -#define Tk_GetStyleFromObj \ - (tkStubsPtr->tk_GetStyleFromObj) /* 258 */ -#define Tk_FreeStyleFromObj \ - (tkStubsPtr->tk_FreeStyleFromObj) /* 259 */ +/* Slot 258 is reserved */ +/* Slot 259 is reserved */ #define Tk_GetStyledElement \ (tkStubsPtr->tk_GetStyledElement) /* 260 */ #define Tk_GetElementSize \ @@ -1780,10 +1733,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_ResetUserInactiveTime) /* 270 */ #define Tk_Interp \ (tkStubsPtr->tk_Interp) /* 271 */ -#define Tk_CreateOldImageType \ - (tkStubsPtr->tk_CreateOldImageType) /* 272 */ -#define Tk_CreateOldPhotoImageFormat \ - (tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */ +/* Slot 272 is reserved */ +/* Slot 273 is reserved */ #define Tk_AlwaysShowSelection \ (tkStubsPtr->tk_AlwaysShowSelection) /* 274 */ #define Tk_GetButtonMask \ @@ -1823,16 +1774,7 @@ extern const TkStubs *tkStubsPtr; /* !END!: Do not edit above this line. */ -/* Functions that don't belong in the stub table */ -#undef Tk_MainEx -#undef Tk_Init -#undef Tk_SafeInit -#undef Tk_CreateConsoleWindow - -#undef Tk_FreeXId -#define Tk_FreeXId(display,xid) -#undef Tk_GetStyleFromObj -#undef Tk_FreeStyleFromObj +#define Tk_FreeXId(display,xid) /* no-op */ #define Tk_GetStyleFromObj(obj) Tk_AllocStyleFromObj(NULL, obj) #define Tk_FreeStyleFromObj(obj) /* no-op */ #define Tk_GetImageMasterData Tk_GetImageModelData @@ -1848,17 +1790,9 @@ EXTERN void Tk_MainEx(Tcl_Size argc, char **argv, EXTERN void Tk_MainExW(Tcl_Size argc, wchar_t **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); #endif - - -#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 -#undef Tk_PhotoPutBlock_NoComposite -#undef Tk_PhotoPutZoomedBlock_NoComposite -#undef Tk_PhotoExpand_Panic -#undef Tk_PhotoPutBlock_Panic -#undef Tk_PhotoPutZoomedBlock_Panic -#undef Tk_PhotoSetSize_Panic -#undef Tk_CreateOldPhotoImageFormat -#endif /* TK_NO_DEPRECATED */ +EXTERN int Tk_Init(Tcl_Interp *interp); +EXTERN int Tk_SafeInit(Tcl_Interp *interp); +EXTERN int Tk_CreateConsoleWindow(Tcl_Interp *interp); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/generic/tkImage.c b/generic/tkImage.c index e34ced4..5290b7e 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -129,7 +129,7 @@ ImageTypeThreadExitProc( /* *---------------------------------------------------------------------- * - * Tk_CreateOldImageType, Tk_CreateImageType -- + * Tk_CreateImageType -- * * This function is invoked by an image manager to tell Tk about a new * kind of image and the functions that manage the new type. The function @@ -146,27 +146,6 @@ ImageTypeThreadExitProc( */ void -Tk_CreateOldImageType( - const Tk_ImageType *typePtr) - /* Structure describing the type. All of the - * fields except "nextPtr" must be filled in - * by caller. */ -{ - Tk_ImageType *copyPtr; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - - if (!tsdPtr->initialized) { - tsdPtr->initialized = 1; - Tcl_CreateThreadExitHandler(ImageTypeThreadExitProc, NULL); - } - copyPtr = (Tk_ImageType *)ckalloc(sizeof(Tk_ImageType)); - *copyPtr = *typePtr; - copyPtr->nextPtr = tsdPtr->oldImageTypeList; - tsdPtr->oldImageTypeList = copyPtr; -} - -void Tk_CreateImageType( const Tk_ImageType *typePtr) /* Structure describing the type. All of the diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 757fae4..6ced2a9 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -271,7 +271,7 @@ PhotoFormatThreadExitProc( /* *---------------------------------------------------------------------- * - * Tk_CreateOldPhotoImageFormat, Tk_CreatePhotoImageFormat, + * Tk_CreatePhotoImageFormat, * Tk_CreatePhotoImageFormatVersion3 -- * * This function is invoked by an image file handler to register a new @@ -288,29 +288,6 @@ PhotoFormatThreadExitProc( *---------------------------------------------------------------------- */ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -void -Tk_CreateOldPhotoImageFormat( - const Tk_PhotoImageFormat *formatPtr) - /* Structure describing the format. All of the - * fields except "nextPtr" must be filled in - * by caller. */ -{ - Tk_PhotoImageFormat *copyPtr; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - - if (!tsdPtr->initialized) { - tsdPtr->initialized = 1; - Tcl_CreateThreadExitHandler(PhotoFormatThreadExitProc, NULL); - } - copyPtr = (Tk_PhotoImageFormat *)ckalloc(sizeof(Tk_PhotoImageFormat)); - *copyPtr = *formatPtr; - copyPtr->nextPtr = tsdPtr->oldFormatList; - tsdPtr->oldFormatList = copyPtr; -} -#endif - void Tk_CreatePhotoImageFormat( const Tk_PhotoImageFormat *formatPtr) @@ -4531,107 +4508,6 @@ ImgPhotoPostscript( } /* - *---------------------------------------------------------------------- - * - * Tk_PhotoPutBlock_NoComposite, Tk_PhotoPutZoomedBlock_NoComposite -- - * - * These backward-compatibility functions just exist to fill slots in stubs - * table. For the behaviour of *_NoComposite, refer to the corresponding - * function without the extra suffix, except that the compositing rule is - * always "overlay" and the function always panics on memory-allocation - * failure. - * - *---------------------------------------------------------------------- - */ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -void -Tk_PhotoPutBlock_NoComposite( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height) -{ - if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height, - TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoPutZoomedBlock_NoComposite( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height, - int zoomX, int zoomY, int subsampleX, int subsampleY) -{ - if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height, - zoomX, zoomY, subsampleX, subsampleY, - TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -/* - *---------------------------------------------------------------------- - * - * Tk_PhotoExpand_Panic, Tk_PhotoPutBlock_Panic, - * Tk_PhotoPutZoomedBlock_Panic, Tk_PhotoSetSize_Panic - * - * Backward compatibility functions for preserving the old behaviour (i.e. - * panic on memory allocation failure) so that extensions do not need to be - * significantly updated to take account of TIP #116. These call the new - * interface (i.e. the interface without the extra suffix), but panic if an - * error condition is returned. - * - *---------------------------------------------------------------------- - */ - -void -Tk_PhotoExpand_Panic( - Tk_PhotoHandle handle, - int width, int height) -{ - if (Tk_PhotoExpand(NULL, handle, width, height) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoPutBlock_Panic( - Tk_PhotoHandle handle, - Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height, int compRule) -{ - if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height, - compRule) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoPutZoomedBlock_Panic( - Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, - int x, int y, int width, int height, - int zoomX, int zoomY, int subsampleX, int subsampleY, - int compRule) -{ - if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height, - zoomX, zoomY, subsampleX, subsampleY, compRule) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} - -void -Tk_PhotoSetSize_Panic( - Tk_PhotoHandle handle, - int width, int height) -{ - if (Tk_PhotoSetSize(NULL, handle, width, height) != TCL_OK) { - Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); - } -} -#endif /* TK_NO_DEPRECATED */ - -/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 3d04961..78e6cf2 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -831,9 +831,6 @@ declare 32 win { Tcl_Obj *TkWinGetMenuSystemDefault(Tk_Window tkwin, const char *dbName, const char *className) } -declare 33 win { - int TkWinGetPlatformId(void) -} # new for 8.4.1 diff --git a/generic/tkInt.h b/generic/tkInt.h index 464ef74..ebfa348 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -75,13 +75,6 @@ # endif #endif -#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7) -# define Tcl_WCharToUtfDString ((char * (*)(const WCHAR *, int len, Tcl_DString *))Tcl_UniCharToUtfDString) -# define Tcl_UtfToWCharDString ((WCHAR * (*)(const char *, int len, Tcl_DString *))Tcl_UtfToUniCharDString) -# define Tcl_Char16ToUtfDString Tcl_UniCharToUtfDString -# define Tcl_UtfToChar16DString Tcl_UtfToUniCharDString -#endif - #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) # define TKFLEXARRAY #elif defined(__GNUC__) && (__GNUC__ > 2) @@ -90,10 +83,6 @@ # define TKFLEXARRAY 1 #endif -#if !defined(Tcl_GetParent) && (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7) -# define Tcl_GetParent Tcl_GetMaster -#endif - /* * Macros used to cast between pointers and integers (e.g. when storing an int * in ClientData), on 64-bit architectures they avoid gcc warning about "cast @@ -1420,13 +1409,8 @@ MODULE_SCOPE void TkRotatePoint(double originX, double originY, double *yPtr); MODULE_SCOPE int TkGetIntForIndex(Tcl_Obj *, Tcl_Size, int lastOK, Tcl_Size*); -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -# define TkNewIndexObj(value) Tcl_NewWideIntObj((Tcl_WideInt)(value + 1) - 1) -# define TK_OPTION_UNDERLINE_DEF(type, field) "-1", TCL_INDEX_NONE, offsetof(type, field), 0, NULL -#else -# define TkNewIndexObj(value) (((Tcl_Size)(value) == TCL_INDEX_NONE) ? Tcl_NewObj() : Tcl_NewWideIntObj((Tcl_WideInt)(value))) -# define TK_OPTION_UNDERLINE_DEF(type, field) NULL, TCL_INDEX_NONE, offsetof(type, field), TK_OPTION_NULL_OK, NULL -#endif +#define TkNewIndexObj(value) (((Tcl_Size)(value) == TCL_INDEX_NONE) ? Tcl_NewObj() : Tcl_NewWideIntObj((Tcl_WideInt)(value))) +#define TK_OPTION_UNDERLINE_DEF(type, field) NULL, TCL_INDEX_NONE, offsetof(type, field), TK_OPTION_NULL_OK, NULL #ifdef _WIN32 @@ -1468,8 +1452,7 @@ MODULE_SCOPE void TkpCopyRegion(TkRegion dst, TkRegion src); # define c_class class #endif -/* Tcl 8.6 has a different definition of Tcl_UniChar than other Tcl versions for TCL_UTF_MAX > 3 */ -#if TCL_UTF_MAX > (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6)) +#if TCL_UTF_MAX > 3 # define TkUtfToUniChar(src, ch) (size_t)(((int (*)(const char *, int *))Tcl_UtfToUniChar)(src, ch)) # define TkUniCharToUtf(ch, src) (size_t)(((int (*)(int, char *))Tcl_UniCharToUtf)(ch, src)) #else diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 6eeb6c5..84f360d 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -1178,24 +1178,7 @@ extern const TkIntStubs *tkIntStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkpCmapStressed_ -#undef TkpSync_ -#undef TkUnixContainerId_ -#undef TkUnixDoOneXEvent_ -#undef TkUnixSetMenubar_ -#undef TkWmCleanup_ -#undef TkSendCleanup_ -#undef TkpTestsendCmd_ -#undef TkSetWindowMenuBar -#undef TkpDrawHighlightBorder -#undef TkpUseWindow -#undef TkpSetMainMenubar -#undef TkpGetOtherWindow -#undef TkpGetSystemDefault -#undef TkpMakeContainer -#undef TkpMakeWindow - -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION == 8) +#if !defined(TK_NO_DEPRECATED) # define TkSetWindowMenuBar Tk_SetWindowMenubar # define TkpDrawHighlightBorder Tk_DrawHighlightBorder # define TkpUseWindow Tk_UseWindow diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index c3164da..48948a0 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -113,8 +113,7 @@ EXTERN void TkWinDialogDebug(int debug); /* 32 */ EXTERN Tcl_Obj * TkWinGetMenuSystemDefault(Tk_Window tkwin, const char *dbName, const char *className); -/* 33 */ -EXTERN int TkWinGetPlatformId(void); +/* Slot 33 is reserved */ /* 34 */ EXTERN void TkWinSetHINSTANCE(HINSTANCE hInstance); /* 35 */ @@ -370,7 +369,7 @@ typedef struct TkIntPlatStubs { void (*tkWinSetForegroundWindow) (TkWindow *winPtr); /* 30 */ void (*tkWinDialogDebug) (int debug); /* 31 */ Tcl_Obj * (*tkWinGetMenuSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 32 */ - int (*tkWinGetPlatformId) (void); /* 33 */ + void (*reserved33)(void); void (*tkWinSetHINSTANCE) (HINSTANCE hInstance); /* 34 */ int (*tkWinGetPlatformTheme) (void); /* 35 */ LRESULT (__stdcall *tkWinChildProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* 36 */ @@ -572,8 +571,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkWinDialogDebug) /* 31 */ #define TkWinGetMenuSystemDefault \ (tkIntPlatStubsPtr->tkWinGetMenuSystemDefault) /* 32 */ -#define TkWinGetPlatformId \ - (tkIntPlatStubsPtr->tkWinGetPlatformId) /* 33 */ +/* Slot 33 is reserved */ #define TkWinSetHINSTANCE \ (tkIntPlatStubsPtr->tkWinSetHINSTANCE) /* 34 */ #define TkWinGetPlatformTheme \ @@ -779,23 +777,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* !END!: Do not edit above this line. */ -#undef TkpCmapStressed_ -#undef TkpSync_ -#undef TkUnixContainerId_ -#undef TkUnixDoOneXEvent_ -#undef TkUnixSetMenubar_ -#undef TkWmCleanup_ -#undef TkSendCleanup_ -#undef TkpTestsendCmd_ -#undef TkGenerateActivateEvents_ -#undef TkMacOSXSetUpClippingRgn -#undef TkMacOSXIsCharacterMissing -#define TkMacOSXIsCharacterMissing(tkfont) ((void)tkfont, 0) - #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkWinGetPlatformId -#define TkWinGetPlatformId() (2) /* VER_PLATFORM_WIN32_NT */ - #endif /* _TKINTPLATDECLS */ diff --git a/generic/tkOldTest.c b/generic/tkOldTest.c deleted file mode 100644 index d135958..0000000 --- a/generic/tkOldTest.c +++ /dev/null @@ -1,418 +0,0 @@ -/* - * tkOldTest.c -- - * - * This file contains C command functions for additional Tcl - * commands that are used to test Tk's support for legacy - * interfaces. These commands are not normally included in Tcl/Tk - * applications; they're only used for testing. - * - * Copyright © 1993-1994 The Regents of the University of California. - * Copyright © 1994-1997 Sun Microsystems, Inc. - * Copyright © 1998-1999 Scriptics Corporation. - * Contributions by Don Porter, NIST, 2007. (not subject to US copyright) - * - * See the file "license.terms" for information on usage and redistribution of - * this file, and for a DISCLAIMER OF ALL WARRANTIES. - */ - -#define USE_OLD_IMAGE -#ifndef USE_TCL_STUBS -# define USE_TCL_STUBS -#endif -#ifndef USE_TK_STUBS -# define USE_TK_STUBS -#endif -#include "tkInt.h" - -#ifdef _WIN32 -#include "tkWinInt.h" -#endif - -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -/* - * The following data structure represents the model for a test image: - */ - -typedef struct TImageModel { - Tk_ImageModel model; /* Tk's token for image model. */ - Tcl_Interp *interp; /* Interpreter for application. */ - int width, height; /* Dimensions of image. */ - char *imageName; /* Name of image (malloc-ed). */ - char *varName; /* Name of variable in which to log events for - * image (malloc-ed). */ -} TImageModel; - -/* - * The following data structure represents a particular use of a particular - * test image. - */ - -typedef struct TImageInstance { - TImageModel *modelPtr; /* Pointer to model for image. */ - XColor *fg; /* Foreground color for drawing in image. */ - GC gc; /* Graphics context for drawing in image. */ -} TImageInstance; - -/* - * The type record for test images: - */ - -static int ImageCreate(Tcl_Interp *interp, - char *name, Tcl_Size argc, char **argv, - Tk_ImageType *typePtr, Tk_ImageModel model, - ClientData *clientDataPtr); -static ClientData ImageGet(Tk_Window tkwin, ClientData clientData); -static void ImageDisplay(ClientData clientData, - Display *display, Drawable drawable, - int imageX, int imageY, int width, - int height, int drawableX, - int drawableY); -static void ImageFree(ClientData clientData, Display *display); -static void ImageDelete(ClientData clientData); - -static Tk_ImageType imageType = { - "oldtest", /* name */ - (Tk_ImageCreateProc *) ImageCreate, /* createProc */ - ImageGet, /* getProc */ - ImageDisplay, /* displayProc */ - ImageFree, /* freeProc */ - ImageDelete, /* deleteProc */ - NULL, /* postscriptPtr */ - NULL, /* nextPtr */ - NULL -}; - -/* - * Forward declarations for functions defined later in this file: - */ - -static int ImageObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -#endif - -/* - *---------------------------------------------------------------------- - * - * TkOldTestInit -- - * - * This function performs initialization for the Tk test suite - * extensions for testing support for legacy interfaces. - * - * Results: - * Returns a standard Tcl completion code, and leaves an error message in - * the interp's result if an error occurs. - * - * Side effects: - * Creates several test commands. - * - *---------------------------------------------------------------------- - */ - -int -TkOldTestInit( - Tcl_Interp *dummy) -{ - static int initialized = 0; - (void)dummy; - - if (!initialized) { - initialized = 1; -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) - Tk_CreateImageType(&imageType); -#endif - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * ImageCreate -- - * - * This function is called by the Tk image code to create "oldtest" images. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * The data structure for a new image is allocated. - * - *---------------------------------------------------------------------- - */ -#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION < 9) -static int -ImageCreate( - Tcl_Interp *interp, /* Interpreter for application containing - * image. */ - char *name, /* Name to use for image. */ - Tcl_Size argc, /* Number of arguments. */ - char **argv, /* Argument strings for options (doesn't - * include image name or type). */ - Tk_ImageType *typePtr, /* Pointer to our type record (not used). */ - Tk_ImageModel model, /* Token for image, to be used by us in later - * callbacks. */ - ClientData *clientDataPtr) /* Store manager's token for image here; it - * will be returned in later callbacks. */ -{ - TImageModel *timPtr; - const char *varName; - Tcl_Size i; - (void)typePtr; - - varName = "log"; - for (i = 0; i < argc; i += 2) { - if (strcmp(argv[i], "-variable") != 0) { - Tcl_AppendResult(interp, "bad option name \"", - argv[i], "\"", NULL); - return TCL_ERROR; - } - if ((i+1) == argc) { - Tcl_AppendResult(interp, "no value given for \"", - argv[i], "\" option", NULL); - return TCL_ERROR; - } - varName = argv[i+1]; - } - - timPtr = (TImageModel *)ckalloc(sizeof(TImageModel)); - timPtr->model = model; - timPtr->interp = interp; - timPtr->width = 30; - timPtr->height = 15; - timPtr->imageName = (char *)ckalloc(strlen(name) + 1); - strcpy(timPtr->imageName, name); - timPtr->varName = (char *)ckalloc(strlen(varName) + 1); - strcpy(timPtr->varName, varName); - Tcl_CreateObjCommand(interp, name, ImageObjCmd, timPtr, NULL); - *clientDataPtr = timPtr; - Tk_ImageChanged(model, 0, 0, 30, 15, 30, 15); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * ImageObjCmd -- - * - * This function implements the commands corresponding to individual - * images. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * Forces windows to be created. - * - *---------------------------------------------------------------------- - */ - -static int -ImageObjCmd( - ClientData clientData, /* Main window for application. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument strings. */ -{ - TImageModel *timPtr = (TImageModel *)clientData; - int x, y, width, height; - - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); - return TCL_ERROR; - } - if (strcmp(Tcl_GetString(objv[1]), "changed") == 0) { - if (objc != 8) { - Tcl_WrongNumArgs(interp, 1, objv, "changed x y width height" - " imageWidth imageHeight"); - return TCL_ERROR; - } - if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[4], &width) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[5], &height) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[6], &timPtr->width) != TCL_OK) - || (Tcl_GetIntFromObj(interp, objv[7], &timPtr->height) != TCL_OK)) { - return TCL_ERROR; - } - Tk_ImageChanged(timPtr->model, x, y, width, height, timPtr->width, - timPtr->height); - } else { - Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]), - "\": must be changed", NULL); - return TCL_ERROR; - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * ImageGet -- - * - * This function is called by Tk to set things up for using a test image - * in a particular widget. - * - * Results: - * The return value is a token for the image instance, which is used in - * future callbacks to ImageDisplay and ImageFree. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static ClientData -ImageGet( - Tk_Window tkwin, /* Token for window in which image will be - * used. */ - ClientData clientData) /* Pointer to TImageModel for image. */ -{ - TImageModel *timPtr = (TImageModel *)clientData; - TImageInstance *instPtr; - char buffer[100]; - XGCValues gcValues; - - snprintf(buffer, sizeof(buffer), "%s get", timPtr->imageName); - Tcl_SetVar2(timPtr->interp, timPtr->varName, NULL, buffer, - TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - - instPtr = (TImageInstance *)ckalloc(sizeof(TImageInstance)); - instPtr->modelPtr = timPtr; - instPtr->fg = Tk_GetColor(timPtr->interp, tkwin, "#ff0000"); - gcValues.foreground = instPtr->fg->pixel; - instPtr->gc = Tk_GetGC(tkwin, GCForeground, &gcValues); - return instPtr; -} - -/* - *---------------------------------------------------------------------- - * - * ImageDisplay -- - * - * This function is invoked to redisplay part or all of an image in a - * given drawable. - * - * Results: - * None. - * - * Side effects: - * The image gets partially redrawn, as an "X" that shows the exact - * redraw area. - * - *---------------------------------------------------------------------- - */ - -static void -ImageDisplay( - ClientData clientData, /* Pointer to TImageInstance for image. */ - Display *display, /* Display to use for drawing. */ - Drawable drawable, /* Where to redraw image. */ - int imageX, int imageY, /* Origin of area to redraw, relative to - * origin of image. */ - int width, int height, /* Dimensions of area to redraw. */ - int drawableX, int drawableY) - /* Coordinates in drawable corresponding to - * imageX and imageY. */ -{ - TImageInstance *instPtr = (TImageInstance *)clientData; - char buffer[200 + TCL_INTEGER_SPACE * 6]; - - snprintf(buffer, sizeof(buffer), "%s display %d %d %d %d %d %d", - instPtr->modelPtr->imageName, imageX, imageY, width, height, - drawableX, drawableY); - Tcl_SetVar2(instPtr->modelPtr->interp, instPtr->modelPtr->varName, NULL, - buffer, TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - if (width > (instPtr->modelPtr->width - imageX)) { - width = instPtr->modelPtr->width - imageX; - } - if (height > (instPtr->modelPtr->height - imageY)) { - height = instPtr->modelPtr->height - imageY; - } - XDrawRectangle(display, drawable, instPtr->gc, drawableX, drawableY, - (unsigned) (width-1), (unsigned) (height-1)); - XDrawLine(display, drawable, instPtr->gc, drawableX, drawableY, - (int) (drawableX + width - 1), (int) (drawableY + height - 1)); - XDrawLine(display, drawable, instPtr->gc, drawableX, - (int) (drawableY + height - 1), - (int) (drawableX + width - 1), drawableY); -} - -/* - *---------------------------------------------------------------------- - * - * ImageFree -- - * - * This function is called when an instance of an image is no longer - * used. - * - * Results: - * None. - * - * Side effects: - * Information related to the instance is freed. - * - *---------------------------------------------------------------------- - */ - -static void -ImageFree( - ClientData clientData, /* Pointer to TImageInstance for instance. */ - Display *display) /* Display where image was to be drawn. */ -{ - TImageInstance *instPtr = (TImageInstance *)clientData; - char buffer[200]; - - snprintf(buffer, sizeof(buffer), "%s free", instPtr->modelPtr->imageName); - Tcl_SetVar2(instPtr->modelPtr->interp, instPtr->modelPtr->varName, NULL, - buffer, TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - Tk_FreeColor(instPtr->fg); - Tk_FreeGC(display, instPtr->gc); - ckfree(instPtr); -} - -/* - *---------------------------------------------------------------------- - * - * ImageDelete -- - * - * This function is called to clean up a test image when an application - * goes away. - * - * Results: - * None. - * - * Side effects: - * Information about the image is deleted. - * - *---------------------------------------------------------------------- - */ - -static void -ImageDelete( - ClientData clientData) /* Pointer to TImageModel for image. When - * this function is called, no more instances - * exist. */ -{ - TImageModel *timPtr = (TImageModel *)clientData; - char buffer[100]; - - snprintf(buffer, sizeof(buffer), "%s delete", timPtr->imageName); - Tcl_SetVar2(timPtr->interp, timPtr->varName, NULL, buffer, - TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT); - - Tcl_DeleteCommand(timPtr->interp, timPtr->imageName); - ckfree(timPtr->imageName); - ckfree(timPtr->varName); - ckfree(timPtr); -} -#endif - -/* - * Local Variables: - * mode: c - * c-basic-offset: 4 - * fill-column: 78 - * End: - */ diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index 422407f..c546167 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -46,12 +46,6 @@ EXTERN HINSTANCE Tk_GetHINSTANCE(void); EXTERN HWND Tk_GetHWND(Window window); /* 3 */ EXTERN Tk_Window Tk_HWNDToWindow(HWND hwnd); -/* 4 */ -EXTERN void Tk_PointerEvent(HWND hwnd, int x, int y); -/* 5 */ -EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message, - WPARAM wParam, LPARAM lParam, - LRESULT *result); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* Slot 0 is reserved */ @@ -60,9 +54,7 @@ EXTERN int Tk_TranslateWinEvent(HWND hwnd, UINT message, /* Slot 3 is reserved */ /* 4 */ EXTERN void TkMacOSXInitAppleEvents(Tcl_Interp *interp); -/* 5 */ -EXTERN void TkGenWMConfigureEvent_(Tk_Window tkwin, int x, int y, - int width, int height, int flags); +/* Slot 5 is reserved */ /* 6 */ EXTERN void TkMacOSXInvalClipRgns(Tk_Window tkwin); /* Slot 7 is reserved */ @@ -94,8 +86,6 @@ typedef struct TkPlatStubs { HINSTANCE (*tk_GetHINSTANCE) (void); /* 1 */ HWND (*tk_GetHWND) (Window window); /* 2 */ Tk_Window (*tk_HWNDToWindow) (HWND hwnd); /* 3 */ - void (*tk_PointerEvent) (HWND hwnd, int x, int y); /* 4 */ - int (*tk_TranslateWinEvent) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ void (*reserved0)(void); @@ -103,7 +93,7 @@ typedef struct TkPlatStubs { void (*reserved2)(void); void (*reserved3)(void); void (*tkMacOSXInitAppleEvents) (Tcl_Interp *interp); /* 4 */ - void (*tkGenWMConfigureEvent_) (Tk_Window tkwin, int x, int y, int width, int height, int flags); /* 5 */ + void (*reserved5)(void); void (*tkMacOSXInvalClipRgns) (Tk_Window tkwin); /* 6 */ void (*reserved7)(void); void * (*tkMacOSXGetRootControl) (Drawable drawable); /* 8 */ @@ -139,10 +129,6 @@ extern const TkPlatStubs *tkPlatStubsPtr; (tkPlatStubsPtr->tk_GetHWND) /* 2 */ #define Tk_HWNDToWindow \ (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ -#define Tk_PointerEvent \ - (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ -#define Tk_TranslateWinEvent \ - (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* Slot 0 is reserved */ @@ -151,8 +137,7 @@ extern const TkPlatStubs *tkPlatStubsPtr; /* Slot 3 is reserved */ #define TkMacOSXInitAppleEvents \ (tkPlatStubsPtr->tkMacOSXInitAppleEvents) /* 4 */ -#define TkGenWMConfigureEvent_ \ - (tkPlatStubsPtr->tkGenWMConfigureEvent_) /* 5 */ +/* Slot 5 is reserved */ #define TkMacOSXInvalClipRgns \ (tkPlatStubsPtr->tkMacOSXInvalClipRgns) /* 6 */ /* Slot 7 is reserved */ @@ -185,7 +170,6 @@ extern const TkPlatStubs *tkPlatStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkGenWMConfigureEvent_ #define Tk_MacOSXGetNSViewForDrawable TkMacOSXGetRootControl #endif /* _TKPLATDECLS */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 979b496..1a6a481 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -39,29 +39,12 @@ MODULE_SCOPE const TkStubs tkStubs; * Remove macro that might interfere with the definition below. */ -#undef Tk_FreeXId -#undef Tk_FreeStyleFromObj -#undef Tk_GetStyleFromObj -#undef TkWinGetPlatformId #undef TkPutImage #undef XPutImage #define TkMacOSXSetUpClippingRgn (void (*)(Drawable))(void *)doNothing #undef TkMacOSXIsCharacterMissing #define TkMacOSXIsCharacterMissing (int (*)(Tk_Font, unsigned int))(void *)doNothing -#if defined(_WIN32) && !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -# define Tk_TranslateWinEvent TkTranslateWinEvent -# define Tk_PointerEvent TkWinPointerEvent -#define TkWinGetPlatformId winGetPlatformId -static int TkWinGetPlatformId(void) { - return 2; -} -#else -# define Tk_TranslateWinEvent 0 -# define Tk_PointerEvent 0 -# define TkWinGetPlatformId 0 -#endif - #if defined(TK_NO_DEPRECATED) || (TCL_MAJOR_VERSION > 8) # define TkSetWindowMenuBar 0 # define TkpDrawHighlightBorder 0 @@ -79,29 +62,6 @@ doNothing(void) /* dummy implementation, no need to do anything */ return 0; } - -#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 -#define Tk_FreeXId 0 -#define Tk_FreeStyleFromObj 0 -#define Tk_GetStyleFromObj 0 -#define TkWinGetPlatformId 0 -#define Tk_PhotoPutBlock_NoComposite 0 -#define Tk_PhotoPutZoomedBlock_NoComposite 0 -#define Tk_PhotoExpand_Panic 0 -#define Tk_PhotoPutBlock_Panic 0 -#define Tk_PhotoPutZoomedBlock_Panic 0 -#define Tk_PhotoSetSize_Panic 0 -#define Tk_CreateOldPhotoImageFormat 0 -#else -#define Tk_FreeXId ((void (*)(Display *, XID))(void *)doNothing) -#define Tk_FreeStyleFromObj ((void (*)(Tcl_Obj *))(void *)doNothing) -#define Tk_GetStyleFromObj getStyleFromObj -static Tk_Style Tk_GetStyleFromObj(Tcl_Obj *obj) -{ - return Tk_AllocStyleFromObj(NULL, obj); -} -#endif /* !TK_NO_DEPRECATED */ - #define TkpCmapStressed_ TkpCmapStressed #define TkpSync_ TkpSync #define TkUnixContainerId_ TkUnixContainerId @@ -550,7 +510,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkWinSetForegroundWindow, /* 30 */ TkWinDialogDebug, /* 31 */ TkWinGetMenuSystemDefault, /* 32 */ - TkWinGetPlatformId, /* 33 */ + 0, /* 33 */ TkWinSetHINSTANCE, /* 34 */ TkWinGetPlatformTheme, /* 35 */ TkWinChildProc, /* 36 */ @@ -1009,8 +969,6 @@ static const TkPlatStubs tkPlatStubs = { Tk_GetHINSTANCE, /* 1 */ Tk_GetHWND, /* 2 */ Tk_HWNDToWindow, /* 3 */ - Tk_PointerEvent, /* 4 */ - Tk_TranslateWinEvent, /* 5 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ 0, /* 0 */ @@ -1018,7 +976,7 @@ static const TkPlatStubs tkPlatStubs = { 0, /* 2 */ 0, /* 3 */ TkMacOSXInitAppleEvents, /* 4 */ - TkGenWMConfigureEvent_, /* 5 */ + 0, /* 5 */ TkMacOSXInvalClipRgns, /* 6 */ 0, /* 7 */ TkMacOSXGetRootControl, /* 8 */ @@ -1120,7 +1078,7 @@ const TkStubs tkStubs = { Tk_FreeOptions, /* 74 */ Tk_FreePixmap, /* 75 */ Tk_FreeTextLayout, /* 76 */ - Tk_FreeXId, /* 77 */ + 0, /* 77 */ Tk_GCForColor, /* 78 */ Tk_GeometryRequest, /* 79 */ Tk_Get3DBorder, /* 80 */ @@ -1161,7 +1119,7 @@ const TkStubs tkStubs = { Tk_HandleEvent, /* 115 */ Tk_IdToWindow, /* 116 */ Tk_ImageChanged, /* 117 */ - Tk_Init, /* 118 */ + 0, /* 118 */ Tk_InternAtom, /* 119 */ Tk_IntersectTextLayout, /* 120 */ Tk_MaintainGeometry, /* 121 */ @@ -1187,13 +1145,13 @@ const TkStubs tkStubs = { Tk_NameToWindow, /* 141 */ Tk_OwnSelection, /* 142 */ Tk_ParseArgv, /* 143 */ - Tk_PhotoPutBlock_NoComposite, /* 144 */ - Tk_PhotoPutZoomedBlock_NoComposite, /* 145 */ + 0, /* 144 */ + 0, /* 145 */ Tk_PhotoGetImage, /* 146 */ Tk_PhotoBlank, /* 147 */ - Tk_PhotoExpand_Panic, /* 148 */ + 0, /* 148 */ Tk_PhotoGetSize, /* 149 */ - Tk_PhotoSetSize_Panic, /* 150 */ + 0, /* 150 */ Tk_PointToChar, /* 151 */ Tk_PostscriptFontName, /* 152 */ Tk_PreserveColormap, /* 153 */ @@ -1202,7 +1160,7 @@ const TkStubs tkStubs = { Tk_ResizeWindow, /* 156 */ Tk_RestackWindow, /* 157 */ Tk_RestrictEvents, /* 158 */ - Tk_SafeInit, /* 159 */ + 0, /* 159 */ Tk_SetAppName, /* 160 */ Tk_SetBackgroundFromBorder, /* 161 */ Tk_SetClass, /* 162 */ @@ -1259,7 +1217,7 @@ const TkStubs tkStubs = { Tk_RestoreSavedOptions, /* 213 */ Tk_SetOptions, /* 214 */ Tk_InitConsoleChannels, /* 215 */ - Tk_CreateConsoleWindow, /* 216 */ + 0, /* 216 */ Tk_CreateSmoothMethod, /* 217 */ 0, /* 218 */ 0, /* 219 */ @@ -1289,8 +1247,8 @@ const TkStubs tkStubs = { Tk_SetInternalBorderEx, /* 243 */ Tk_SetMinimumRequestSize, /* 244 */ Tk_SetCaretPos, /* 245 */ - Tk_PhotoPutBlock_Panic, /* 246 */ - Tk_PhotoPutZoomedBlock_Panic, /* 247 */ + 0, /* 246 */ + 0, /* 247 */ Tk_CollapseMotionEvents, /* 248 */ Tk_RegisterStyleEngine, /* 249 */ Tk_GetStyleEngine, /* 250 */ @@ -1301,8 +1259,8 @@ const TkStubs tkStubs = { Tk_FreeStyle, /* 255 */ Tk_NameOfStyle, /* 256 */ Tk_AllocStyleFromObj, /* 257 */ - Tk_GetStyleFromObj, /* 258 */ - Tk_FreeStyleFromObj, /* 259 */ + 0, /* 258 */ + 0, /* 259 */ Tk_GetStyledElement, /* 260 */ Tk_GetElementSize, /* 261 */ Tk_GetElementBox, /* 262 */ @@ -1315,8 +1273,8 @@ const TkStubs tkStubs = { Tk_GetUserInactiveTime, /* 269 */ Tk_ResetUserInactiveTime, /* 270 */ Tk_Interp, /* 271 */ - Tk_CreateOldImageType, /* 272 */ - Tk_CreateOldPhotoImageFormat, /* 273 */ + 0, /* 272 */ + 0, /* 273 */ Tk_AlwaysShowSelection, /* 274 */ Tk_GetButtonMask, /* 275 */ Tk_GetDoublePixelsFromObj, /* 276 */ diff --git a/macosx/Tk.xcodeproj/project.pbxproj b/macosx/Tk.xcodeproj/project.pbxproj index 47ed01a..e2acb38 100644 --- a/macosx/Tk.xcodeproj/project.pbxproj +++ b/macosx/Tk.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - F9067BCD0BFBA2900074F726 /* tkOldTest.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFE08F27A39005CB29B /* tkOldTest.c */; }; F9152B090EAF8A5000CD5C7B /* tkBusy.c in Sources */ = {isa = PBXBuildFile; fileRef = F9152B080EAF8A5000CD5C7B /* tkBusy.c */; }; F9152B0A0EAF8A5700CD5C7B /* tkBusy.c in Sources */ = {isa = PBXBuildFile; fileRef = F9152B080EAF8A5000CD5C7B /* tkBusy.c */; }; F92EE8BF0E62F846001A6E80 /* tkImgPhInstance.c in Sources */ = {isa = PBXBuildFile; fileRef = F92EE8BE0E62F846001A6E80 /* tkImgPhInstance.c */; }; @@ -520,7 +519,6 @@ F9FD317C0CC1AD070073837D /* tkMessage.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEC08F27A39005CB29B /* tkMessage.c */; }; F9FD317D0CC1AD070073837D /* tkObj.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAED08F27A39005CB29B /* tkObj.c */; }; F9FD317E0CC1AD070073837D /* tkOldConfig.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEE08F27A39005CB29B /* tkOldConfig.c */; }; - F9FD317F0CC1AD070073837D /* tkOldTest.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAFE08F27A39005CB29B /* tkOldTest.c */; }; F9FD31800CC1AD070073837D /* tkOption.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAEF08F27A39005CB29B /* tkOption.c */; }; F9FD31810CC1AD070073837D /* tkPack.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF008F27A39005CB29B /* tkPack.c */; }; F9FD31820CC1AD070073837D /* tkPanedWindow.c in Sources */ = {isa = PBXBuildFile; fileRef = F966BAF108F27A39005CB29B /* tkPanedWindow.c */; }; @@ -916,7 +914,6 @@ F966BAFB08F27A39005CB29B /* tkSelect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkSelect.c; sourceTree = ""; }; F966BAFC08F27A39005CB29B /* tkSelect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkSelect.h; sourceTree = ""; }; F966BAFD08F27A39005CB29B /* tkSquare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkSquare.c; sourceTree = ""; }; - F966BAFE08F27A39005CB29B /* tkOldTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkOldTest.c; sourceTree = ""; }; F966BAFF08F27A39005CB29B /* tkStubInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkStubInit.c; sourceTree = ""; }; F966BB0008F27A39005CB29B /* tkStubLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkStubLib.c; sourceTree = ""; }; F966BB0108F27A39005CB29B /* tkStyle.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tkStyle.c; sourceTree = ""; }; @@ -2417,7 +2414,6 @@ F966BAFB08F27A39005CB29B /* tkSelect.c */, F966BAFC08F27A39005CB29B /* tkSelect.h */, F966BAFD08F27A39005CB29B /* tkSquare.c */, - F966BAFE08F27A39005CB29B /* tkOldTest.c */, F966BAFF08F27A39005CB29B /* tkStubInit.c */, F966BB0008F27A39005CB29B /* tkStubLib.c */, F966BB0108F27A39005CB29B /* tkStyle.c */, @@ -4258,7 +4254,6 @@ F966BE0F08F27A3F005CB29B /* tkMessage.c in Sources */, F966BE1008F27A3F005CB29B /* tkObj.c in Sources */, F966BE1108F27A3F005CB29B /* tkOldConfig.c in Sources */, - F9067BCD0BFBA2900074F726 /* tkOldTest.c in Sources */, F966BE1208F27A3F005CB29B /* tkOption.c in Sources */, F966BE1308F27A3F005CB29B /* tkPack.c in Sources */, F966BE1408F27A3F005CB29B /* tkPanedWindow.c in Sources */, @@ -4572,7 +4567,6 @@ F9FD317C0CC1AD070073837D /* tkMessage.c in Sources */, F9FD317D0CC1AD070073837D /* tkObj.c in Sources */, F9FD317E0CC1AD070073837D /* tkOldConfig.c in Sources */, - F9FD317F0CC1AD070073837D /* tkOldTest.c in Sources */, F9FD31800CC1AD070073837D /* tkOption.c in Sources */, F9FD31810CC1AD070073837D /* tkPack.c in Sources */, F9FD31820CC1AD070073837D /* tkPanedWindow.c in Sources */, diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 443b34f..7f89a50 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -61,7 +61,7 @@ static void EmbedWindowDeleted(TkWindow *winPtr); /* *---------------------------------------------------------------------- * - * TkpMakeWindow -- + * Tk_MakeWindow -- * * Creates an X Window (Mac subwindow). * diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index f2b7c16..a821f59 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -16,34 +16,6 @@ #include "tkMacOSXPrivate.h" #include "tkMacOSXInt.h" #include "tkMacOSXConstants.h" -#if TCL_MAJOR_VERSION < 9 -#undef Tcl_MacOSXNotifierAddRunLoopMode -#ifdef USE_TCL_STUBS -#ifdef __cplusplus -extern "C" { -#endif -/* Little hack to eliminate the need for "tclInt.h" here: - Just copy a small portion of TclIntPlatStubs, just - enough to make it work. See [600b72bfbc] */ -typedef struct TclIntPlatStubs { - int magic; - void *hooks; - void (*dummy[19]) (void); /* dummy entries 0-18, not used */ - void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */ -} TclIntPlatStubs; -extern const TclIntPlatStubs *tclIntPlatStubsPtr; -#ifdef __cplusplus -} -#endif -#define Tcl_MacOSXNotifierAddRunLoopMode \ - (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */ -#elif TCL_MINOR_VERSION < 7 - extern void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode); -# define Tcl_MacOSXNotifierAddRunLoopMode TclMacOSXNotifierAddRunLoopMode -#else - extern void Tcl_MacOSXNotifierAddRunLoopMode(const void *runLoopMode); -#endif -#endif #import /* This is not used for anything at the moment. */ diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 76b8b33..cb4267b 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -865,6 +865,17 @@ XSetIconName( return Success; } +Bool +XFilterEvent( + XEvent *event, + Window window) +{ + (void)event; + (void)window; + + return 0; +} + int XForceScreenSaver( Display* display, diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 5a88a29..6ca3bc6 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -51,12 +51,6 @@ # ImgGetPhoto: no tests # Tk_PhotoGetImage no tests # ImgPostscriptPhoto no tests -# Tk_PhotoPutBlock_NoComposite no tests, probably none needed -# Tk_PhotoPutZoomedBlock_NoComposite no tests, probably none needed -# Tk_PhotoExpand_Panic no tests, probably none needed -# Tk_PhotoPutBlock_Panic no tests, probably none needed -# Tk_PhotoPutZoomedBlock_Panic no tests, probably none needed -# Tk_PhotoSetSize_Panic no tests, probably none needed # Tk_PhotoGetMetadata: imgPhoto-21.* # Tk_PhotoSetMetadata: imgPhoto-22.* #-------------------------------------------------------------------------- diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test index 2edd1d2..a66a310 100644 --- a/tests/unixEmbed.test +++ b/tests/unixEmbed.test @@ -963,7 +963,7 @@ test unixEmbed-6.2a {EmbedGeometryRequest procedure, window changes size} -const deleteWindows } -result {{configure .t1 200 200} 200x200+0+0} -# Can't think up any tests for TkpGetOtherWindow procedure. +# Can't think up any tests for Tk_GetOtherWindow procedure. test unixEmbed-7.1 {TkpRedirectKeyEvent procedure, forward keystroke} -constraints { unix notAqua diff --git a/tests/unixMenu.test b/tests/unixMenu.test index dafae08..57b3029 100644 --- a/tests/unixMenu.test +++ b/tests/unixMenu.test @@ -75,7 +75,7 @@ test unixMenu-6.2 {TkpSetWindowMenuBar - menu} -constraints unix -setup { } -returnCodes ok -result {{} {} {}} -test unixMenu-7.1 {TkpSetMainMenubar - nothing to do} -constraints unix -body {} +test unixMenu-7.1 {Tk_SetMainMenubar - nothing to do} -constraints unix -body {} test unixMenu-8.1 {GetMenuIndicatorGeometry - indicator off} -constraints { diff --git a/tests/winMenu.test b/tests/winMenu.test index 21768ef..2382d13 100644 --- a/tests/winMenu.test +++ b/tests/winMenu.test @@ -562,7 +562,7 @@ test winMenu-12.3 {TkpSetWindowMenuBar - no update pending} -constraints { } -result {0 {} {} {}} -test winMenu-13.1 {TkpSetMainMenubar - nothing to do} -constraints { +test winMenu-13.1 {Tk_SetMainMenubar - nothing to do} -constraints { emptyTest win } -body {} diff --git a/unix/Makefile.in b/unix/Makefile.in index 36b2e54..da17df8 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -348,7 +348,7 @@ ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@ WISH_OBJS = tkAppInit.o -TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o tkOldTest.o \ +TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o \ $(@TK_WINDOWINGSYSTEM@_TKTEST_OBJS) WIDG_OBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \ @@ -462,7 +462,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tkTextImage.c \ $(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \ $(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \ - $(GENERIC_DIR)/tkOldConfig.c $(GENERIC_DIR)/tkOldTest.c \ + $(GENERIC_DIR)/tkOldConfig.c \ $(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \ $(GENERIC_DIR)/tkStubInit.c @@ -1241,9 +1241,6 @@ tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkImgPhoto.h tkImgPhInstance.o: $(GENERIC_DIR)/tkImgPhInstance.c $(GENERIC_DIR)/tkImgPhoto.h $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhInstance.c -tkOldTest.o: $(GENERIC_DIR)/tkOldTest.c - $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkOldTest.c - tkTest.o: $(GENERIC_DIR)/tkTest.c tkUuid.h $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkTest.c diff --git a/win/Makefile.in b/win/Makefile.in index 2d3c3ea..8e2a9dc 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -281,7 +281,6 @@ WISH_OBJS = \ TKTEST_OBJS = \ tkSquare.$(OBJEXT) \ tkTest.$(OBJEXT) \ - tkOldTest.$(OBJEXT) \ tkWinTest.$(OBJEXT) XLIB_OBJS = \ @@ -765,9 +764,6 @@ testMain.$(OBJEXT): winMain.c tkTest.$(OBJEXT): tkTest.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) -tkOldTest.$(OBJEXT): tkOldTest.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - tkWinTest.$(OBJEXT): tkWinTest.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) diff --git a/win/makefile.vc b/win/makefile.vc index 5a5929e..910a0ce 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -153,7 +153,6 @@ TKTESTOBJS = \ $(TMP_DIR)\testMain.obj \ $(TMP_DIR)\tkSquare.obj \ $(TMP_DIR)\tkTest.obj \ - $(TMP_DIR)\tkOldTest.obj \ $(TMP_DIR)\tkWinTest.obj XLIBOBJS = \ @@ -623,9 +622,6 @@ $(TMP_DIR)\tkUuid.h: $(ROOT)\manifest.uuid $(TMP_DIR)\tkTest.obj: $(GENERICDIR)\tkTest.c $(cc32) $(appcflags_nostubs) -Fo$@ $? -$(TMP_DIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c - $(cc32) $(appcflags_nostubs) -Fo$@ $? - $(TMP_DIR)\tkWinTest.obj: $(WIN_DIR)\tkWinTest.c $(cc32) $(appcflags_nostubs) -Fo$@ $? diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index b4eed29..53432d7 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -232,7 +232,7 @@ TkpScanWindowId( /* *---------------------------------------------------------------------- * - * TkpMakeWindow -- + * Tk_MakeWindow -- * * Creates a Windows window object based on the current attributes of the * specified TkWindow. -- cgit v0.12 From 079f15d9e398e28651c0185842c5e9842272d6b9 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 12:43:54 +0000 Subject: Remove more deprecated stuff. Join "X functions" stub tables for Win and MacOS together as a single platform-independant table --- generic/tk.h | 4 - generic/tkInt.decls | 876 ++++++++------------------------------------- generic/tkInt.h | 11 - generic/tkIntDecls.h | 90 ++--- generic/tkIntPlatDecls.h | 147 ++++---- generic/tkIntXlibDecls.h | 896 ----------------------------------------------- generic/tkPkgConfig.c | 8 - generic/tkStubInit.c | 243 ++----------- tests/embed.test | 10 +- tests/menu.test | 32 +- tests/unixEmbed.test | 18 +- xlib/X11/keysymdef.h | 24 -- 12 files changed, 298 insertions(+), 2061 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index 32fcc17..9678a06 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -743,10 +743,6 @@ typedef XActivateDeactivateEvent XDeactivateEvent; (((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE) #define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth) #define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight) -#ifndef TK_NO_DEPRECATED -#define Tk_InternalBorderWidth(tkwin) \ - (((Tk_FakeWin *) (tkwin))->internalBorderLeft) -#endif /* !TK_NO_DEPRECATED */ #define Tk_InternalBorderLeft(tkwin) \ (((Tk_FakeWin *) (tkwin))->internalBorderLeft) #define Tk_InternalBorderRight(tkwin) \ diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 78e6cf2..e056e3f 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -226,9 +226,6 @@ declare 58 { declare 59 { void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name) } -declare 60 {deprecated {renamed to Tk_GetOtherWindow}} { - TkWindow *TkpGetOtherWindow(TkWindow *winPtr) -} declare 61 { TkWindow *TkpGetWrapperWindow(TkWindow *winPtr) } @@ -239,15 +236,9 @@ declare 63 { void TkpInitializeMenuBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable) } -declare 64 {deprecated {renamed to Tk_MakeContainer}} { - void TkpMakeContainer(Tk_Window tkwin) -} declare 65 { void TkpMakeMenuWindow(Tk_Window tkwin, int transient) } -declare 66 {deprecated {renamed to Tk_MakeWindow}} { - Window TkpMakeWindow(TkWindow *winPtr, Window parent) -} declare 67 { void TkpMenuNotifyToplevelCreate(Tcl_Interp *interp, const char *menuName) } @@ -269,15 +260,6 @@ declare 72 { declare 73 { void TkpRedirectKeyEvent(TkWindow *winPtr, XEvent *eventPtr) } -declare 74 {deprecated {renamed to Tk_SetMainMenubar}} { - void TkpSetMainMenubar(Tcl_Interp *interp, Tk_Window tkwin, const char *menuName) -} -declare 75 {deprecated {renamed to Tk_UseWindow}} { - int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, const char *string) -} -# -# Slot 76 unused (WAS: TkpWindowWasRecentlyDeleted) -# declare 77 { void TkQueueEventForAllChildren(TkWindow *winPtr, XEvent *eventPtr) } @@ -302,16 +284,6 @@ declare 82 { declare 83 { void TkSelPropProc(XEvent *eventPtr) } - -# Exported publically as Tk_SetClassProcs in 8.4a2 -#declare 84 { -# void TkSetClassProcs(Tk_Window tkwin, -# TkClassProcs *procs, void *instanceData) -#} -declare 85 {deprecated {renamed to Tk_SetWindowMenubar}} { - void TkSetWindowMenuBar(Tcl_Interp *interp, Tk_Window tkwin, - const char *oldMenuName, const char *menuName) -} declare 86 { KeySym TkStringToKeysym(const char *name) } @@ -394,10 +366,6 @@ declare 109 { declare 110 { void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont) } -declare 111 {deprecated {renamed to Tk_GetSystemDefault}} { - Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin, - const char *dbName, const char *className) -} declare 112 { void TkpMenuThreadInit(void) } @@ -434,10 +402,6 @@ declare 124 aqua { Pixmap TkpGetNativeAppBitmap(Display *display, const char *name, int *width, int *height) } -declare 135 {deprecated {renamed to Tk_DrawHighlightBorder}} { - void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC, - int highlightWidth, Drawable drawable) -} declare 136 { void TkSetFocusWin(TkWindow *winPtr, int force) } @@ -666,58 +630,36 @@ declare 0 x11 { declare 2 x11 { void TkGenerateActivateEvents(TkWindow *winPtr, int active) } -declare 3 x11 { - int TkpCmapStressed(Tk_Window tkwin, Colormap colormap) -} -declare 4 x11 { - void TkpSync(Display *display) -} -declare 5 x11 { - Window TkUnixContainerId(TkWindow *winPtr) -} -declare 6 x11 { - int TkUnixDoOneXEvent(Tcl_Time *timePtr) -} -declare 7 x11 { - void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) -} declare 8 x11 { int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } declare 9 x11 { void TkWmCleanup(TkDisplay *dispPtr) } -declare 10 x11 { - void TkSendCleanup(TkDisplay *dispPtr) -} declare 12 x11 { int TkpWmSetState(TkWindow *winPtr, int state) } # only needed by tktest: -declare 13 x11 { - int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp, Tcl_Size objc, - Tcl_Obj *const objv[]) -} declare 38 x11 { - int TkpCmapStressed_(Tk_Window tkwin, Colormap colormap) + int TkpCmapStressed(Tk_Window tkwin, Colormap colormap) } declare 39 x11 { - void TkpSync_(Display *display) + void TkpSync(Display *display) } declare 40 x11 { - Window TkUnixContainerId_(TkWindow *winPtr) + Window TkUnixContainerId(TkWindow *winPtr) } declare 41 x11 { - int TkUnixDoOneXEvent_(Tcl_Time *timePtr) + int TkUnixDoOneXEvent(Tcl_Time *timePtr) } declare 42 x11 { - void TkUnixSetMenubar_(Tk_Window tkwin, Tk_Window menubar) + void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) } declare 43 x11 { - void TkWmCleanup_(TkDisplay *dispPtr) + void TkWmCleanup(TkDisplay *dispPtr) } declare 44 x11 { - void TkSendCleanup_(TkDisplay *dispPtr) + void TkSendCleanup(TkDisplay *dispPtr) } # only needed by tktest: declare 45 x11 { @@ -885,11 +827,8 @@ declare 47 win { ################################ # Aqua specific functions -declare 0 aqua { - void TkGenerateActivateEvents(TkWindow *winPtr, int active) -} declare 2 aqua { - void TkGenerateActivateEvents_(TkWindow *winPtr, int active) + void TkGenerateActivateEvents(TkWindow *winPtr, int active) } declare 3 aqua { void TkPointerDeadWindow(TkWindow *winPtr) @@ -948,9 +887,6 @@ declare 18 aqua { declare 21 aqua { void TkMacOSXInvalidateWindow(MacDrawable *macWin, int flag) } -declare 22 aqua { - int TkMacOSXIsCharacterMissing(Tk_Font tkfont, unsigned int searchChar) -} declare 23 aqua { void TkMacOSXMakeRealWindowExist(TkWindow *winPtr) } @@ -973,9 +909,6 @@ declare 28 aqua { declare 29 aqua { void TkMacOSXSetScrollbarGrow(TkWindow *winPtr, int flag) } -declare 30 aqua { - void TkMacOSXSetUpClippingRgn(Drawable drawable) -} declare 31 aqua { void TkMacOSXSetUpGraphicsPort(GC gc, void *destPort) } @@ -1057,413 +990,413 @@ declare 55 aqua { interface tkIntXlib ################################ -# X functions for Windows +# X functions -declare 0 win { +declare 0 { int XSetDashes(Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n) } -declare 1 win { +declare 1 { XModifierKeymap *XGetModifierMapping(Display *d) } -declare 2 win { +declare 2 { 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) } -declare 3 win { +declare 3 { XImage *XGetImage(Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3) } -declare 4 win { +declare 4 { char *XGetAtomName(Display *d, Atom a) } -declare 5 win { +declare 5 { char *XKeysymToString(KeySym k) } -declare 6 win { +declare 6 { Colormap XCreateColormap(Display *d, Window w, Visual *v, int i) } -declare 7 win { +declare 7 { Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2) } -declare 8 win { +declare 8 { Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2) } -declare 9 win { +declare 9 { GContext XGContextFromGC(GC g) } -declare 10 win { +declare 10 { XHostAddress *XListHosts(Display *d, int *i, Bool *b) } # second parameter was of type KeyCode -declare 11 win { +declare 11 { KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i) } -declare 12 win { +declare 12 { KeySym XStringToKeysym(_Xconst char *c) } -declare 13 win { +declare 13 { Window XRootWindow(Display *d, int i) } -declare 14 win { +declare 14 { XErrorHandler XSetErrorHandler(XErrorHandler x) } -declare 15 win { +declare 15 { Status XIconifyWindow(Display *d, Window w, int i) } -declare 16 win { +declare 16 { Status XWithdrawWindow(Display *d, Window w, int i) } -declare 17 win { +declare 17 { Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip) } -declare 18 win { +declare 18 { Status XAllocColor(Display *d, Colormap c, XColor *xp) } -declare 19 win { +declare 19 { int XBell(Display *d, int i) } -declare 20 win { +declare 20 { int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3) } -declare 21 win { +declare 21 { int XChangeWindowAttributes(Display *d, Window w, unsigned long ul, XSetWindowAttributes *x) } -declare 22 win { +declare 22 { int XClearWindow(Display *d, Window w) } -declare 23 win { +declare 23 { int XConfigureWindow(Display *d, Window w, unsigned int i, XWindowChanges *x) } -declare 24 win { +declare 24 { int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } -declare 25 win { +declare 25 { int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul) } -declare 26 win { +declare 26 { Pixmap XCreateBitmapFromData(Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height) } -declare 27 win { +declare 27 { int XDefineCursor(Display *d, Window w, Cursor c) } -declare 28 win { +declare 28 { int XDeleteProperty(Display *d, Window w, Atom a) } -declare 29 win { +declare 29 { int XDestroyWindow(Display *d, Window w) } -declare 30 win { +declare 30 { int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } -declare 31 win { +declare 31 { int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2) } -declare 32 win { +declare 32 { int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2) } -declare 33 win { +declare 33 { int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } -declare 34 win { +declare 34 { int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3) } -declare 35 win { +declare 35 { int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i) } -declare 36 win { +declare 36 { int XForceScreenSaver(Display *d, int i) } -declare 37 win { +declare 37 { int XFreeColormap(Display *d, Colormap c) } -declare 38 win { +declare 38 { int XFreeColors(Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul) } -declare 39 win { +declare 39 { int XFreeCursor(Display *d, Cursor c) } -declare 40 win { +declare 40 { int XFreeModifiermap(XModifierKeymap *x) } -declare 41 win { +declare 41 { Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4) } -declare 42 win { +declare 42 { int XGetInputFocus(Display *d, Window *w, int *i) } -declare 43 win { +declare 43 { int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp) } -declare 44 win { +declare 44 { Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x) } -declare 45 win { +declare 45 { int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t) } -declare 46 win { +declare 46 { int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t) } -declare 47 win { +declare 47 { KeyCode XKeysymToKeycode(Display *d, KeySym k) } -declare 48 win { +declare 48 { Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2) } -declare 49 win { +declare 49 { int XMapWindow(Display *d, Window w) } -declare 50 win { +declare 50 { int XMoveResizeWindow(Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2) } -declare 51 win { +declare 51 { int XMoveWindow(Display *d, Window w, int i1, int i2) } -declare 52 win { +declare 52 { int XNextEvent(Display *d, XEvent *x) } -declare 53 win { +declare 53 { int XPutBackEvent(Display *d, XEvent *x) } -declare 54 win { +declare 54 { int XQueryColors(Display *d, Colormap c, XColor *x, int i) } -declare 55 win { +declare 55 { Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui) } -declare 56 win { +declare 56 { Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui) } -declare 57 win { +declare 57 { int XRaiseWindow(Display *d, Window w) } -declare 58 win { +declare 58 { int XRefreshKeyboardMapping(XMappingEvent *x) } -declare 59 win { +declare 59 { int XResizeWindow(Display *d, Window w, unsigned int ui1, unsigned int ui2) } -declare 60 win { +declare 60 { int XSelectInput(Display *d, Window w, long l) } -declare 61 win { +declare 61 { Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) } -declare 62 win { +declare 62 { int XSetCommand(Display *d, Window w, char **c, int i) } -declare 63 win { +declare 63 { int XSetIconName(Display *d, Window w, _Xconst char *c) } -declare 64 win { +declare 64 { int XSetInputFocus(Display *d, Window w, int i, Time t) } -declare 65 win { +declare 65 { int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) } -declare 66 win { +declare 66 { int XSetWindowBackground(Display *d, Window w, unsigned long ul) } -declare 67 win { +declare 67 { int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) } -declare 68 win { +declare 68 { int XSetWindowBorder(Display *d, Window w, unsigned long ul) } -declare 69 win { +declare 69 { int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) } -declare 70 win { +declare 70 { int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) } -declare 71 win { +declare 71 { int XSetWindowColormap(Display *d, Window w, Colormap c) } -declare 72 win { +declare 72 { Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3) } -declare 73 win { +declare 73 { int XUngrabKeyboard(Display *d, Time t) } -declare 74 win { +declare 74 { int XUngrabPointer(Display *d, Time t) } -declare 75 win { +declare 75 { int XUnmapWindow(Display *d, Window w) } -declare 76 win { +declare 76 { int XWindowEvent(Display *d, Window w, long l, XEvent *x) } -declare 77 win { +declare 77 { void XDestroyIC(XIC x) } -declare 78 win { +declare 78 { Bool XFilterEvent(XEvent *x, Window w) } -declare 79 win { +declare 79 { int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s) } -declare 80 win { +declare 80 { int TkPutImage(unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height) } -declare 81 win { +declare 81 { int XSetClipRectangles(Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering) } -declare 82 win { +declare 82 { Status XParseColor(Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr) } -declare 83 win { +declare 83 { GC XCreateGC(Display *display, Drawable d, unsigned long valuemask, XGCValues *values) } -declare 84 win { +declare 84 { int XFreeGC(Display *display, GC gc) } -declare 85 win { +declare 85 { Atom XInternAtom(Display *display, _Xconst char *atom_name, Bool only_if_exists) } -declare 86 win { +declare 86 { int XSetBackground(Display *display, GC gc, unsigned long foreground) } -declare 87 win { +declare 87 { int XSetForeground(Display *display, GC gc, unsigned long foreground) } -declare 88 win { +declare 88 { int XSetClipMask(Display *display, GC gc, Pixmap pixmap) } -declare 89 win { +declare 89 { int XSetClipOrigin(Display *display, GC gc, int clip_x_origin, int clip_y_origin) } -declare 90 win { +declare 90 { int XSetTSOrigin(Display *display, GC gc, int ts_x_origin, int ts_y_origin) } -declare 91 win { +declare 91 { int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values) } -declare 92 win { +declare 92 { int XSetFont(Display *display, GC gc, Font font) } -declare 93 win { +declare 93 { int XSetArcMode(Display *display, GC gc, int arc_mode) } -declare 94 win { +declare 94 { int XSetStipple(Display *display, GC gc, Pixmap stipple) } -declare 95 win { +declare 95 { int XSetFillRule(Display *display, GC gc, int fill_rule) } -declare 96 win { +declare 96 { int XSetFillStyle(Display *display, GC gc, int fill_style) } -declare 97 win { +declare 97 { int XSetFunction(Display *display, GC gc, int function) } -declare 98 win { +declare 98 { int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style) } -declare 99 win { +declare 99 { int _XInitImageFuncPtrs(XImage *image) } -declare 100 win { +declare 100 { XIC XCreateIC(XIM xim, ...) } -declare 101 win { +declare 101 { XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return) } -declare 102 win { +declare 102 { void XSetWMClientMachine(Display *display, Window w, XTextProperty *text_prop) } -declare 103 win { +declare 103 { Status XStringListToTextProperty(char **list, int count, XTextProperty *text_prop_return) } -declare 104 win { +declare 104 { int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2) } -declare 105 win { +declare 105 { int XWarpPointer(Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy) } -declare 106 win { +declare 106 { int XFillRectangle(Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height) } # New in Tk 8.6 -declare 107 win { +declare 107 { int XFlush(Display *display) } -declare 108 win { +declare 108 { int XGrabServer(Display *display) } -declare 109 win { +declare 109 { int XUngrabServer(Display *display) } -declare 110 win { +declare 110 { int XFree(void *data) } -declare 111 win { +declare 111 { int XNoOp(Display *display) } -declare 112 win { +declare 112 { XAfterFunction XSynchronize(Display *display, Bool onoff) } -declare 113 win { +declare 113 { int XSync(Display *display, Bool discard) } -declare 114 win { +declare 114 { VisualID XVisualIDFromVisual(Visual *visual) } # For tktreectrl -declare 120 win { +declare 120 { int XOffsetRegion(Region rgn, int dx, int dy) } -declare 121 win { +declare 121 { int XUnionRegion(Region srca, Region srcb, Region dr_return) } # For 3dcanvas -declare 122 win { +declare 122 { Window XCreateWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clazz, @@ -1472,593 +1405,92 @@ declare 122 win { } # Various, e.g. for stub-enabled BLT -declare 129 win { +declare 129 { int XLowerWindow(Display *d, Window w) } -declare 130 win { +declare 130 { int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) } -declare 131 win { +declare 131 { int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) } -declare 132 win { +declare 132 { int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n) } -declare 133 win { +declare 133 { int XDrawSegments(Display *d, Drawable dr, GC gc, XSegment *s, int n) } -declare 134 win { +declare 134 { int XDrawPoint(Display *d, Drawable dr, GC gc, int x, int y) } -declare 135 win { +declare 135 { int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m) } -declare 136 win { +declare 136 { int XReparentWindow(Display *d, Window w, Window p, int x, int y) } -declare 137 win { +declare 137 { int XPutImage(Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h) } -declare 138 win { +declare 138 { Region XPolygonRegion(XPoint *pts, int n, int rule) } -declare 139 win { +declare 139 { int XPointInRegion(Region rgn, int x, int y) } # For XIM -declare 140 win { +declare 140 { XVaNestedList XVaCreateNestedList(int dummy, ...) } -declare 141 win { +declare 141 { char *XSetICValues(XIC xic, ...) } -declare 142 win { +declare 142 { char *XGetICValues(XIC xic, ...) } -declare 143 win { +declare 143 { void XSetICFocus(XIC xic) } -declare 147 win { +declare 147 { void XFreeFontSet(Display *display, XFontSet fontset) } -declare 148 win { +declare 148 { int XCloseIM(XIM im) } -declare 149 win { +declare 149 { Bool XRegisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data) } -declare 150 win { +declare 150 { Bool XUnregisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data) } -declare 151 win { +declare 151 { char *XSetLocaleModifiers(const char *modifier_list) } -declare 152 win { +declare 152 { XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, char *res_class) } -declare 153 win { +declare 153 { char *XGetIMValues(XIM im, ...) } -declare 154 win { +declare 154 { char *XSetIMValues(XIM im, ...) } -declare 155 win { +declare 155 { XFontSet XCreateFontSet(Display *display, _Xconst char *base_font_name_list, char ***missing_charset_list, int *missing_charset_count, char **def_string) } -declare 156 win { +declare 156 { void XFreeStringList(char **list) } -declare 157 win { +declare 157 { KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, int i) } -declare 158 win { - Display *XkbOpenDisplay(const char *name, int *ev_rtrn, int *err_rtrn, - int *major_rtrn, int *minor_rtrn, int *reason) -} - -################################ -# X functions for MacOSX - -declare 0 macosx { - int XSetDashes(Display *display, GC gc, int dash_offset, - _Xconst char *dash_list, int n) -} -declare 1 macosx { - XModifierKeymap *XGetModifierMapping(Display *d) -} -declare 2 macosx { - 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) -} -declare 3 macosx { - XImage *XGetImage(Display *d, Drawable dr, int i1, int i2, - unsigned int ui1, unsigned int ui2, unsigned long ul, int i3) -} -declare 4 macosx { - char *XGetAtomName(Display *d, Atom a) -} -declare 5 macosx { - char *XKeysymToString(KeySym k) -} -declare 6 macosx { - Colormap XCreateColormap(Display *d, Window w, Visual *v, int i) -} -declare 7 macosx { - GContext XGContextFromGC(GC g) -} -# second parameter was of type KeyCode -declare 8 macosx { - KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i) -} -declare 9 macosx { - KeySym XStringToKeysym(_Xconst char *c) -} -declare 10 macosx { - Window XRootWindow(Display *d, int i) -} -declare 11 macosx { - XErrorHandler XSetErrorHandler(XErrorHandler x) -} -declare 12 macosx { - Status XAllocColor(Display *d, Colormap c, XColor *xp) -} -declare 13 macosx { - int XBell(Display *d, int i) -} -declare 14 macosx { - int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, - int i2, _Xconst unsigned char *c, int i3) -} -declare 15 macosx { - int XChangeWindowAttributes(Display *d, Window w, unsigned long ul, - XSetWindowAttributes *x) -} -declare 16 macosx { - int XConfigureWindow(Display *d, Window w, unsigned int i, - XWindowChanges *x) -} -declare 17 macosx { - int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, - int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) -} -declare 18 macosx { - int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, - int i2, unsigned int ui1, - unsigned int ui2, int i3, int i4, unsigned long ul) -} -declare 19 macosx { - Pixmap XCreateBitmapFromData(Display *display, Drawable d, - _Xconst char *data, unsigned int width, unsigned int height) -} -declare 20 macosx { - int XDefineCursor(Display *d, Window w, Cursor c) -} -declare 21 macosx { - int XDestroyWindow(Display *d, Window w) -} -declare 22 macosx { - int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, - unsigned int ui1, unsigned int ui2, int i3, int i4) -} -declare 23 macosx { - int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2) -} -declare 24 macosx { - int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, - unsigned int ui1, unsigned int ui2) -} -declare 25 macosx { - int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, - unsigned int ui1, unsigned int ui2, int i3, int i4) -} -declare 26 macosx { - int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, - int i1, int i2, int i3) -} -declare 27 macosx { - int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i) -} -declare 28 macosx { - int XFreeColormap(Display *d, Colormap c) -} -declare 29 macosx { - int XFreeColors(Display *d, Colormap c, - unsigned long *ulp, int i, unsigned long ul) -} -declare 30 macosx { - int XFreeModifiermap(XModifierKeymap *x) -} -declare 31 macosx { - Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, - int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, - unsigned int *ui4) -} -declare 32 macosx { - int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, - Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, - unsigned long *ulp2, unsigned char **cpp) -} -declare 33 macosx { - int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t) -} -declare 34 macosx { - int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, - int i1, int i2, Window w2, Cursor c, Time t) -} -declare 35 macosx { - KeyCode XKeysymToKeycode(Display *d, KeySym k) -} -declare 36 macosx { - int XMapWindow(Display *d, Window w) -} -declare 37 macosx { - int XMoveResizeWindow(Display *d, Window w, int i1, int i2, - unsigned int ui1, unsigned int ui2) -} -declare 38 macosx { - int XMoveWindow(Display *d, Window w, int i1, int i2) -} -declare 39 macosx { - Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, - int *i1, int *i2, int *i3, int *i4, unsigned int *ui) -} -declare 40 macosx { - int XRaiseWindow(Display *d, Window w) -} -declare 41 macosx { - int XRefreshKeyboardMapping(XMappingEvent *x) -} -declare 42 macosx { - int XResizeWindow(Display *d, Window w, unsigned int ui1, - unsigned int ui2) -} -declare 43 macosx { - int XSelectInput(Display *d, Window w, long l) -} -declare 44 macosx { - Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) -} -declare 45 macosx { - int XSetIconName(Display *d, Window w, _Xconst char *c) -} -declare 46 macosx { - int XSetInputFocus(Display *d, Window w, int i, Time t) -} -declare 47 macosx { - int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) -} -declare 48 macosx { - int XSetWindowBackground(Display *d, Window w, unsigned long ul) -} -declare 49 macosx { - int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) -} -declare 50 macosx { - int XSetWindowBorder(Display *d, Window w, unsigned long ul) -} -declare 51 macosx { - int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) -} -declare 52 macosx { - int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) -} -declare 53 macosx { - int XSetWindowColormap(Display *d, Window w, Colormap c) -} -declare 54 macosx { - int XUngrabKeyboard(Display *d, Time t) -} -declare 55 macosx { - int XUngrabPointer(Display *d, Time t) -} -declare 56 macosx { - int XUnmapWindow(Display *d, Window w) -} -declare 57 macosx { - int TkPutImage(unsigned long *colors, int ncolors, Display *display, - Drawable d, GC gc, XImage *image, int src_x, int src_y, - int dest_x, int dest_y, unsigned int width, unsigned int height) -} -declare 58 macosx { - Status XParseColor(Display *display, Colormap map, - _Xconst char *spec, XColor *colorPtr) -} -declare 59 macosx { - GC XCreateGC(Display *display, Drawable d, - unsigned long valuemask, XGCValues *values) -} -declare 60 macosx { - int XFreeGC(Display *display, GC gc) -} -declare 61 macosx { - Atom XInternAtom(Display *display, _Xconst char *atom_name, - Bool only_if_exists) -} -declare 62 macosx { - int XSetBackground(Display *display, GC gc, unsigned long foreground) -} -declare 63 macosx { - int XSetForeground(Display *display, GC gc, unsigned long foreground) -} -declare 64 macosx { - int XSetClipMask(Display *display, GC gc, Pixmap pixmap) -} -declare 65 macosx { - int XSetClipOrigin(Display *display, GC gc, - int clip_x_origin, int clip_y_origin) -} -declare 66 macosx { - int XSetTSOrigin(Display *display, GC gc, - int ts_x_origin, int ts_y_origin) -} -declare 67 macosx { - int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values) -} -declare 68 macosx { - int XSetFont(Display *display, GC gc, Font font) -} -declare 69 macosx { - int XSetArcMode(Display *display, GC gc, int arc_mode) -} -declare 70 macosx { - int XSetStipple(Display *display, GC gc, Pixmap stipple) -} -declare 71 macosx { - int XSetFillRule(Display *display, GC gc, int fill_rule) -} -declare 72 macosx { - int XSetFillStyle(Display *display, GC gc, int fill_style) -} -declare 73 macosx { - int XSetFunction(Display *display, GC gc, int function) -} -declare 74 macosx { - int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, - int line_style, int cap_style, int join_style) -} -declare 75 macosx { - int _XInitImageFuncPtrs(XImage *image) -} -declare 76 macosx { - XIC XCreateIC(XIM xim, ...) -} -declare 77 macosx { - XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, - XVisualInfo *vinfo_template, int *nitems_return) -} -declare 78 macosx { - void XSetWMClientMachine(Display *display, Window w, - XTextProperty *text_prop) -} -declare 79 macosx { - Status XStringListToTextProperty(char **list, int count, - XTextProperty *text_prop_return) -} -declare 80 macosx { - int XDrawSegments(Display *display, Drawable d, GC gc, - XSegment *segments, int nsegments) -} -declare 81 macosx { - int XForceScreenSaver(Display *display, int mode) -} -declare 82 macosx { - int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, - int x2, int y2) -} -declare 83 macosx { - int XFillRectangle(Display *display, Drawable d, GC gc, - int x, int y, unsigned int width, unsigned int height) -} -declare 84 macosx { - int XClearWindow(Display *d, Window w) -} -declare 85 macosx { - int XDrawPoint(Display *display, Drawable d, GC gc, int x, int y) -} -declare 86 macosx { - int XDrawPoints(Display *display, Drawable d, GC gc, XPoint *points, - int npoints, int mode) -} -declare 87 macosx { - int XWarpPointer(Display *display, Window src_w, Window dest_w, - int src_x, int src_y, unsigned int src_width, - unsigned int src_height, int dest_x, int dest_y) -} -declare 88 macosx { - int XQueryColor(Display *display, Colormap colormap, XColor *def_in_out) -} -declare 89 macosx { - int XQueryColors(Display *display, Colormap colormap, - XColor *defs_in_out, int ncolors) -} -declare 90 macosx { - Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3, - Window **w4, unsigned int *ui) -} -declare 91 macosx { - int XSync(Display *display, Bool discard) -} -declare 92 macosx { - Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, - int i2, int *i3, int *i4, Window *w3) -} -declare 93 macosx { - int XDeleteProperty(Display *d, Window w, Atom a) -} -declare 94 macosx { - int XFreeCursor(Display *d, Cursor c) -} -declare 95 macosx { - int XGetInputFocus(Display *d, Window *w, int *i) -} -declare 96 macosx { - int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i, - KeySym *k, Status *s) -} -declare 97 macosx { - int XNextEvent(Display *d, XEvent *x) -} -declare 98 macosx { - int XPutBackEvent(Display *d, XEvent *x) -} -declare 99 macosx { - int XSetCommand(Display *d, Window w, char **c, int i) -} -declare 100 macosx { - int XWindowEvent(Display *d, Window w, long l, XEvent *x) -} -declare 101 macosx { - Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x) -} -declare 102 macosx { - Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip) -} -declare 103 macosx { - Status XIconifyWindow(Display *d, Window w, int i) -} -declare 104 macosx { - Status XWithdrawWindow(Display *d, Window w, int i) -} -declare 105 macosx { - XHostAddress *XListHosts(Display *d, int *i, Bool *b) -} -declare 106 macosx { - int XSetClipRectangles(Display *display, GC gc, int clip_x_origin, - int clip_y_origin, XRectangle rectangles[], int n, int ordering) -} -declare 107 macosx { - int XFlush(Display *display) -} -declare 108 macosx { - int XGrabServer(Display *display) -} -declare 109 macosx { - int XUngrabServer(Display *display) -} -declare 110 macosx { - int XFree(void *data) -} -declare 111 macosx { - int XNoOp(Display *display) -} -declare 112 macosx { - XAfterFunction XSynchronize(Display *display, Bool onoff) -} -declare 113 macosx { - Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2, - XColor *x1, XColor *x2) -} -declare 114 macosx { - VisualID XVisualIDFromVisual(Visual *visual) -} -declare 120 macosx { - int XOffsetRegion(Region rgn, int dx, int dy) -} -declare 121 macosx { - int XUnionRegion(Region srca, Region srcb, Region dr_return) -} -declare 122 macosx { - Window XCreateWindow(Display *display, Window parent, int x, int y, - unsigned int width, unsigned int height, - unsigned int border_width, int depth, unsigned int clazz, - Visual *visual, unsigned long value_mask, - XSetWindowAttributes *attributes) -} -declare 129 macosx { - int XLowerWindow(Display *d, Window w) -} -declare 130 macosx { - int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) -} -declare 131 macosx { - int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) -} -declare 132 macosx { - int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n) -} -declare 136 macosx { - int XReparentWindow(Display *d, Window w, Window p, int x, int y) -} -declare 137 macosx { - int XPutImage(Display *d, Drawable dr, GC gc, XImage *im, - int sx, int sy, int dx, int dy, - unsigned int w, unsigned int h) -} -declare 138 macosx { - Region XPolygonRegion(XPoint *pts, int n, int rule) -} -declare 139 macosx { - int XPointInRegion(Region rgn, int x, int y) -} -declare 140 macosx { - XVaNestedList XVaCreateNestedList(int dummy, ...) -} -declare 141 macosx { - char *XSetICValues(XIC xic, ...) -} -declare 142 macosx { - char *XGetICValues(XIC xic, ...) -} -declare 143 macosx { - void XSetICFocus(XIC xic) -} -declare 144 macosx { - void XDestroyIC(XIC xic) -} -declare 145 macosx { - Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, - XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2) -} -declare 146 macosx { - Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, - unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, - XColor _Xconst *x2) -} -declare 147 macosx { - void XFreeFontSet(Display *display, XFontSet fontset) -} -declare 148 macosx { - int XCloseIM(XIM im) -} -declare 149 macosx { - Bool XRegisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, - char *res_name, char *res_class, XIDProc callback, XPointer client_data) -} -declare 150 macosx { - Bool XUnregisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, - char *res_name, char *res_class, XIDProc callback, XPointer client_data) -} -declare 151 macosx { - char *XSetLocaleModifiers(const char *modifier_list) -} -declare 152 macosx { - XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, - char *res_class) -} -declare 153 macosx { - char *XGetIMValues(XIM im, ...) -} -declare 154 macosx { - char *XSetIMValues(XIM im, ...) -} -declare 155 macosx { - XFontSet XCreateFontSet(Display *display, _Xconst char *base_font_name_list, - char ***missing_charset_list, int *missing_charset_count, char **def_string) -} -declare 156 macosx { - void XFreeStringList(char **list) -} -declare 157 macosx { - KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, int i) -} -declare 158 macosx { +declare 158 { Display *XkbOpenDisplay(const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason) } diff --git a/generic/tkInt.h b/generic/tkInt.h index ebfa348..9f5a31b 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -549,17 +549,6 @@ typedef struct TkDisplay { * The following field were all added for Tk8.3 */ -#if TCL_MAJOR_VERSION < 9 -#if !defined(TK_NO_DEPRECATED) - int mouseButtonState; /* Current mouse button state for this - * display. NOT USED as of 8.6.10 */ - Window mouseButtonWindow; /* Window the button state was set in, added - * in Tk 8.4. */ -#else - int notused1; - XID notused2; -#endif /* !TK_NO_DEPRECATED */ -#endif Tk_Window warpWindow; Tk_Window warpMainwin; /* For finding the root window for warping * purposes. */ diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 84f360d..b6c2543 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -202,9 +202,7 @@ EXTERN void TkpClaimFocus(TkWindow *topLevelPtr, int force); EXTERN void TkpDisplayWarning(const char *msg, const char *title); /* 59 */ EXTERN void TkpGetAppName(Tcl_Interp *interp, Tcl_DString *name); -/* 60 */ -TK_DEPRECATED("renamed to Tk_GetOtherWindow") -TkWindow * TkpGetOtherWindow(TkWindow *winPtr); +/* Slot 60 is reserved */ /* 61 */ EXTERN TkWindow * TkpGetWrapperWindow(TkWindow *winPtr); /* 62 */ @@ -212,14 +210,10 @@ EXTERN int TkpInit(Tcl_Interp *interp); /* 63 */ EXTERN void TkpInitializeMenuBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable); -/* 64 */ -TK_DEPRECATED("renamed to Tk_MakeContainer") -void TkpMakeContainer(Tk_Window tkwin); +/* Slot 64 is reserved */ /* 65 */ EXTERN void TkpMakeMenuWindow(Tk_Window tkwin, int transient); -/* 66 */ -TK_DEPRECATED("renamed to Tk_MakeWindow") -Window TkpMakeWindow(TkWindow *winPtr, Window parent); +/* Slot 66 is reserved */ /* 67 */ EXTERN void TkpMenuNotifyToplevelCreate(Tcl_Interp *interp, const char *menuName); @@ -238,14 +232,8 @@ EXTERN int TkPositionInTree(TkWindow *winPtr, TkWindow *treePtr); /* 73 */ EXTERN void TkpRedirectKeyEvent(TkWindow *winPtr, XEvent *eventPtr); -/* 74 */ -TK_DEPRECATED("renamed to Tk_SetMainMenubar") -void TkpSetMainMenubar(Tcl_Interp *interp, - Tk_Window tkwin, const char *menuName); -/* 75 */ -TK_DEPRECATED("renamed to Tk_UseWindow") -int TkpUseWindow(Tcl_Interp *interp, Tk_Window tkwin, - const char *string); +/* Slot 74 is reserved */ +/* Slot 75 is reserved */ /* Slot 76 is reserved */ /* 77 */ EXTERN void TkQueueEventForAllChildren(TkWindow *winPtr, @@ -270,11 +258,7 @@ EXTERN void TkSelInit(Tk_Window tkwin); /* 83 */ EXTERN void TkSelPropProc(XEvent *eventPtr); /* Slot 84 is reserved */ -/* 85 */ -TK_DEPRECATED("renamed to Tk_SetWindowMenubar") -void TkSetWindowMenuBar(Tcl_Interp *interp, - Tk_Window tkwin, const char *oldMenuName, - const char *menuName); +/* Slot 85 is reserved */ /* 86 */ EXTERN KeySym TkStringToKeysym(const char *name); /* 87 */ @@ -335,10 +319,7 @@ EXTERN const char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 110 */ EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont); -/* 111 */ -TK_DEPRECATED("renamed to Tk_GetSystemDefault") -Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin, - const char *dbName, const char *className); +/* Slot 111 is reserved */ /* 112 */ EXTERN void TkpMenuThreadInit(void); /* 113 */ @@ -384,11 +365,7 @@ EXTERN Pixmap TkpGetNativeAppBitmap(Display *display, /* Slot 132 is reserved */ /* Slot 133 is reserved */ /* Slot 134 is reserved */ -/* 135 */ -TK_DEPRECATED("renamed to Tk_DrawHighlightBorder") -void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, - GC bgGC, int highlightWidth, - Drawable drawable); +/* Slot 135 is reserved */ /* 136 */ EXTERN void TkSetFocusWin(TkWindow *winPtr, int force); /* 137 */ @@ -637,13 +614,13 @@ typedef struct TkIntStubs { void (*tkpClaimFocus) (TkWindow *topLevelPtr, int force); /* 57 */ void (*tkpDisplayWarning) (const char *msg, const char *title); /* 58 */ void (*tkpGetAppName) (Tcl_Interp *interp, Tcl_DString *name); /* 59 */ - TCL_DEPRECATED_API("renamed to Tk_GetOtherWindow") TkWindow * (*tkpGetOtherWindow) (TkWindow *winPtr); /* 60 */ + void (*reserved60)(void); TkWindow * (*tkpGetWrapperWindow) (TkWindow *winPtr); /* 61 */ int (*tkpInit) (Tcl_Interp *interp); /* 62 */ void (*tkpInitializeMenuBindings) (Tcl_Interp *interp, Tk_BindingTable bindingTable); /* 63 */ - TCL_DEPRECATED_API("renamed to Tk_MakeContainer") void (*tkpMakeContainer) (Tk_Window tkwin); /* 64 */ + void (*reserved64)(void); void (*tkpMakeMenuWindow) (Tk_Window tkwin, int transient); /* 65 */ - TCL_DEPRECATED_API("renamed to Tk_MakeWindow") Window (*tkpMakeWindow) (TkWindow *winPtr, Window parent); /* 66 */ + void (*reserved66)(void); void (*tkpMenuNotifyToplevelCreate) (Tcl_Interp *interp, const char *menuName); /* 67 */ TkDisplay * (*tkpOpenDisplay) (const char *display_name); /* 68 */ int (*tkPointerEvent) (XEvent *eventPtr, TkWindow *winPtr); /* 69 */ @@ -651,8 +628,8 @@ typedef struct TkIntStubs { double (*tkPolygonToPoint) (double *polyPtr, int numPoints, double *pointPtr); /* 71 */ int (*tkPositionInTree) (TkWindow *winPtr, TkWindow *treePtr); /* 72 */ void (*tkpRedirectKeyEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 73 */ - TCL_DEPRECATED_API("renamed to Tk_SetMainMenubar") void (*tkpSetMainMenubar) (Tcl_Interp *interp, Tk_Window tkwin, const char *menuName); /* 74 */ - TCL_DEPRECATED_API("renamed to Tk_UseWindow") int (*tkpUseWindow) (Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* 75 */ + void (*reserved74)(void); + void (*reserved75)(void); void (*reserved76)(void); void (*tkQueueEventForAllChildren) (TkWindow *winPtr, XEvent *eventPtr); /* 77 */ int (*tkReadBitmapFile) (Display *display, Drawable d, const char *filename, unsigned int *width_return, unsigned int *height_return, Pixmap *bitmap_return, int *x_hot_return, int *y_hot_return); /* 78 */ @@ -662,7 +639,7 @@ typedef struct TkIntStubs { void (*tkSelInit) (Tk_Window tkwin); /* 82 */ void (*tkSelPropProc) (XEvent *eventPtr); /* 83 */ void (*reserved84)(void); - TCL_DEPRECATED_API("renamed to Tk_SetWindowMenubar") void (*tkSetWindowMenuBar) (Tcl_Interp *interp, Tk_Window tkwin, const char *oldMenuName, const char *menuName); /* 85 */ + void (*reserved85)(void); KeySym (*tkStringToKeysym) (const char *name); /* 86 */ int (*tkThickPolyLineToArea) (double *coordPtr, int numPoints, double width, int capStyle, int joinStyle, double *rectPtr); /* 87 */ void (*tkWmAddToColormapWindows) (TkWindow *winPtr); /* 88 */ @@ -688,7 +665,7 @@ typedef struct TkIntStubs { int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */ const char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */ void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */ - TCL_DEPRECATED_API("renamed to Tk_GetSystemDefault") Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */ + void (*reserved111)(void); void (*tkpMenuThreadInit) (void); /* 112 */ int (*xClipBox) (Region rgn, XRectangle *rect_return); /* 113 */ Region (*xCreateRegion) (void); /* 114 */ @@ -739,7 +716,7 @@ typedef struct TkIntStubs { void (*reserved132)(void); void (*reserved133)(void); void (*reserved134)(void); - TCL_DEPRECATED_API("renamed to Tk_DrawHighlightBorder") void (*tkpDrawHighlightBorder) (Tk_Window tkwin, GC fgGC, GC bgGC, int highlightWidth, Drawable drawable); /* 135 */ + void (*reserved135)(void); void (*tkSetFocusWin) (TkWindow *winPtr, int force); /* 136 */ void (*tkpSetKeycodeAndState) (Tk_Window tkwin, KeySym keySym, XEvent *eventPtr); /* 137 */ KeySym (*tkpGetKeySym) (TkDisplay *dispPtr, XEvent *eventPtr); /* 138 */ @@ -923,20 +900,17 @@ extern const TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkpDisplayWarning) /* 58 */ #define TkpGetAppName \ (tkIntStubsPtr->tkpGetAppName) /* 59 */ -#define TkpGetOtherWindow \ - (tkIntStubsPtr->tkpGetOtherWindow) /* 60 */ +/* Slot 60 is reserved */ #define TkpGetWrapperWindow \ (tkIntStubsPtr->tkpGetWrapperWindow) /* 61 */ #define TkpInit \ (tkIntStubsPtr->tkpInit) /* 62 */ #define TkpInitializeMenuBindings \ (tkIntStubsPtr->tkpInitializeMenuBindings) /* 63 */ -#define TkpMakeContainer \ - (tkIntStubsPtr->tkpMakeContainer) /* 64 */ +/* Slot 64 is reserved */ #define TkpMakeMenuWindow \ (tkIntStubsPtr->tkpMakeMenuWindow) /* 65 */ -#define TkpMakeWindow \ - (tkIntStubsPtr->tkpMakeWindow) /* 66 */ +/* Slot 66 is reserved */ #define TkpMenuNotifyToplevelCreate \ (tkIntStubsPtr->tkpMenuNotifyToplevelCreate) /* 67 */ #define TkpOpenDisplay \ @@ -951,10 +925,8 @@ extern const TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkPositionInTree) /* 72 */ #define TkpRedirectKeyEvent \ (tkIntStubsPtr->tkpRedirectKeyEvent) /* 73 */ -#define TkpSetMainMenubar \ - (tkIntStubsPtr->tkpSetMainMenubar) /* 74 */ -#define TkpUseWindow \ - (tkIntStubsPtr->tkpUseWindow) /* 75 */ +/* Slot 74 is reserved */ +/* Slot 75 is reserved */ /* Slot 76 is reserved */ #define TkQueueEventForAllChildren \ (tkIntStubsPtr->tkQueueEventForAllChildren) /* 77 */ @@ -971,8 +943,7 @@ extern const TkIntStubs *tkIntStubsPtr; #define TkSelPropProc \ (tkIntStubsPtr->tkSelPropProc) /* 83 */ /* Slot 84 is reserved */ -#define TkSetWindowMenuBar \ - (tkIntStubsPtr->tkSetWindowMenuBar) /* 85 */ +/* Slot 85 is reserved */ #define TkStringToKeysym \ (tkIntStubsPtr->tkStringToKeysym) /* 86 */ #define TkThickPolyLineToArea \ @@ -1023,8 +994,7 @@ extern const TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkpGetString) /* 109 */ #define TkpGetSubFonts \ (tkIntStubsPtr->tkpGetSubFonts) /* 110 */ -#define TkpGetSystemDefault \ - (tkIntStubsPtr->tkpGetSystemDefault) /* 111 */ +/* Slot 111 is reserved */ #define TkpMenuThreadInit \ (tkIntStubsPtr->tkpMenuThreadInit) /* 112 */ #define XClipBox \ @@ -1065,8 +1035,7 @@ extern const TkIntStubs *tkIntStubsPtr; /* Slot 132 is reserved */ /* Slot 133 is reserved */ /* Slot 134 is reserved */ -#define TkpDrawHighlightBorder \ - (tkIntStubsPtr->tkpDrawHighlightBorder) /* 135 */ +/* Slot 135 is reserved */ #define TkSetFocusWin \ (tkIntStubsPtr->tkSetFocusWin) /* 136 */ #define TkpSetKeycodeAndState \ @@ -1178,17 +1147,6 @@ extern const TkIntStubs *tkIntStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#if !defined(TK_NO_DEPRECATED) -# define TkSetWindowMenuBar Tk_SetWindowMenubar -# define TkpDrawHighlightBorder Tk_DrawHighlightBorder -# define TkpUseWindow Tk_UseWindow -# define TkpSetMainMenubar Tk_SetMainMenubar -# define TkpGetOtherWindow ((TkWindow *(*)(TkWindow *))(void *)Tk_GetOtherWindow) -# define TkpGetSystemDefault Tk_GetSystemDefault -# define TkpMakeContainer Tk_MakeContainer -# define TkpMakeWindow ((Window (*)(TkWindow *, Window))(void *)Tk_MakeWindow) -#endif - #if !defined(MAC_OSX_TK) && !defined(USE_TK_STUBS) # undef TkpWillDrawWidget # undef TkpRedrawWidget diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 48948a0..aedad62 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -145,12 +145,10 @@ EXTERN int TkpTestsendCmd(void *clientData, Tcl_Interp *interp, EXTERN Tk_Window TkpGetCapture(void); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ -/* 0 */ -EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, - int active); +/* Slot 0 is reserved */ /* Slot 1 is reserved */ /* 2 */ -EXTERN void TkGenerateActivateEvents_(TkWindow *winPtr, +EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, int active); /* 3 */ EXTERN void TkPointerDeadWindow(TkWindow *winPtr); @@ -187,9 +185,7 @@ EXTERN void TkMacOSXHandleMenuSelect(short theMenu, /* 21 */ EXTERN void TkMacOSXInvalidateWindow(MacDrawable *macWin, int flag); -/* 22 */ -EXTERN int TkMacOSXIsCharacterMissing(Tk_Font tkfont, - unsigned int searchChar); +/* Slot 22 is reserved */ /* 23 */ EXTERN void TkMacOSXMakeRealWindowExist(TkWindow *winPtr); /* 24 */ @@ -203,8 +199,7 @@ EXTERN int TkMacOSXResizable(TkWindow *winPtr); EXTERN void TkMacOSXSetHelpMenuItemCount(void); /* 29 */ EXTERN void TkMacOSXSetScrollbarGrow(TkWindow *winPtr, int flag); -/* 30 */ -EXTERN void TkMacOSXSetUpClippingRgn(Drawable drawable); +/* Slot 30 is reserved */ /* 31 */ EXTERN void TkMacOSXSetUpGraphicsPort(GC gc, void *destPort); /* 32 */ @@ -265,29 +260,21 @@ EXTERN void TkCreateXEventSource(void); /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, int active); -/* 3 */ -EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); -/* 4 */ -EXTERN void TkpSync(Display *display); -/* 5 */ -EXTERN Window TkUnixContainerId(TkWindow *winPtr); -/* 6 */ -EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); -/* 7 */ -EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); +/* Slot 3 is reserved */ +/* Slot 4 is reserved */ +/* Slot 5 is reserved */ +/* Slot 6 is reserved */ +/* Slot 7 is reserved */ /* 8 */ EXTERN int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr); /* 9 */ EXTERN void TkWmCleanup(TkDisplay *dispPtr); -/* 10 */ -EXTERN void TkSendCleanup(TkDisplay *dispPtr); +/* Slot 10 is reserved */ /* Slot 11 is reserved */ /* 12 */ EXTERN int TkpWmSetState(TkWindow *winPtr, int state); -/* 13 */ -EXTERN int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp, - Tcl_Size objc, Tcl_Obj *const objv[]); +/* Slot 13 is reserved */ /* Slot 14 is reserved */ /* Slot 15 is reserved */ /* Slot 16 is reserved */ @@ -313,19 +300,19 @@ EXTERN int TkpTestsendCmd_(void *clientData, Tcl_Interp *interp, /* Slot 36 is reserved */ /* Slot 37 is reserved */ /* 38 */ -EXTERN int TkpCmapStressed_(Tk_Window tkwin, Colormap colormap); +EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); /* 39 */ -EXTERN void TkpSync_(Display *display); +EXTERN void TkpSync(Display *display); /* 40 */ -EXTERN Window TkUnixContainerId_(TkWindow *winPtr); +EXTERN Window TkUnixContainerId(TkWindow *winPtr); /* 41 */ -EXTERN int TkUnixDoOneXEvent_(Tcl_Time *timePtr); +EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); /* 42 */ -EXTERN void TkUnixSetMenubar_(Tk_Window tkwin, Tk_Window menubar); +EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); /* 43 */ -EXTERN void TkWmCleanup_(TkDisplay *dispPtr); +EXTERN void TkWmCleanup(TkDisplay *dispPtr); /* 44 */ -EXTERN void TkSendCleanup_(TkDisplay *dispPtr); +EXTERN void TkSendCleanup(TkDisplay *dispPtr); /* 45 */ EXTERN int TkpTestsendCmd(void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); @@ -386,9 +373,9 @@ typedef struct TkIntPlatStubs { Tk_Window (*tkpGetCapture) (void); /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 0 */ + void (*reserved0)(void); void (*reserved1)(void); - void (*tkGenerateActivateEvents_) (TkWindow *winPtr, int active); /* 2 */ + void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 3 */ void (*tkpSetCapture) (TkWindow *winPtr); /* 4 */ void (*tkpSetCursor) (TkpCursor cursor); /* 5 */ @@ -408,7 +395,7 @@ typedef struct TkIntPlatStubs { void (*reserved19)(void); void (*reserved20)(void); void (*tkMacOSXInvalidateWindow) (MacDrawable *macWin, int flag); /* 21 */ - int (*tkMacOSXIsCharacterMissing) (Tk_Font tkfont, unsigned int searchChar); /* 22 */ + void (*reserved22)(void); void (*tkMacOSXMakeRealWindowExist) (TkWindow *winPtr); /* 23 */ void * (*tkMacOSXMakeStippleMap) (Drawable d1, Drawable d2); /* 24 */ void (*tkMacOSXMenuClick) (void); /* 25 */ @@ -416,7 +403,7 @@ typedef struct TkIntPlatStubs { int (*tkMacOSXResizable) (TkWindow *winPtr); /* 27 */ void (*tkMacOSXSetHelpMenuItemCount) (void); /* 28 */ void (*tkMacOSXSetScrollbarGrow) (TkWindow *winPtr, int flag); /* 29 */ - void (*tkMacOSXSetUpClippingRgn) (Drawable drawable); /* 30 */ + void (*reserved30)(void); void (*tkMacOSXSetUpGraphicsPort) (GC gc, void *destPort); /* 31 */ void (*tkMacOSXUpdateClipRgn) (TkWindow *winPtr); /* 32 */ void (*reserved33)(void); @@ -447,17 +434,17 @@ typedef struct TkIntPlatStubs { void (*tkCreateXEventSource) (void); /* 0 */ void (*reserved1)(void); void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ - int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 3 */ - void (*tkpSync) (Display *display); /* 4 */ - Window (*tkUnixContainerId) (TkWindow *winPtr); /* 5 */ - int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 6 */ - void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 7 */ + void (*reserved3)(void); + void (*reserved4)(void); + void (*reserved5)(void); + void (*reserved6)(void); + void (*reserved7)(void); int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 8 */ void (*tkWmCleanup) (TkDisplay *dispPtr); /* 9 */ - void (*tkSendCleanup) (TkDisplay *dispPtr); /* 10 */ + void (*reserved10)(void); void (*reserved11)(void); int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 12 */ - int (*tkpTestsendCmd_) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 13 */ + void (*reserved13)(void); void (*reserved14)(void); void (*reserved15)(void); void (*reserved16)(void); @@ -482,13 +469,13 @@ typedef struct TkIntPlatStubs { void (*reserved35)(void); void (*reserved36)(void); void (*reserved37)(void); - int (*tkpCmapStressed_) (Tk_Window tkwin, Colormap colormap); /* 38 */ - void (*tkpSync_) (Display *display); /* 39 */ - Window (*tkUnixContainerId_) (TkWindow *winPtr); /* 40 */ - int (*tkUnixDoOneXEvent_) (Tcl_Time *timePtr); /* 41 */ - void (*tkUnixSetMenubar_) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ - void (*tkWmCleanup_) (TkDisplay *dispPtr); /* 43 */ - void (*tkSendCleanup_) (TkDisplay *dispPtr); /* 44 */ + int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */ + void (*tkpSync) (Display *display); /* 39 */ + Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ + int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 41 */ + void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ + void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */ + void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */ int (*tkpTestsendCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 45 */ #endif /* X11 */ } TkIntPlatStubs; @@ -601,11 +588,10 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkpGetCapture) /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ -#define TkGenerateActivateEvents \ - (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */ +/* Slot 0 is reserved */ /* Slot 1 is reserved */ -#define TkGenerateActivateEvents_ \ - (tkIntPlatStubsPtr->tkGenerateActivateEvents_) /* 2 */ +#define TkGenerateActivateEvents \ + (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ #define TkPointerDeadWindow \ (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 3 */ #define TkpSetCapture \ @@ -639,8 +625,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 20 is reserved */ #define TkMacOSXInvalidateWindow \ (tkIntPlatStubsPtr->tkMacOSXInvalidateWindow) /* 21 */ -#define TkMacOSXIsCharacterMissing \ - (tkIntPlatStubsPtr->tkMacOSXIsCharacterMissing) /* 22 */ +/* Slot 22 is reserved */ #define TkMacOSXMakeRealWindowExist \ (tkIntPlatStubsPtr->tkMacOSXMakeRealWindowExist) /* 23 */ #define TkMacOSXMakeStippleMap \ @@ -654,8 +639,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkMacOSXSetHelpMenuItemCount) /* 28 */ #define TkMacOSXSetScrollbarGrow \ (tkIntPlatStubsPtr->tkMacOSXSetScrollbarGrow) /* 29 */ -#define TkMacOSXSetUpClippingRgn \ - (tkIntPlatStubsPtr->tkMacOSXSetUpClippingRgn) /* 30 */ +/* Slot 30 is reserved */ #define TkMacOSXSetUpGraphicsPort \ (tkIntPlatStubsPtr->tkMacOSXSetUpGraphicsPort) /* 31 */ #define TkMacOSXUpdateClipRgn \ @@ -710,27 +694,20 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 1 is reserved */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ -#define TkpCmapStressed \ - (tkIntPlatStubsPtr->tkpCmapStressed) /* 3 */ -#define TkpSync \ - (tkIntPlatStubsPtr->tkpSync) /* 4 */ -#define TkUnixContainerId \ - (tkIntPlatStubsPtr->tkUnixContainerId) /* 5 */ -#define TkUnixDoOneXEvent \ - (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 6 */ -#define TkUnixSetMenubar \ - (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 7 */ +/* Slot 3 is reserved */ +/* Slot 4 is reserved */ +/* Slot 5 is reserved */ +/* Slot 6 is reserved */ +/* Slot 7 is reserved */ #define TkpScanWindowId \ (tkIntPlatStubsPtr->tkpScanWindowId) /* 8 */ #define TkWmCleanup \ (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */ -#define TkSendCleanup \ - (tkIntPlatStubsPtr->tkSendCleanup) /* 10 */ +/* Slot 10 is reserved */ /* Slot 11 is reserved */ #define TkpWmSetState \ (tkIntPlatStubsPtr->tkpWmSetState) /* 12 */ -#define TkpTestsendCmd_ \ - (tkIntPlatStubsPtr->tkpTestsendCmd_) /* 13 */ +/* Slot 13 is reserved */ /* Slot 14 is reserved */ /* Slot 15 is reserved */ /* Slot 16 is reserved */ @@ -755,20 +732,20 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 35 is reserved */ /* Slot 36 is reserved */ /* Slot 37 is reserved */ -#define TkpCmapStressed_ \ - (tkIntPlatStubsPtr->tkpCmapStressed_) /* 38 */ -#define TkpSync_ \ - (tkIntPlatStubsPtr->tkpSync_) /* 39 */ -#define TkUnixContainerId_ \ - (tkIntPlatStubsPtr->tkUnixContainerId_) /* 40 */ -#define TkUnixDoOneXEvent_ \ - (tkIntPlatStubsPtr->tkUnixDoOneXEvent_) /* 41 */ -#define TkUnixSetMenubar_ \ - (tkIntPlatStubsPtr->tkUnixSetMenubar_) /* 42 */ -#define TkWmCleanup_ \ - (tkIntPlatStubsPtr->tkWmCleanup_) /* 43 */ -#define TkSendCleanup_ \ - (tkIntPlatStubsPtr->tkSendCleanup_) /* 44 */ +#define TkpCmapStressed \ + (tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */ +#define TkpSync \ + (tkIntPlatStubsPtr->tkpSync) /* 39 */ +#define TkUnixContainerId \ + (tkIntPlatStubsPtr->tkUnixContainerId) /* 40 */ +#define TkUnixDoOneXEvent \ + (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 41 */ +#define TkUnixSetMenubar \ + (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 42 */ +#define TkWmCleanup \ + (tkIntPlatStubsPtr->tkWmCleanup) /* 43 */ +#define TkSendCleanup \ + (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */ #define TkpTestsendCmd \ (tkIntPlatStubsPtr->tkpTestsendCmd) /* 45 */ #endif /* X11 */ diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 360594a..6c247ca 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -56,7 +56,6 @@ extern "C" { * Exported function declarations: */ -#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ /* 0 */ EXTERN int XSetDashes(Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n); @@ -475,436 +474,11 @@ EXTERN KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, EXTERN Display * XkbOpenDisplay(const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason); -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -/* 0 */ -EXTERN int XSetDashes(Display *display, GC gc, int dash_offset, - _Xconst char *dash_list, int n); -/* 1 */ -EXTERN XModifierKeymap * XGetModifierMapping(Display *d); -/* 2 */ -EXTERN 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); -/* 3 */ -EXTERN XImage * XGetImage(Display *d, Drawable dr, int i1, int i2, - unsigned int ui1, unsigned int ui2, - unsigned long ul, int i3); -/* 4 */ -EXTERN char * XGetAtomName(Display *d, Atom a); -/* 5 */ -EXTERN char * XKeysymToString(KeySym k); -/* 6 */ -EXTERN Colormap XCreateColormap(Display *d, Window w, Visual *v, - int i); -/* 7 */ -EXTERN GContext XGContextFromGC(GC g); -/* 8 */ -EXTERN KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i); -/* 9 */ -EXTERN KeySym XStringToKeysym(_Xconst char *c); -/* 10 */ -EXTERN Window XRootWindow(Display *d, int i); -/* 11 */ -EXTERN XErrorHandler XSetErrorHandler(XErrorHandler x); -/* 12 */ -EXTERN Status XAllocColor(Display *d, Colormap c, XColor *xp); -/* 13 */ -EXTERN int XBell(Display *d, int i); -/* 14 */ -EXTERN int XChangeProperty(Display *d, Window w, Atom a1, - Atom a2, int i1, int i2, - _Xconst unsigned char *c, int i3); -/* 15 */ -EXTERN int XChangeWindowAttributes(Display *d, Window w, - unsigned long ul, XSetWindowAttributes *x); -/* 16 */ -EXTERN int XConfigureWindow(Display *d, Window w, - unsigned int i, XWindowChanges *x); -/* 17 */ -EXTERN int XCopyArea(Display *d, Drawable dr1, Drawable dr2, - GC g, int i1, int i2, unsigned int ui1, - unsigned int ui2, int i3, int i4); -/* 18 */ -EXTERN int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, - GC g, int i1, int i2, unsigned int ui1, - unsigned int ui2, int i3, int i4, - unsigned long ul); -/* 19 */ -EXTERN Pixmap XCreateBitmapFromData(Display *display, Drawable d, - _Xconst char *data, unsigned int width, - unsigned int height); -/* 20 */ -EXTERN int XDefineCursor(Display *d, Window w, Cursor c); -/* 21 */ -EXTERN int XDestroyWindow(Display *d, Window w); -/* 22 */ -EXTERN int XDrawArc(Display *d, Drawable dr, GC g, int i1, - int i2, unsigned int ui1, unsigned int ui2, - int i3, int i4); -/* 23 */ -EXTERN int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, - int i1, int i2); -/* 24 */ -EXTERN int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, - int i2, unsigned int ui1, unsigned int ui2); -/* 25 */ -EXTERN int XFillArc(Display *d, Drawable dr, GC g, int i1, - int i2, unsigned int ui1, unsigned int ui2, - int i3, int i4); -/* 26 */ -EXTERN int XFillPolygon(Display *d, Drawable dr, GC g, - XPoint *x, int i1, int i2, int i3); -/* 27 */ -EXTERN int XFillRectangles(Display *d, Drawable dr, GC g, - XRectangle *x, int i); -/* 28 */ -EXTERN int XFreeColormap(Display *d, Colormap c); -/* 29 */ -EXTERN int XFreeColors(Display *d, Colormap c, - unsigned long *ulp, int i, unsigned long ul); -/* 30 */ -EXTERN int XFreeModifiermap(XModifierKeymap *x); -/* 31 */ -EXTERN Status XGetGeometry(Display *d, Drawable dr, Window *w, - int *i1, int *i2, unsigned int *ui1, - unsigned int *ui2, unsigned int *ui3, - unsigned int *ui4); -/* 32 */ -EXTERN int XGetWindowProperty(Display *d, Window w, Atom a1, - long l1, long l2, Bool b, Atom a2, Atom *ap, - int *ip, unsigned long *ulp1, - unsigned long *ulp2, unsigned char **cpp); -/* 33 */ -EXTERN int XGrabKeyboard(Display *d, Window w, Bool b, int i1, - int i2, Time t); -/* 34 */ -EXTERN int XGrabPointer(Display *d, Window w1, Bool b, - unsigned int ui, int i1, int i2, Window w2, - Cursor c, Time t); -/* 35 */ -EXTERN KeyCode XKeysymToKeycode(Display *d, KeySym k); -/* 36 */ -EXTERN int XMapWindow(Display *d, Window w); -/* 37 */ -EXTERN int XMoveResizeWindow(Display *d, Window w, int i1, - int i2, unsigned int ui1, unsigned int ui2); -/* 38 */ -EXTERN int XMoveWindow(Display *d, Window w, int i1, int i2); -/* 39 */ -EXTERN Bool XQueryPointer(Display *d, Window w1, Window *w2, - Window *w3, int *i1, int *i2, int *i3, - int *i4, unsigned int *ui); -/* 40 */ -EXTERN int XRaiseWindow(Display *d, Window w); -/* 41 */ -EXTERN int XRefreshKeyboardMapping(XMappingEvent *x); -/* 42 */ -EXTERN int XResizeWindow(Display *d, Window w, unsigned int ui1, - unsigned int ui2); -/* 43 */ -EXTERN int XSelectInput(Display *d, Window w, long l); -/* 44 */ -EXTERN Status XSendEvent(Display *d, Window w, Bool b, long l, - XEvent *x); -/* 45 */ -EXTERN int XSetIconName(Display *d, Window w, _Xconst char *c); -/* 46 */ -EXTERN int XSetInputFocus(Display *d, Window w, int i, Time t); -/* 47 */ -EXTERN int XSetSelectionOwner(Display *d, Atom a, Window w, - Time t); -/* 48 */ -EXTERN int XSetWindowBackground(Display *d, Window w, - unsigned long ul); -/* 49 */ -EXTERN int XSetWindowBackgroundPixmap(Display *d, Window w, - Pixmap p); -/* 50 */ -EXTERN int XSetWindowBorder(Display *d, Window w, - unsigned long ul); -/* 51 */ -EXTERN int XSetWindowBorderPixmap(Display *d, Window w, - Pixmap p); -/* 52 */ -EXTERN int XSetWindowBorderWidth(Display *d, Window w, - unsigned int ui); -/* 53 */ -EXTERN int XSetWindowColormap(Display *d, Window w, Colormap c); -/* 54 */ -EXTERN int XUngrabKeyboard(Display *d, Time t); -/* 55 */ -EXTERN int XUngrabPointer(Display *d, Time t); -/* 56 */ -EXTERN int XUnmapWindow(Display *d, Window w); -/* 57 */ -EXTERN int TkPutImage(unsigned long *colors, int ncolors, - Display *display, Drawable d, GC gc, - XImage *image, int src_x, int src_y, - int dest_x, int dest_y, unsigned int width, - unsigned int height); -/* 58 */ -EXTERN Status XParseColor(Display *display, Colormap map, - _Xconst char *spec, XColor *colorPtr); -/* 59 */ -EXTERN GC XCreateGC(Display *display, Drawable d, - unsigned long valuemask, XGCValues *values); -/* 60 */ -EXTERN int XFreeGC(Display *display, GC gc); -/* 61 */ -EXTERN Atom XInternAtom(Display *display, - _Xconst char *atom_name, Bool only_if_exists); -/* 62 */ -EXTERN int XSetBackground(Display *display, GC gc, - unsigned long foreground); -/* 63 */ -EXTERN int XSetForeground(Display *display, GC gc, - unsigned long foreground); -/* 64 */ -EXTERN int XSetClipMask(Display *display, GC gc, Pixmap pixmap); -/* 65 */ -EXTERN int XSetClipOrigin(Display *display, GC gc, - int clip_x_origin, int clip_y_origin); -/* 66 */ -EXTERN int XSetTSOrigin(Display *display, GC gc, - int ts_x_origin, int ts_y_origin); -/* 67 */ -EXTERN int XChangeGC(Display *d, GC gc, unsigned long mask, - XGCValues *values); -/* 68 */ -EXTERN int XSetFont(Display *display, GC gc, Font font); -/* 69 */ -EXTERN int XSetArcMode(Display *display, GC gc, int arc_mode); -/* 70 */ -EXTERN int XSetStipple(Display *display, GC gc, Pixmap stipple); -/* 71 */ -EXTERN int XSetFillRule(Display *display, GC gc, int fill_rule); -/* 72 */ -EXTERN int XSetFillStyle(Display *display, GC gc, - int fill_style); -/* 73 */ -EXTERN int XSetFunction(Display *display, GC gc, int function); -/* 74 */ -EXTERN int XSetLineAttributes(Display *display, GC gc, - unsigned int line_width, int line_style, - int cap_style, int join_style); -/* 75 */ -EXTERN int _XInitImageFuncPtrs(XImage *image); -/* 76 */ -EXTERN XIC XCreateIC(XIM xim, ...); -/* 77 */ -EXTERN XVisualInfo * XGetVisualInfo(Display *display, long vinfo_mask, - XVisualInfo *vinfo_template, - int *nitems_return); -/* 78 */ -EXTERN void XSetWMClientMachine(Display *display, Window w, - XTextProperty *text_prop); -/* 79 */ -EXTERN Status XStringListToTextProperty(char **list, int count, - XTextProperty *text_prop_return); -/* 80 */ -EXTERN int XDrawSegments(Display *display, Drawable d, GC gc, - XSegment *segments, int nsegments); -/* 81 */ -EXTERN int XForceScreenSaver(Display *display, int mode); -/* 82 */ -EXTERN int XDrawLine(Display *d, Drawable dr, GC g, int x1, - int y1, int x2, int y2); -/* 83 */ -EXTERN int XFillRectangle(Display *display, Drawable d, GC gc, - int x, int y, unsigned int width, - unsigned int height); -/* 84 */ -EXTERN int XClearWindow(Display *d, Window w); -/* 85 */ -EXTERN int XDrawPoint(Display *display, Drawable d, GC gc, - int x, int y); -/* 86 */ -EXTERN int XDrawPoints(Display *display, Drawable d, GC gc, - XPoint *points, int npoints, int mode); -/* 87 */ -EXTERN int XWarpPointer(Display *display, Window src_w, - Window dest_w, int src_x, int src_y, - unsigned int src_width, - unsigned int src_height, int dest_x, - int dest_y); -/* 88 */ -EXTERN int XQueryColor(Display *display, Colormap colormap, - XColor *def_in_out); -/* 89 */ -EXTERN int XQueryColors(Display *display, Colormap colormap, - XColor *defs_in_out, int ncolors); -/* 90 */ -EXTERN Status XQueryTree(Display *d, Window w1, Window *w2, - Window *w3, Window **w4, unsigned int *ui); -/* 91 */ -EXTERN int XSync(Display *display, Bool discard); -/* 92 */ -EXTERN Bool XTranslateCoordinates(Display *d, Window w1, - Window w2, int i1, int i2, int *i3, int *i4, - Window *w3); -/* 93 */ -EXTERN int XDeleteProperty(Display *d, Window w, Atom a); -/* 94 */ -EXTERN int XFreeCursor(Display *d, Cursor c); -/* 95 */ -EXTERN int XGetInputFocus(Display *d, Window *w, int *i); -/* 96 */ -EXTERN int XmbLookupString(XIC xi, XKeyPressedEvent *xk, - char *c, int i, KeySym *k, Status *s); -/* 97 */ -EXTERN int XNextEvent(Display *d, XEvent *x); -/* 98 */ -EXTERN int XPutBackEvent(Display *d, XEvent *x); -/* 99 */ -EXTERN int XSetCommand(Display *d, Window w, char **c, int i); -/* 100 */ -EXTERN int XWindowEvent(Display *d, Window w, long l, XEvent *x); -/* 101 */ -EXTERN Status XGetWindowAttributes(Display *d, Window w, - XWindowAttributes *x); -/* 102 */ -EXTERN Status XGetWMColormapWindows(Display *d, Window w, - Window **wpp, int *ip); -/* 103 */ -EXTERN Status XIconifyWindow(Display *d, Window w, int i); -/* 104 */ -EXTERN Status XWithdrawWindow(Display *d, Window w, int i); -/* 105 */ -EXTERN XHostAddress * XListHosts(Display *d, int *i, Bool *b); -/* 106 */ -EXTERN int XSetClipRectangles(Display *display, GC gc, - int clip_x_origin, int clip_y_origin, - XRectangle rectangles[], int n, int ordering); -/* 107 */ -EXTERN int XFlush(Display *display); -/* 108 */ -EXTERN int XGrabServer(Display *display); -/* 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 Status XLookupColor(Display *d, Colormap c1, - _Xconst char *c2, XColor *x1, XColor *x2); -/* 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 */ -/* 120 */ -EXTERN int XOffsetRegion(Region rgn, int dx, int dy); -/* 121 */ -EXTERN int XUnionRegion(Region srca, Region srcb, - Region dr_return); -/* 122 */ -EXTERN Window XCreateWindow(Display *display, Window parent, int x, - int y, unsigned int width, - unsigned int height, - unsigned int border_width, int depth, - unsigned int clazz, Visual *visual, - unsigned long value_mask, - XSetWindowAttributes *attributes); -/* Slot 123 is reserved */ -/* Slot 124 is reserved */ -/* Slot 125 is reserved */ -/* Slot 126 is reserved */ -/* Slot 127 is reserved */ -/* Slot 128 is reserved */ -/* 129 */ -EXTERN int XLowerWindow(Display *d, Window w); -/* 130 */ -EXTERN int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, - int n); -/* 131 */ -EXTERN int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, - int n); -/* 132 */ -EXTERN int XDrawRectangles(Display *d, Drawable dr, GC gc, - XRectangle *r, int n); -/* Slot 133 is reserved */ -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ -/* 136 */ -EXTERN int XReparentWindow(Display *d, Window w, Window p, - int x, int y); -/* 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); -/* 138 */ -EXTERN Region XPolygonRegion(XPoint *pts, int n, int rule); -/* 139 */ -EXTERN int XPointInRegion(Region rgn, int x, int y); -/* 140 */ -EXTERN XVaNestedList XVaCreateNestedList(int dummy, ...); -/* 141 */ -EXTERN char * XSetICValues(XIC xic, ...); -/* 142 */ -EXTERN char * XGetICValues(XIC xic, ...); -/* 143 */ -EXTERN void XSetICFocus(XIC xic); -/* 144 */ -EXTERN void XDestroyIC(XIC xic); -/* 145 */ -EXTERN Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, - XColor *x1, XColor *x2, unsigned int ui1, - unsigned int ui2); -/* 146 */ -EXTERN Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, - unsigned int ui1, unsigned int ui2, - XColor _Xconst *x1, XColor _Xconst *x2); -/* 147 */ -EXTERN void XFreeFontSet(Display *display, XFontSet fontset); -/* 148 */ -EXTERN int XCloseIM(XIM im); -/* 149 */ -EXTERN Bool XRegisterIMInstantiateCallback(Display *dpy, - struct _XrmHashBucketRec *rbd, - char *res_name, char *res_class, - XIDProc callback, XPointer client_data); -/* 150 */ -EXTERN Bool XUnregisterIMInstantiateCallback(Display *dpy, - struct _XrmHashBucketRec *rbd, - char *res_name, char *res_class, - XIDProc callback, XPointer client_data); -/* 151 */ -EXTERN char * XSetLocaleModifiers(const char *modifier_list); -/* 152 */ -EXTERN XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, - char *res_name, char *res_class); -/* 153 */ -EXTERN char * XGetIMValues(XIM im, ...); -/* 154 */ -EXTERN char * XSetIMValues(XIM im, ...); -/* 155 */ -EXTERN XFontSet XCreateFontSet(Display *display, - _Xconst char *base_font_name_list, - char ***missing_charset_list, - int *missing_charset_count, - char **def_string); -/* 156 */ -EXTERN void XFreeStringList(char **list); -/* 157 */ -EXTERN KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, - int i); -/* 158 */ -EXTERN Display * XkbOpenDisplay(const char *name, int *ev_rtrn, - int *err_rtrn, int *major_rtrn, - int *minor_rtrn, int *reason); -#endif /* MACOSX */ typedef struct TkIntXlibStubs { int magic; void *hooks; -#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ 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 */ @@ -1064,168 +638,6 @@ typedef struct TkIntXlibStubs { void (*xFreeStringList) (char **list); /* 156 */ KeySym (*xkbKeycodeToKeysym) (Display *d, unsigned int k, int g, int i); /* 157 */ Display * (*xkbOpenDisplay) (const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason); /* 158 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - 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 */ - XImage * (*xGetImage) (Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3); /* 3 */ - char * (*xGetAtomName) (Display *d, Atom a); /* 4 */ - char * (*xKeysymToString) (KeySym k); /* 5 */ - Colormap (*xCreateColormap) (Display *d, Window w, Visual *v, int i); /* 6 */ - GContext (*xGContextFromGC) (GC g); /* 7 */ - KeySym (*xKeycodeToKeysym) (Display *d, unsigned int k, int i); /* 8 */ - KeySym (*xStringToKeysym) (_Xconst char *c); /* 9 */ - Window (*xRootWindow) (Display *d, int i); /* 10 */ - XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 11 */ - Status (*xAllocColor) (Display *d, Colormap c, XColor *xp); /* 12 */ - int (*xBell) (Display *d, int i); /* 13 */ - int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 14 */ - int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 15 */ - int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 16 */ - int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */ - int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */ - Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 19 */ - int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 20 */ - int (*xDestroyWindow) (Display *d, Window w); /* 21 */ - int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */ - int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 23 */ - int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 24 */ - int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 25 */ - int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 26 */ - int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 27 */ - int (*xFreeColormap) (Display *d, Colormap c); /* 28 */ - int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 29 */ - int (*xFreeModifiermap) (XModifierKeymap *x); /* 30 */ - Status (*xGetGeometry) (Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4); /* 31 */ - int (*xGetWindowProperty) (Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp); /* 32 */ - int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 33 */ - int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 34 */ - KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 35 */ - int (*xMapWindow) (Display *d, Window w); /* 36 */ - int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 37 */ - int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 38 */ - Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 39 */ - int (*xRaiseWindow) (Display *d, Window w); /* 40 */ - int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 41 */ - int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */ - int (*xSelectInput) (Display *d, Window w, long l); /* 43 */ - Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 44 */ - int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 45 */ - int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 46 */ - int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 47 */ - int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 48 */ - int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 49 */ - int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 50 */ - int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 51 */ - int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 52 */ - int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 53 */ - int (*xUngrabKeyboard) (Display *d, Time t); /* 54 */ - int (*xUngrabPointer) (Display *d, Time t); /* 55 */ - int (*xUnmapWindow) (Display *d, Window w); /* 56 */ - int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 57 */ - Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 58 */ - GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 59 */ - int (*xFreeGC) (Display *display, GC gc); /* 60 */ - Atom (*xInternAtom) (Display *display, _Xconst char *atom_name, Bool only_if_exists); /* 61 */ - int (*xSetBackground) (Display *display, GC gc, unsigned long foreground); /* 62 */ - int (*xSetForeground) (Display *display, GC gc, unsigned long foreground); /* 63 */ - int (*xSetClipMask) (Display *display, GC gc, Pixmap pixmap); /* 64 */ - int (*xSetClipOrigin) (Display *display, GC gc, int clip_x_origin, int clip_y_origin); /* 65 */ - int (*xSetTSOrigin) (Display *display, GC gc, int ts_x_origin, int ts_y_origin); /* 66 */ - int (*xChangeGC) (Display *d, GC gc, unsigned long mask, XGCValues *values); /* 67 */ - int (*xSetFont) (Display *display, GC gc, Font font); /* 68 */ - int (*xSetArcMode) (Display *display, GC gc, int arc_mode); /* 69 */ - int (*xSetStipple) (Display *display, GC gc, Pixmap stipple); /* 70 */ - int (*xSetFillRule) (Display *display, GC gc, int fill_rule); /* 71 */ - int (*xSetFillStyle) (Display *display, GC gc, int fill_style); /* 72 */ - int (*xSetFunction) (Display *display, GC gc, int function); /* 73 */ - int (*xSetLineAttributes) (Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 74 */ - int (*_XInitImageFuncPtrs) (XImage *image); /* 75 */ - XIC (*xCreateIC) (XIM xim, ...); /* 76 */ - XVisualInfo * (*xGetVisualInfo) (Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); /* 77 */ - void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 78 */ - Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 79 */ - int (*xDrawSegments) (Display *display, Drawable d, GC gc, XSegment *segments, int nsegments); /* 80 */ - int (*xForceScreenSaver) (Display *display, int mode); /* 81 */ - int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 82 */ - int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 83 */ - int (*xClearWindow) (Display *d, Window w); /* 84 */ - int (*xDrawPoint) (Display *display, Drawable d, GC gc, int x, int y); /* 85 */ - int (*xDrawPoints) (Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode); /* 86 */ - int (*xWarpPointer) (Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y); /* 87 */ - int (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */ - int (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */ - Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */ - int (*xSync) (Display *display, Bool discard); /* 91 */ - Bool (*xTranslateCoordinates) (Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3); /* 92 */ - int (*xDeleteProperty) (Display *d, Window w, Atom a); /* 93 */ - int (*xFreeCursor) (Display *d, Cursor c); /* 94 */ - int (*xGetInputFocus) (Display *d, Window *w, int *i); /* 95 */ - int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 96 */ - int (*xNextEvent) (Display *d, XEvent *x); /* 97 */ - int (*xPutBackEvent) (Display *d, XEvent *x); /* 98 */ - int (*xSetCommand) (Display *d, Window w, char **c, int i); /* 99 */ - int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 100 */ - Status (*xGetWindowAttributes) (Display *d, Window w, XWindowAttributes *x); /* 101 */ - Status (*xGetWMColormapWindows) (Display *d, Window w, Window **wpp, int *ip); /* 102 */ - Status (*xIconifyWindow) (Display *d, Window w, int i); /* 103 */ - Status (*xWithdrawWindow) (Display *d, Window w, int i); /* 104 */ - XHostAddress * (*xListHosts) (Display *d, int *i, Bool *b); /* 105 */ - int (*xSetClipRectangles) (Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering); /* 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 */ - Status (*xLookupColor) (Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2); /* 113 */ - VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */ - void (*reserved115)(void); - void (*reserved116)(void); - void (*reserved117)(void); - void (*reserved118)(void); - void (*reserved119)(void); - int (*xOffsetRegion) (Region rgn, int dx, int dy); /* 120 */ - int (*xUnionRegion) (Region srca, Region srcb, Region dr_return); /* 121 */ - Window (*xCreateWindow) (Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clazz, Visual *visual, unsigned long value_mask, XSetWindowAttributes *attributes); /* 122 */ - void (*reserved123)(void); - void (*reserved124)(void); - void (*reserved125)(void); - void (*reserved126)(void); - void (*reserved127)(void); - void (*reserved128)(void); - int (*xLowerWindow) (Display *d, Window w); /* 129 */ - int (*xFillArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 130 */ - int (*xDrawArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 131 */ - int (*xDrawRectangles) (Display *d, Drawable dr, GC gc, XRectangle *r, int n); /* 132 */ - void (*reserved133)(void); - void (*reserved134)(void); - void (*reserved135)(void); - int (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */ - 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 */ - Region (*xPolygonRegion) (XPoint *pts, int n, int rule); /* 138 */ - int (*xPointInRegion) (Region rgn, int x, int y); /* 139 */ - XVaNestedList (*xVaCreateNestedList) (int dummy, ...); /* 140 */ - char * (*xSetICValues) (XIC xic, ...); /* 141 */ - char * (*xGetICValues) (XIC xic, ...); /* 142 */ - void (*xSetICFocus) (XIC xic); /* 143 */ - void (*xDestroyIC) (XIC xic); /* 144 */ - Cursor (*xCreatePixmapCursor) (Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2); /* 145 */ - Cursor (*xCreateGlyphCursor) (Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2); /* 146 */ - void (*xFreeFontSet) (Display *display, XFontSet fontset); /* 147 */ - int (*xCloseIM) (XIM im); /* 148 */ - Bool (*xRegisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 149 */ - Bool (*xUnregisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 150 */ - char * (*xSetLocaleModifiers) (const char *modifier_list); /* 151 */ - XIM (*xOpenIM) (Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, char *res_class); /* 152 */ - char * (*xGetIMValues) (XIM im, ...); /* 153 */ - char * (*xSetIMValues) (XIM im, ...); /* 154 */ - XFontSet (*xCreateFontSet) (Display *display, _Xconst char *base_font_name_list, char ***missing_charset_list, int *missing_charset_count, char **def_string); /* 155 */ - void (*xFreeStringList) (char **list); /* 156 */ - KeySym (*xkbKeycodeToKeysym) (Display *d, unsigned int k, int g, int i); /* 157 */ - Display * (*xkbOpenDisplay) (const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason); /* 158 */ -#endif /* MACOSX */ } TkIntXlibStubs; extern const TkIntXlibStubs *tkIntXlibStubsPtr; @@ -1240,7 +652,6 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; * Inline function declarations: */ -#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ #define XSetDashes \ (tkIntXlibStubsPtr->xSetDashes) /* 0 */ #define XGetModifierMapping \ @@ -1545,313 +956,6 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xkbKeycodeToKeysym) /* 157 */ #define XkbOpenDisplay \ (tkIntXlibStubsPtr->xkbOpenDisplay) /* 158 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#define XSetDashes \ - (tkIntXlibStubsPtr->xSetDashes) /* 0 */ -#define XGetModifierMapping \ - (tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */ -#define XCreateImage \ - (tkIntXlibStubsPtr->xCreateImage) /* 2 */ -#define XGetImage \ - (tkIntXlibStubsPtr->xGetImage) /* 3 */ -#define XGetAtomName \ - (tkIntXlibStubsPtr->xGetAtomName) /* 4 */ -#define XKeysymToString \ - (tkIntXlibStubsPtr->xKeysymToString) /* 5 */ -#define XCreateColormap \ - (tkIntXlibStubsPtr->xCreateColormap) /* 6 */ -#define XGContextFromGC \ - (tkIntXlibStubsPtr->xGContextFromGC) /* 7 */ -#define XKeycodeToKeysym \ - (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 8 */ -#define XStringToKeysym \ - (tkIntXlibStubsPtr->xStringToKeysym) /* 9 */ -#define XRootWindow \ - (tkIntXlibStubsPtr->xRootWindow) /* 10 */ -#define XSetErrorHandler \ - (tkIntXlibStubsPtr->xSetErrorHandler) /* 11 */ -#define XAllocColor \ - (tkIntXlibStubsPtr->xAllocColor) /* 12 */ -#define XBell \ - (tkIntXlibStubsPtr->xBell) /* 13 */ -#define XChangeProperty \ - (tkIntXlibStubsPtr->xChangeProperty) /* 14 */ -#define XChangeWindowAttributes \ - (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 15 */ -#define XConfigureWindow \ - (tkIntXlibStubsPtr->xConfigureWindow) /* 16 */ -#define XCopyArea \ - (tkIntXlibStubsPtr->xCopyArea) /* 17 */ -#define XCopyPlane \ - (tkIntXlibStubsPtr->xCopyPlane) /* 18 */ -#define XCreateBitmapFromData \ - (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 19 */ -#define XDefineCursor \ - (tkIntXlibStubsPtr->xDefineCursor) /* 20 */ -#define XDestroyWindow \ - (tkIntXlibStubsPtr->xDestroyWindow) /* 21 */ -#define XDrawArc \ - (tkIntXlibStubsPtr->xDrawArc) /* 22 */ -#define XDrawLines \ - (tkIntXlibStubsPtr->xDrawLines) /* 23 */ -#define XDrawRectangle \ - (tkIntXlibStubsPtr->xDrawRectangle) /* 24 */ -#define XFillArc \ - (tkIntXlibStubsPtr->xFillArc) /* 25 */ -#define XFillPolygon \ - (tkIntXlibStubsPtr->xFillPolygon) /* 26 */ -#define XFillRectangles \ - (tkIntXlibStubsPtr->xFillRectangles) /* 27 */ -#define XFreeColormap \ - (tkIntXlibStubsPtr->xFreeColormap) /* 28 */ -#define XFreeColors \ - (tkIntXlibStubsPtr->xFreeColors) /* 29 */ -#define XFreeModifiermap \ - (tkIntXlibStubsPtr->xFreeModifiermap) /* 30 */ -#define XGetGeometry \ - (tkIntXlibStubsPtr->xGetGeometry) /* 31 */ -#define XGetWindowProperty \ - (tkIntXlibStubsPtr->xGetWindowProperty) /* 32 */ -#define XGrabKeyboard \ - (tkIntXlibStubsPtr->xGrabKeyboard) /* 33 */ -#define XGrabPointer \ - (tkIntXlibStubsPtr->xGrabPointer) /* 34 */ -#define XKeysymToKeycode \ - (tkIntXlibStubsPtr->xKeysymToKeycode) /* 35 */ -#define XMapWindow \ - (tkIntXlibStubsPtr->xMapWindow) /* 36 */ -#define XMoveResizeWindow \ - (tkIntXlibStubsPtr->xMoveResizeWindow) /* 37 */ -#define XMoveWindow \ - (tkIntXlibStubsPtr->xMoveWindow) /* 38 */ -#define XQueryPointer \ - (tkIntXlibStubsPtr->xQueryPointer) /* 39 */ -#define XRaiseWindow \ - (tkIntXlibStubsPtr->xRaiseWindow) /* 40 */ -#define XRefreshKeyboardMapping \ - (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 41 */ -#define XResizeWindow \ - (tkIntXlibStubsPtr->xResizeWindow) /* 42 */ -#define XSelectInput \ - (tkIntXlibStubsPtr->xSelectInput) /* 43 */ -#define XSendEvent \ - (tkIntXlibStubsPtr->xSendEvent) /* 44 */ -#define XSetIconName \ - (tkIntXlibStubsPtr->xSetIconName) /* 45 */ -#define XSetInputFocus \ - (tkIntXlibStubsPtr->xSetInputFocus) /* 46 */ -#define XSetSelectionOwner \ - (tkIntXlibStubsPtr->xSetSelectionOwner) /* 47 */ -#define XSetWindowBackground \ - (tkIntXlibStubsPtr->xSetWindowBackground) /* 48 */ -#define XSetWindowBackgroundPixmap \ - (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 49 */ -#define XSetWindowBorder \ - (tkIntXlibStubsPtr->xSetWindowBorder) /* 50 */ -#define XSetWindowBorderPixmap \ - (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 51 */ -#define XSetWindowBorderWidth \ - (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 52 */ -#define XSetWindowColormap \ - (tkIntXlibStubsPtr->xSetWindowColormap) /* 53 */ -#define XUngrabKeyboard \ - (tkIntXlibStubsPtr->xUngrabKeyboard) /* 54 */ -#define XUngrabPointer \ - (tkIntXlibStubsPtr->xUngrabPointer) /* 55 */ -#define XUnmapWindow \ - (tkIntXlibStubsPtr->xUnmapWindow) /* 56 */ -#define TkPutImage \ - (tkIntXlibStubsPtr->tkPutImage) /* 57 */ -#define XParseColor \ - (tkIntXlibStubsPtr->xParseColor) /* 58 */ -#define XCreateGC \ - (tkIntXlibStubsPtr->xCreateGC) /* 59 */ -#define XFreeGC \ - (tkIntXlibStubsPtr->xFreeGC) /* 60 */ -#define XInternAtom \ - (tkIntXlibStubsPtr->xInternAtom) /* 61 */ -#define XSetBackground \ - (tkIntXlibStubsPtr->xSetBackground) /* 62 */ -#define XSetForeground \ - (tkIntXlibStubsPtr->xSetForeground) /* 63 */ -#define XSetClipMask \ - (tkIntXlibStubsPtr->xSetClipMask) /* 64 */ -#define XSetClipOrigin \ - (tkIntXlibStubsPtr->xSetClipOrigin) /* 65 */ -#define XSetTSOrigin \ - (tkIntXlibStubsPtr->xSetTSOrigin) /* 66 */ -#define XChangeGC \ - (tkIntXlibStubsPtr->xChangeGC) /* 67 */ -#define XSetFont \ - (tkIntXlibStubsPtr->xSetFont) /* 68 */ -#define XSetArcMode \ - (tkIntXlibStubsPtr->xSetArcMode) /* 69 */ -#define XSetStipple \ - (tkIntXlibStubsPtr->xSetStipple) /* 70 */ -#define XSetFillRule \ - (tkIntXlibStubsPtr->xSetFillRule) /* 71 */ -#define XSetFillStyle \ - (tkIntXlibStubsPtr->xSetFillStyle) /* 72 */ -#define XSetFunction \ - (tkIntXlibStubsPtr->xSetFunction) /* 73 */ -#define XSetLineAttributes \ - (tkIntXlibStubsPtr->xSetLineAttributes) /* 74 */ -#define _XInitImageFuncPtrs \ - (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 75 */ -#define XCreateIC \ - (tkIntXlibStubsPtr->xCreateIC) /* 76 */ -#define XGetVisualInfo \ - (tkIntXlibStubsPtr->xGetVisualInfo) /* 77 */ -#define XSetWMClientMachine \ - (tkIntXlibStubsPtr->xSetWMClientMachine) /* 78 */ -#define XStringListToTextProperty \ - (tkIntXlibStubsPtr->xStringListToTextProperty) /* 79 */ -#define XDrawSegments \ - (tkIntXlibStubsPtr->xDrawSegments) /* 80 */ -#define XForceScreenSaver \ - (tkIntXlibStubsPtr->xForceScreenSaver) /* 81 */ -#define XDrawLine \ - (tkIntXlibStubsPtr->xDrawLine) /* 82 */ -#define XFillRectangle \ - (tkIntXlibStubsPtr->xFillRectangle) /* 83 */ -#define XClearWindow \ - (tkIntXlibStubsPtr->xClearWindow) /* 84 */ -#define XDrawPoint \ - (tkIntXlibStubsPtr->xDrawPoint) /* 85 */ -#define XDrawPoints \ - (tkIntXlibStubsPtr->xDrawPoints) /* 86 */ -#define XWarpPointer \ - (tkIntXlibStubsPtr->xWarpPointer) /* 87 */ -#define XQueryColor \ - (tkIntXlibStubsPtr->xQueryColor) /* 88 */ -#define XQueryColors \ - (tkIntXlibStubsPtr->xQueryColors) /* 89 */ -#define XQueryTree \ - (tkIntXlibStubsPtr->xQueryTree) /* 90 */ -#define XSync \ - (tkIntXlibStubsPtr->xSync) /* 91 */ -#define XTranslateCoordinates \ - (tkIntXlibStubsPtr->xTranslateCoordinates) /* 92 */ -#define XDeleteProperty \ - (tkIntXlibStubsPtr->xDeleteProperty) /* 93 */ -#define XFreeCursor \ - (tkIntXlibStubsPtr->xFreeCursor) /* 94 */ -#define XGetInputFocus \ - (tkIntXlibStubsPtr->xGetInputFocus) /* 95 */ -#define XmbLookupString \ - (tkIntXlibStubsPtr->xmbLookupString) /* 96 */ -#define XNextEvent \ - (tkIntXlibStubsPtr->xNextEvent) /* 97 */ -#define XPutBackEvent \ - (tkIntXlibStubsPtr->xPutBackEvent) /* 98 */ -#define XSetCommand \ - (tkIntXlibStubsPtr->xSetCommand) /* 99 */ -#define XWindowEvent \ - (tkIntXlibStubsPtr->xWindowEvent) /* 100 */ -#define XGetWindowAttributes \ - (tkIntXlibStubsPtr->xGetWindowAttributes) /* 101 */ -#define XGetWMColormapWindows \ - (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 102 */ -#define XIconifyWindow \ - (tkIntXlibStubsPtr->xIconifyWindow) /* 103 */ -#define XWithdrawWindow \ - (tkIntXlibStubsPtr->xWithdrawWindow) /* 104 */ -#define XListHosts \ - (tkIntXlibStubsPtr->xListHosts) /* 105 */ -#define XSetClipRectangles \ - (tkIntXlibStubsPtr->xSetClipRectangles) /* 106 */ -#define XFlush \ - (tkIntXlibStubsPtr->xFlush) /* 107 */ -#define XGrabServer \ - (tkIntXlibStubsPtr->xGrabServer) /* 108 */ -#define XUngrabServer \ - (tkIntXlibStubsPtr->xUngrabServer) /* 109 */ -#define XFree \ - (tkIntXlibStubsPtr->xFree) /* 110 */ -#define XNoOp \ - (tkIntXlibStubsPtr->xNoOp) /* 111 */ -#define XSynchronize \ - (tkIntXlibStubsPtr->xSynchronize) /* 112 */ -#define XLookupColor \ - (tkIntXlibStubsPtr->xLookupColor) /* 113 */ -#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 */ -#define XOffsetRegion \ - (tkIntXlibStubsPtr->xOffsetRegion) /* 120 */ -#define XUnionRegion \ - (tkIntXlibStubsPtr->xUnionRegion) /* 121 */ -#define XCreateWindow \ - (tkIntXlibStubsPtr->xCreateWindow) /* 122 */ -/* Slot 123 is reserved */ -/* Slot 124 is reserved */ -/* Slot 125 is reserved */ -/* Slot 126 is reserved */ -/* Slot 127 is reserved */ -/* Slot 128 is reserved */ -#define XLowerWindow \ - (tkIntXlibStubsPtr->xLowerWindow) /* 129 */ -#define XFillArcs \ - (tkIntXlibStubsPtr->xFillArcs) /* 130 */ -#define XDrawArcs \ - (tkIntXlibStubsPtr->xDrawArcs) /* 131 */ -#define XDrawRectangles \ - (tkIntXlibStubsPtr->xDrawRectangles) /* 132 */ -/* Slot 133 is reserved */ -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ -#define XReparentWindow \ - (tkIntXlibStubsPtr->xReparentWindow) /* 136 */ -#define XPutImage \ - (tkIntXlibStubsPtr->xPutImage) /* 137 */ -#define XPolygonRegion \ - (tkIntXlibStubsPtr->xPolygonRegion) /* 138 */ -#define XPointInRegion \ - (tkIntXlibStubsPtr->xPointInRegion) /* 139 */ -#define XVaCreateNestedList \ - (tkIntXlibStubsPtr->xVaCreateNestedList) /* 140 */ -#define XSetICValues \ - (tkIntXlibStubsPtr->xSetICValues) /* 141 */ -#define XGetICValues \ - (tkIntXlibStubsPtr->xGetICValues) /* 142 */ -#define XSetICFocus \ - (tkIntXlibStubsPtr->xSetICFocus) /* 143 */ -#define XDestroyIC \ - (tkIntXlibStubsPtr->xDestroyIC) /* 144 */ -#define XCreatePixmapCursor \ - (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 145 */ -#define XCreateGlyphCursor \ - (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 146 */ -#define XFreeFontSet \ - (tkIntXlibStubsPtr->xFreeFontSet) /* 147 */ -#define XCloseIM \ - (tkIntXlibStubsPtr->xCloseIM) /* 148 */ -#define XRegisterIMInstantiateCallback \ - (tkIntXlibStubsPtr->xRegisterIMInstantiateCallback) /* 149 */ -#define XUnregisterIMInstantiateCallback \ - (tkIntXlibStubsPtr->xUnregisterIMInstantiateCallback) /* 150 */ -#define XSetLocaleModifiers \ - (tkIntXlibStubsPtr->xSetLocaleModifiers) /* 151 */ -#define XOpenIM \ - (tkIntXlibStubsPtr->xOpenIM) /* 152 */ -#define XGetIMValues \ - (tkIntXlibStubsPtr->xGetIMValues) /* 153 */ -#define XSetIMValues \ - (tkIntXlibStubsPtr->xSetIMValues) /* 154 */ -#define XCreateFontSet \ - (tkIntXlibStubsPtr->xCreateFontSet) /* 155 */ -#define XFreeStringList \ - (tkIntXlibStubsPtr->xFreeStringList) /* 156 */ -#define XkbKeycodeToKeysym \ - (tkIntXlibStubsPtr->xkbKeycodeToKeysym) /* 157 */ -#define XkbOpenDisplay \ - (tkIntXlibStubsPtr->xkbOpenDisplay) /* 158 */ -#endif /* MACOSX */ #endif /* defined(USE_TK_STUBS) */ diff --git a/generic/tkPkgConfig.c b/generic/tkPkgConfig.c index 5050f8a..2c32a18 100644 --- a/generic/tkPkgConfig.c +++ b/generic/tkPkgConfig.c @@ -95,14 +95,6 @@ #endif static const Tcl_Config cfg[] = { -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - {"debug", CFG_DEBUG}, - {"threaded", CFG_THREADED}, - {"profiled", CFG_PROFILED}, - {"64bit", CFG_64}, - {"optimized", CFG_OPTIMIZED}, - {"mem_debug", CFG_MEMDEBUG}, -#endif {"fontsystem", CFG_FONTSYSTEM}, /* Runtime paths to various stuff */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 1a6a481..ff2cc1c 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -41,40 +41,16 @@ MODULE_SCOPE const TkStubs tkStubs; #undef TkPutImage #undef XPutImage -#define TkMacOSXSetUpClippingRgn (void (*)(Drawable))(void *)doNothing -#undef TkMacOSXIsCharacterMissing -#define TkMacOSXIsCharacterMissing (int (*)(Tk_Font, unsigned int))(void *)doNothing -#if defined(TK_NO_DEPRECATED) || (TCL_MAJOR_VERSION > 8) -# define TkSetWindowMenuBar 0 -# define TkpDrawHighlightBorder 0 -# define TkpUseWindow 0 -# define TkpSetMainMenubar 0 -# define TkpGetOtherWindow 0 -# define TkpGetSystemDefault 0 -# define TkpMakeContainer 0 -# define TkpMakeWindow 0 -#endif +#define TkMacOSXDrawable Tk_MacOSXGetNSWindowForDrawable +#if !defined(MAC_OSX_TK) static int doNothing(void) { /* dummy implementation, no need to do anything */ return 0; } -#define TkpCmapStressed_ TkpCmapStressed -#define TkpSync_ TkpSync -#define TkUnixContainerId_ TkUnixContainerId -#define TkUnixDoOneXEvent_ TkUnixDoOneXEvent -#define TkUnixSetMenubar_ TkUnixSetMenubar -#define TkWmCleanup_ TkWmCleanup -#define TkSendCleanup_ TkSendCleanup -#define TkpTestsendCmd_ TkpTestsendCmd -#define TkGenWMConfigureEvent_ TkGenWMConfigureEvent -#define TkGenerateActivateEvents_ TkGenerateActivateEvents -#define TkMacOSXDrawable Tk_MacOSXGetNSWindowForDrawable - -#if !defined(MAC_OSX_TK) # undef TkpWillDrawWidget # undef TkpRedrawWidget # define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing) @@ -316,13 +292,13 @@ static const TkIntStubs tkIntStubs = { TkpClaimFocus, /* 57 */ TkpDisplayWarning, /* 58 */ TkpGetAppName, /* 59 */ - TkpGetOtherWindow, /* 60 */ + 0, /* 60 */ TkpGetWrapperWindow, /* 61 */ TkpInit, /* 62 */ TkpInitializeMenuBindings, /* 63 */ - TkpMakeContainer, /* 64 */ + 0, /* 64 */ TkpMakeMenuWindow, /* 65 */ - TkpMakeWindow, /* 66 */ + 0, /* 66 */ TkpMenuNotifyToplevelCreate, /* 67 */ TkpOpenDisplay, /* 68 */ TkPointerEvent, /* 69 */ @@ -330,8 +306,8 @@ static const TkIntStubs tkIntStubs = { TkPolygonToPoint, /* 71 */ TkPositionInTree, /* 72 */ TkpRedirectKeyEvent, /* 73 */ - TkpSetMainMenubar, /* 74 */ - TkpUseWindow, /* 75 */ + 0, /* 74 */ + 0, /* 75 */ 0, /* 76 */ TkQueueEventForAllChildren, /* 77 */ TkReadBitmapFile, /* 78 */ @@ -341,7 +317,7 @@ static const TkIntStubs tkIntStubs = { TkSelInit, /* 82 */ TkSelPropProc, /* 83 */ 0, /* 84 */ - TkSetWindowMenuBar, /* 85 */ + 0, /* 85 */ TkStringToKeysym, /* 86 */ TkThickPolyLineToArea, /* 87 */ TkWmAddToColormapWindows, /* 88 */ @@ -367,7 +343,7 @@ static const TkIntStubs tkIntStubs = { TkGetWindowFromObj, /* 108 */ TkpGetString, /* 109 */ TkpGetSubFonts, /* 110 */ - TkpGetSystemDefault, /* 111 */ + 0, /* 111 */ TkpMenuThreadInit, /* 112 */ XClipBox, /* 113 */ XCreateRegion, /* 114 */ @@ -418,7 +394,7 @@ static const TkIntStubs tkIntStubs = { 0, /* 132 */ 0, /* 133 */ 0, /* 134 */ - TkpDrawHighlightBorder, /* 135 */ + 0, /* 135 */ TkSetFocusWin, /* 136 */ TkpSetKeycodeAndState, /* 137 */ TkpGetKeySym, /* 138 */ @@ -527,9 +503,9 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkpGetCapture, /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ - TkGenerateActivateEvents, /* 0 */ + 0, /* 0 */ 0, /* 1 */ - TkGenerateActivateEvents_, /* 2 */ + TkGenerateActivateEvents, /* 2 */ TkPointerDeadWindow, /* 3 */ TkpSetCapture, /* 4 */ TkpSetCursor, /* 5 */ @@ -549,7 +525,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { 0, /* 19 */ 0, /* 20 */ TkMacOSXInvalidateWindow, /* 21 */ - TkMacOSXIsCharacterMissing, /* 22 */ + 0, /* 22 */ TkMacOSXMakeRealWindowExist, /* 23 */ TkMacOSXMakeStippleMap, /* 24 */ TkMacOSXMenuClick, /* 25 */ @@ -557,7 +533,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkMacOSXResizable, /* 27 */ TkMacOSXSetHelpMenuItemCount, /* 28 */ TkMacOSXSetScrollbarGrow, /* 29 */ - TkMacOSXSetUpClippingRgn, /* 30 */ + 0, /* 30 */ TkMacOSXSetUpGraphicsPort, /* 31 */ TkMacOSXUpdateClipRgn, /* 32 */ 0, /* 33 */ @@ -588,17 +564,17 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkCreateXEventSource, /* 0 */ 0, /* 1 */ TkGenerateActivateEvents, /* 2 */ - TkpCmapStressed, /* 3 */ - TkpSync, /* 4 */ - TkUnixContainerId, /* 5 */ - TkUnixDoOneXEvent, /* 6 */ - TkUnixSetMenubar, /* 7 */ + 0, /* 3 */ + 0, /* 4 */ + 0, /* 5 */ + 0, /* 6 */ + 0, /* 7 */ TkpScanWindowId, /* 8 */ TkWmCleanup, /* 9 */ - TkSendCleanup, /* 10 */ + 0, /* 10 */ 0, /* 11 */ TkpWmSetState, /* 12 */ - TkpTestsendCmd_, /* 13 */ + 0, /* 13 */ 0, /* 14 */ 0, /* 15 */ 0, /* 16 */ @@ -623,13 +599,13 @@ static const TkIntPlatStubs tkIntPlatStubs = { 0, /* 35 */ 0, /* 36 */ 0, /* 37 */ - TkpCmapStressed_, /* 38 */ - TkpSync_, /* 39 */ - TkUnixContainerId_, /* 40 */ - TkUnixDoOneXEvent_, /* 41 */ - TkUnixSetMenubar_, /* 42 */ - TkWmCleanup_, /* 43 */ - TkSendCleanup_, /* 44 */ + TkpCmapStressed, /* 38 */ + TkpSync, /* 39 */ + TkUnixContainerId, /* 40 */ + TkUnixDoOneXEvent, /* 41 */ + TkUnixSetMenubar, /* 42 */ + TkWmCleanup, /* 43 */ + TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ #endif /* X11 */ }; @@ -637,7 +613,6 @@ static const TkIntPlatStubs tkIntPlatStubs = { static const TkIntXlibStubs tkIntXlibStubs = { TCL_STUB_MAGIC, 0, -#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ XSetDashes, /* 0 */ XGetModifierMapping, /* 1 */ XCreateImage, /* 2 */ @@ -797,168 +772,6 @@ static const TkIntXlibStubs tkIntXlibStubs = { XFreeStringList, /* 156 */ XkbKeycodeToKeysym, /* 157 */ XkbOpenDisplay, /* 158 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - XSetDashes, /* 0 */ - XGetModifierMapping, /* 1 */ - XCreateImage, /* 2 */ - XGetImage, /* 3 */ - XGetAtomName, /* 4 */ - XKeysymToString, /* 5 */ - XCreateColormap, /* 6 */ - XGContextFromGC, /* 7 */ - XKeycodeToKeysym, /* 8 */ - XStringToKeysym, /* 9 */ - XRootWindow, /* 10 */ - XSetErrorHandler, /* 11 */ - XAllocColor, /* 12 */ - XBell, /* 13 */ - XChangeProperty, /* 14 */ - XChangeWindowAttributes, /* 15 */ - XConfigureWindow, /* 16 */ - XCopyArea, /* 17 */ - XCopyPlane, /* 18 */ - XCreateBitmapFromData, /* 19 */ - XDefineCursor, /* 20 */ - XDestroyWindow, /* 21 */ - XDrawArc, /* 22 */ - XDrawLines, /* 23 */ - XDrawRectangle, /* 24 */ - XFillArc, /* 25 */ - XFillPolygon, /* 26 */ - XFillRectangles, /* 27 */ - XFreeColormap, /* 28 */ - XFreeColors, /* 29 */ - XFreeModifiermap, /* 30 */ - XGetGeometry, /* 31 */ - XGetWindowProperty, /* 32 */ - XGrabKeyboard, /* 33 */ - XGrabPointer, /* 34 */ - XKeysymToKeycode, /* 35 */ - XMapWindow, /* 36 */ - XMoveResizeWindow, /* 37 */ - XMoveWindow, /* 38 */ - XQueryPointer, /* 39 */ - XRaiseWindow, /* 40 */ - XRefreshKeyboardMapping, /* 41 */ - XResizeWindow, /* 42 */ - XSelectInput, /* 43 */ - XSendEvent, /* 44 */ - XSetIconName, /* 45 */ - XSetInputFocus, /* 46 */ - XSetSelectionOwner, /* 47 */ - XSetWindowBackground, /* 48 */ - XSetWindowBackgroundPixmap, /* 49 */ - XSetWindowBorder, /* 50 */ - XSetWindowBorderPixmap, /* 51 */ - XSetWindowBorderWidth, /* 52 */ - XSetWindowColormap, /* 53 */ - XUngrabKeyboard, /* 54 */ - XUngrabPointer, /* 55 */ - XUnmapWindow, /* 56 */ - TkPutImage, /* 57 */ - XParseColor, /* 58 */ - XCreateGC, /* 59 */ - XFreeGC, /* 60 */ - XInternAtom, /* 61 */ - XSetBackground, /* 62 */ - XSetForeground, /* 63 */ - XSetClipMask, /* 64 */ - XSetClipOrigin, /* 65 */ - XSetTSOrigin, /* 66 */ - XChangeGC, /* 67 */ - XSetFont, /* 68 */ - XSetArcMode, /* 69 */ - XSetStipple, /* 70 */ - XSetFillRule, /* 71 */ - XSetFillStyle, /* 72 */ - XSetFunction, /* 73 */ - XSetLineAttributes, /* 74 */ - _XInitImageFuncPtrs, /* 75 */ - XCreateIC, /* 76 */ - XGetVisualInfo, /* 77 */ - XSetWMClientMachine, /* 78 */ - XStringListToTextProperty, /* 79 */ - XDrawSegments, /* 80 */ - XForceScreenSaver, /* 81 */ - XDrawLine, /* 82 */ - XFillRectangle, /* 83 */ - XClearWindow, /* 84 */ - XDrawPoint, /* 85 */ - XDrawPoints, /* 86 */ - XWarpPointer, /* 87 */ - XQueryColor, /* 88 */ - XQueryColors, /* 89 */ - XQueryTree, /* 90 */ - XSync, /* 91 */ - XTranslateCoordinates, /* 92 */ - XDeleteProperty, /* 93 */ - XFreeCursor, /* 94 */ - XGetInputFocus, /* 95 */ - XmbLookupString, /* 96 */ - XNextEvent, /* 97 */ - XPutBackEvent, /* 98 */ - XSetCommand, /* 99 */ - XWindowEvent, /* 100 */ - XGetWindowAttributes, /* 101 */ - XGetWMColormapWindows, /* 102 */ - XIconifyWindow, /* 103 */ - XWithdrawWindow, /* 104 */ - XListHosts, /* 105 */ - XSetClipRectangles, /* 106 */ - XFlush, /* 107 */ - XGrabServer, /* 108 */ - XUngrabServer, /* 109 */ - XFree, /* 110 */ - XNoOp, /* 111 */ - XSynchronize, /* 112 */ - XLookupColor, /* 113 */ - XVisualIDFromVisual, /* 114 */ - 0, /* 115 */ - 0, /* 116 */ - 0, /* 117 */ - 0, /* 118 */ - 0, /* 119 */ - XOffsetRegion, /* 120 */ - XUnionRegion, /* 121 */ - XCreateWindow, /* 122 */ - 0, /* 123 */ - 0, /* 124 */ - 0, /* 125 */ - 0, /* 126 */ - 0, /* 127 */ - 0, /* 128 */ - XLowerWindow, /* 129 */ - XFillArcs, /* 130 */ - XDrawArcs, /* 131 */ - XDrawRectangles, /* 132 */ - 0, /* 133 */ - 0, /* 134 */ - 0, /* 135 */ - XReparentWindow, /* 136 */ - XPutImage, /* 137 */ - XPolygonRegion, /* 138 */ - XPointInRegion, /* 139 */ - XVaCreateNestedList, /* 140 */ - XSetICValues, /* 141 */ - XGetICValues, /* 142 */ - XSetICFocus, /* 143 */ - XDestroyIC, /* 144 */ - XCreatePixmapCursor, /* 145 */ - XCreateGlyphCursor, /* 146 */ - XFreeFontSet, /* 147 */ - XCloseIM, /* 148 */ - XRegisterIMInstantiateCallback, /* 149 */ - XUnregisterIMInstantiateCallback, /* 150 */ - XSetLocaleModifiers, /* 151 */ - XOpenIM, /* 152 */ - XGetIMValues, /* 153 */ - XSetIMValues, /* 154 */ - XCreateFontSet, /* 155 */ - XFreeStringList, /* 156 */ - XkbKeycodeToKeysym, /* 157 */ - XkbOpenDisplay, /* 158 */ -#endif /* MACOSX */ }; static const TkPlatStubs tkPlatStubs = { diff --git a/tests/embed.test b/tests/embed.test index 92b8be9..8a61baf 100644 --- a/tests/embed.test +++ b/tests/embed.test @@ -10,7 +10,7 @@ eval tcltest::configure $argv tcltest::loadTestedCommands -test embed-1.1 {TkpUseWindow procedure, bad window identifier} -setup { +test embed-1.1 {Tk_UseWindow procedure, bad window identifier} -setup { deleteWindows } -body { toplevel .t -use xyz @@ -36,7 +36,7 @@ test embed-1.3 {CreateFrame procedure, both -use and -container is invalid} -set } -returnCodes error -result {windows cannot have both the -use and the -container option set} # testing window embedding for win platforms -test embed-1.4.win {TkpUseWindow procedure, -container must be set} -constraints { +test embed-1.4.win {Tk_UseWindow procedure, -container must be set} -constraints { win } -setup { deleteWindows @@ -47,7 +47,7 @@ test embed-1.4.win {TkpUseWindow procedure, -container must be set} -constraints deleteWindows } -returnCodes error -result {the window to use is not a Tk container} # testing window embedding for win platforms -test embed-1.5.win {TkpUseWindow procedure, -container must be set} -constraints { +test embed-1.5.win {Tk_UseWindow procedure, -container must be set} -constraints { win } -setup { deleteWindows @@ -59,7 +59,7 @@ test embed-1.5.win {TkpUseWindow procedure, -container must be set} -constraints } -returnCodes error -result {the window to use is not a Tk container} # testing window embedding for other than win platforms -test embed-1.4.nonwin {TkpUseWindow procedure, -container must be set} -constraints { +test embed-1.4.nonwin {Tk_UseWindow procedure, -container must be set} -constraints { nonwin } -setup { deleteWindows @@ -70,7 +70,7 @@ test embed-1.4.nonwin {TkpUseWindow procedure, -container must be set} -constrai deleteWindows } -returnCodes error -result {window ".container" doesn't have -container option set} # testing window embedding for other than win platforms -test embed-1.5.nonwin {TkpUseWindow procedure, -container must be set} -constraints { +test embed-1.5.nonwin {Tk_UseWindow procedure, -container must be set} -constraints { nonwin } -setup { deleteWindows diff --git a/tests/menu.test b/tests/menu.test index c3fa4e3..6b667fe 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -3613,7 +3613,7 @@ test menu-24.3 {TkNewMenuName} -setup { } -result {0 {} {} {} {}} -test menu-25.1 {TkSetWindowMenuBar} -setup { +test menu-25.1 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3621,7 +3621,7 @@ test menu-25.1 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.2 {TkSetWindowMenuBar} -setup { +test menu-25.2 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3629,7 +3629,7 @@ test menu-25.2 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.3 {TkSetWindowMenuBar} -setup { +test menu-25.3 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3639,7 +3639,7 @@ test menu-25.3 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.4 {TkSetWindowMenuBar} -setup { +test menu-25.4 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3650,7 +3650,7 @@ test menu-25.4 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.5 {TkSetWindowMenuBar} -setup { +test menu-25.5 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3662,7 +3662,7 @@ test menu-25.5 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.6 {TkSetWindowMenuBar} -setup { +test menu-25.6 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3674,7 +3674,7 @@ test menu-25.6 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.7 {TkSetWindowMenuBar} -setup { +test menu-25.7 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3687,7 +3687,7 @@ test menu-25.7 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.8 {TkSetWindowMenuBar} -setup { +test menu-25.8 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3701,7 +3701,7 @@ test menu-25.8 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.9 {TkSetWindowMenuBar} -setup { +test menu-25.9 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3716,7 +3716,7 @@ test menu-25.9 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.10 {TkSetWindowMenuBar} -setup { +test menu-25.10 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3731,7 +3731,7 @@ test menu-25.10 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.11 {TkSetWindowMenuBar} -setup { +test menu-25.11 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3746,7 +3746,7 @@ test menu-25.11 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.12 {TkSetWindowMenuBar} -setup { +test menu-25.12 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3755,7 +3755,7 @@ test menu-25.12 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.13 {TkSetWindowMenuBar} -setup { +test menu-25.13 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3763,7 +3763,7 @@ test menu-25.13 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.14 {TkSetWindowMenuBar} -setup { +test menu-25.14 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3772,7 +3772,7 @@ test menu-25.14 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.15 {TkSetWindowMenuBar} -setup { +test menu-25.15 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" @@ -3780,7 +3780,7 @@ test menu-25.15 {TkSetWindowMenuBar} -setup { } -cleanup { deleteWindows } -result {{} {}} -test menu-25.16 {TkSetWindowMenuBar} -setup { +test menu-25.16 {Tk_SetWindowMenuBar} -setup { deleteWindows } -body { . configure -menu "" diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test index a66a310..066c30d 100644 --- a/tests/unixEmbed.test +++ b/tests/unixEmbed.test @@ -90,21 +90,21 @@ proc colorsFree {w {red 31} {green 245} {blue 192}} { testConstraint pressbutton [llength [info commands pressbutton]] -test unixEmbed-1.1 {TkpUseWindow procedure, bad window identifier} -constraints { +test unixEmbed-1.1 {Tk_UseWindow procedure, bad window identifier} -constraints { unix } -setup { deleteWindows } -body { toplevel .t -use xyz } -returnCodes error -result {expected integer but got "xyz"} -test unixEmbed-1.2 {TkpUseWindow procedure, bad window identifier} -constraints { +test unixEmbed-1.2 {Tk_UseWindow procedure, bad window identifier} -constraints { unix } -setup { deleteWindows } -body { toplevel .t -use 47 } -returnCodes error -result {couldn't create child of window "47"} -test unixEmbed-1.3 {TkpUseWindow procedure, inheriting colormap} -constraints { +test unixEmbed-1.3 {Tk_UseWindow procedure, inheriting colormap} -constraints { unix nonPortable } -setup { deleteWindows @@ -118,7 +118,7 @@ test unixEmbed-1.3 {TkpUseWindow procedure, inheriting colormap} -constraints { } -cleanup { deleteWindows } -result 0 -test unixEmbed-1.4 {TkpUseWindow procedure, inheriting colormap} -constraints { +test unixEmbed-1.4 {Tk_UseWindow procedure, inheriting colormap} -constraints { unix nonPortable } -setup { deleteWindows @@ -132,7 +132,7 @@ test unixEmbed-1.4 {TkpUseWindow procedure, inheriting colormap} -constraints { deleteWindows } -result 1 -test unixEmbed-1.5 {TkpUseWindow procedure, creating Container records} -constraints { +test unixEmbed-1.5 {Tk_UseWindow procedure, creating Container records} -constraints { unix testembed notAqua } -setup { deleteWindows @@ -149,7 +149,7 @@ test unixEmbed-1.5 {TkpUseWindow procedure, creating Container records} -constra } -cleanup { deleteWindows } -result {{{XXX {} {} .t}} 0} -test unixEmbed-1.5a {TkpUseWindow procedure, creating Container records} -constraints { +test unixEmbed-1.5a {Tk_UseWindow procedure, creating Container records} -constraints { unix testembed } -setup { deleteWindows @@ -170,7 +170,7 @@ test unixEmbed-1.5a {TkpUseWindow procedure, creating Container records} -constr interp delete child deleteWindows } -result {{{XXX {} {} .t}} 0} -test unixEmbed-1.6 {TkpUseWindow procedure, creating Container records} -constraints { +test unixEmbed-1.6 {Tk_UseWindow procedure, creating Container records} -constraints { unix testembed notAqua } -setup { deleteWindows @@ -189,7 +189,7 @@ test unixEmbed-1.6 {TkpUseWindow procedure, creating Container records} -constra } -cleanup { deleteWindows } -result {{XXX {} {} .t2} {XXX {} {} .t1}} -test unixEmbed-1.6a {TkpUseWindow procedure, creating Container records} -constraints { +test unixEmbed-1.6a {Tk_UseWindow procedure, creating Container records} -constraints { unix testembed } -setup { deleteWindows @@ -212,7 +212,7 @@ test unixEmbed-1.6a {TkpUseWindow procedure, creating Container records} -constr interp delete child deleteWindows } -result {{XXX {} {} .t2} {XXX {} {} .t1}} -test unixEmbed-1.7 {TkpUseWindow procedure, container and embedded in same app} -constraints { +test unixEmbed-1.7 {Tk_UseWindow procedure, container and embedded in same app} -constraints { unix testembed } -setup { deleteWindows diff --git a/xlib/X11/keysymdef.h b/xlib/X11/keysymdef.h index 8f1833f..0f031ba 100644 --- a/xlib/X11/keysymdef.h +++ b/xlib/X11/keysymdef.h @@ -182,15 +182,6 @@ SOFTWARE. #define XK_Begin 0xff58 /* BOL */ -#ifndef TK_NO_DEPRECATED -/* Special Windows keyboard keys */ - -#define XK_Win_L 0xFF5B /* Left-hand Windows */ -#define XK_Win_R 0xFF5C /* Right-hand Windows */ -#define XK_App 0xFF5D /* Menu key */ -#endif - - /* Misc functions */ #define XK_Select 0xff60 /* Select, mark */ @@ -1736,18 +1727,3 @@ SOFTWARE. #define XK_braille_dot_9 0xfff9 #define XK_braille_dot_10 0xfffa #endif /* XK_BRAILLE */ - -/* Multimedia keys, defined same as on Linux - * /usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon-keysyms.h - */ - -#ifndef TK_NO_DEPRECATED -#define XK_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */ -#define XK_XF86AudioMute 0x1008FF12 /* Mute sound from the system */ -#define XK_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */ -#define XK_XF86AudioPlay 0x1008FF14 /* Start playing of audio > */ -#define XK_XF86AudioStop 0x1008FF15 /* Stop playing audio */ -#define XK_XF86AudioPrev 0x1008FF16 /* Previous track */ -#define XK_XF86AudioNext 0x1008FF17 /* Next track */ -#endif /* !TK_NO_DEPRECATED */ - -- cgit v0.12 From aee29839da30f7b46c73f3f2cb41ce97b7f7b16f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 12:50:46 +0000 Subject: Remove TkOldTestInit --- generic/tkInt.h | 1 - generic/tkTest.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/generic/tkInt.h b/generic/tkInt.h index 9f5a31b..dc44576 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1469,7 +1469,6 @@ MODULE_SCOPE int TkUnsupported1ObjCmd(void *clientData, MODULE_SCOPE int SquareObjCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj * const objv[]); -MODULE_SCOPE int TkOldTestInit(Tcl_Interp *interp); #if !(defined(_WIN32) || defined(MAC_OSX_TK)) #define TkplatformtestInit(x) TCL_OK #else diff --git a/generic/tkTest.c b/generic/tkTest.c index dd3764e..e776bbf 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -305,14 +305,6 @@ Tktest_Init( } /* - * Enable testing of legacy interfaces. - */ - - if (TkOldTestInit(interp) != TCL_OK) { - return TCL_ERROR; - } - - /* * And finally add any platform specific test commands. */ -- cgit v0.12 From ef1c0b41419a99d78bf51ed3224dfa63d6968b55 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 13:40:49 +0000 Subject: More legacy "photo" removals. Also the deprecated "-file" argument for wish. --- generic/tkImgPhoto.c | 119 --------------------------------------------------- generic/tkMain.c | 11 ----- 2 files changed, 130 deletions(-) diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 6ced2a9..79b1363 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -139,11 +139,6 @@ typedef struct { Tk_PhotoImageFormat *formatList; /* Pointer to the first in the list of known * photo image formats.*/ -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - Tk_PhotoImageFormat *oldFormatList; - /* Pointer to the first in the list of known - * photo image formats.*/ -#endif Tk_PhotoImageFormatVersion3 *formatListVersion3; /* Pointer to the first in the list of known * photo image formats in Version3 format.*/ @@ -247,13 +242,6 @@ PhotoFormatThreadExitProc( ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - while (tsdPtr->oldFormatList != NULL) { - freePtr = tsdPtr->oldFormatList; - tsdPtr->oldFormatList = tsdPtr->oldFormatList->nextPtr; - ckfree(freePtr); - } -#endif while (tsdPtr->formatList != NULL) { freePtr = tsdPtr->formatList; tsdPtr->formatList = tsdPtr->formatList->nextPtr; @@ -305,12 +293,6 @@ Tk_CreatePhotoImageFormat( } copyPtr = (Tk_PhotoImageFormat *)ckalloc(sizeof(Tk_PhotoImageFormat)); *copyPtr = *formatPtr; -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (isupper((unsigned char) *formatPtr->name)) { - copyPtr->nextPtr = tsdPtr->oldFormatList; - tsdPtr->oldFormatList = copyPtr; - } else -#endif { /* for compatibility with aMSN: make a copy of formatPtr->name */ char *name = (char *)ckalloc(strlen(formatPtr->name) + 1); @@ -812,23 +794,6 @@ ImgPhotoCmd( } } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (stringWriteProc == NULL) { - oldformat = 1; - for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL; - imageFormat = imageFormat->nextPtr) { - if ((strncasecmp(Tcl_GetString(options.format), - imageFormat->name, - strlen(imageFormat->name)) == 0)) { - matched = 1; - if (imageFormat->stringWriteProc != NULL) { - stringWriteProc = imageFormat->stringWriteProc; - break; - } - } - } - } -#endif if (stringWriteProc == NULL) { oldformat = 0; for (imageFormatVersion3 = tsdPtr->formatListVersion3; @@ -1489,22 +1454,6 @@ readCleanup: } } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (imageFormat == NULL) { - oldformat = 1; - for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL; - imageFormat = imageFormat->nextPtr) { - if ((fmtString == NULL) - || (strncasecmp(fmtString, imageFormat->name, - strlen(imageFormat->name)) == 0)) { - matched = 1; - if (imageFormat->fileWriteProc != NULL) { - break; - } - } - } - } -#endif if (imageFormat == NULL) { oldformat = 0; for (imageFormatVersion3 = tsdPtr->formatListVersion3; @@ -2755,42 +2704,6 @@ MatchFileFormat( } } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 -if (formatPtr == NULL) { - useoldformat = 1; - for (formatPtr = tsdPtr->oldFormatList; formatPtr != NULL; - formatPtr = formatPtr->nextPtr) { - if (formatString != NULL) { - if (strncasecmp(formatString, - formatPtr->name, strlen(formatPtr->name)) != 0) { - continue; - } - matched = 1; - if (formatPtr->fileMatchProc == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "-file option isn't supported for %s images", - formatString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "NOT_FILE_FORMAT", NULL); - return TCL_ERROR; - } - } - if (formatPtr->fileMatchProc != NULL) { - (void) Tcl_Seek(chan, Tcl_LongAsWide(0L), SEEK_SET); - if (formatPtr->fileMatchProc(chan, fileName, (Tcl_Obj *) - formatString, widthPtr, heightPtr, interp)) { - if (*widthPtr < 1) { - *widthPtr = 1; - } - if (*heightPtr < 1) { - *heightPtr = 1; - } - break; - } - } - } - } -#endif /* * For old and not version 3 format, exit now with success @@ -2988,38 +2901,6 @@ MatchStringFormat( } } -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - if (formatPtr == NULL) { - useoldformat = 1; - for (formatPtr = tsdPtr->oldFormatList; formatPtr != NULL; - formatPtr = formatPtr->nextPtr) { - if (formatObj != NULL) { - if (strncasecmp(formatString, - formatPtr->name, strlen(formatPtr->name)) != 0) { - continue; - } - matched = 1; - if (formatPtr->stringMatchProc == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "-data option isn't supported for %s images", - formatString)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", - "NOT_DATA_FORMAT", NULL); - return TCL_ERROR; - } - } - if ((formatPtr->stringMatchProc != NULL) - && (formatPtr->stringReadProc != NULL) - && formatPtr->stringMatchProc( - (Tcl_Obj *) Tcl_GetString(data), - (Tcl_Obj *) formatString, - widthPtr, heightPtr, interp)) { - break; - } - } - } -#endif - if (formatPtr == NULL) { useoldformat = 0; for (formatVersion3Ptr = tsdPtr->formatListVersion3; diff --git a/generic/tkMain.c b/generic/tkMain.c index 949afca..af1c550 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -247,9 +247,6 @@ Tk_MainEx( */ if (NULL == Tcl_GetStartupScript(NULL)) { -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - size_t length; -#endif /* * Check whether first 3 args (argv[1] - argv[3]) look like @@ -273,14 +270,6 @@ Tk_MainEx( Tcl_SetStartupScript(NewNativeObj(argv[1]), NULL); argc--; i++; -#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 - } else if ((argc >= 2) && (length = _tcslen(argv[1])) - && (length > 1) && (0 == _tcsncmp(TEXT("-file"), argv[1], length)) - && ('-' != argv[2][0])) { - Tcl_SetStartupScript(NewNativeObj(argv[2]), NULL); - argc -= 2; - i += 2; -#endif } } -- cgit v0.12 From d7f53a87a53c33038961f66247a7a0312e684c70 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 14:21:48 +0000 Subject: Remove Tk_FreeXId/Tk_FreeStyleFromObj (doing nothing for ages) and Tk_GetStyleFromObj (undocumented alternative for Tk_AllocStyleFromObj()). No known extension uses any of those. --- doc/FreeXId.3 | 30 ------------------------------ generic/tkDecls.h | 5 ----- 2 files changed, 35 deletions(-) delete mode 100644 doc/FreeXId.3 diff --git a/doc/FreeXId.3 b/doc/FreeXId.3 deleted file mode 100644 index 84fef26..0000000 --- a/doc/FreeXId.3 +++ /dev/null @@ -1,30 +0,0 @@ -'\" -'\" Copyright (c) 1990 The Regents of the University of California. -'\" Copyright (c) 1994-1996 Sun Microsystems, Inc. -'\" -'\" See the file "license.terms" for information on usage and redistribution -'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" -.TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures" -.so man.macros -.BS -.SH NAME -Tk_FreeXId \- make X resource identifier available for reuse -.SH SYNOPSIS -.nf -\fB#include \fR -.sp -\fBTk_FreeXId(\fIdisplay, id\fB)\fR -.SH ARGUMENTS -.AS Display *display out -.AP Display *display in -Display for which \fIid\fR was allocated. -.AP XID id in -Identifier of X resource (window, font, pixmap, cursor, graphics -context, or colormap) that is no longer in use. -.BE -.SH DESCRIPTION -.PP -This function is deprecated, it doesn't do anything since 2008-08-19. -.SH KEYWORDS -resource identifier diff --git a/generic/tkDecls.h b/generic/tkDecls.h index a7ae350..1a72f99 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -1774,9 +1774,6 @@ extern const TkStubs *tkStubsPtr; /* !END!: Do not edit above this line. */ -#define Tk_FreeXId(display,xid) /* no-op */ -#define Tk_GetStyleFromObj(obj) Tk_AllocStyleFromObj(NULL, obj) -#define Tk_FreeStyleFromObj(obj) /* no-op */ #define Tk_GetImageMasterData Tk_GetImageModelData #ifndef MAC_OSX_TK @@ -1797,6 +1794,4 @@ EXTERN int Tk_CreateConsoleWindow(Tcl_Interp *interp); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#undef TkUnusedStubEntry - #endif /* _TKDECLS */ -- cgit v0.12 From c42644884af2bc9639c7a0273d8856d1a21d04bb Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 15:53:21 +0000 Subject: Get rid of the "Dummy entry for stubs table backwards compatibility" --- generic/tkInt.decls | 72 +++++++++--------------- generic/tkIntDecls.h | 45 ++------------- generic/tkIntPlatDecls.h | 143 +++++++++++++++++++++++------------------------ generic/tkStubInit.c | 70 ++++++++--------------- macosx/tkMacOSXWm.c | 6 +- unix/tkUnixPort.h | 9 --- win/tkWinPort.h | 9 --- 7 files changed, 129 insertions(+), 225 deletions(-) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index e056e3f..bf5e4ed 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -392,13 +392,13 @@ declare 119 { int XUnionRectWithRegion(XRectangle *rect, Region src, Region dr_return) } -declare 121 aqua { +declare 121 { Pixmap TkpCreateNativeBitmap(Display *display, const void *source) } -declare 122 aqua { +declare 122 { void TkpDefineNativeBitmaps(void) } -declare 124 aqua { +declare 124 { Pixmap TkpGetNativeAppBitmap(Display *display, const char *name, int *width, int *height) } @@ -624,20 +624,20 @@ interface tkIntPlat ################################ # Unix specific functions -declare 0 x11 { - void TkCreateXEventSource(void) -} declare 2 x11 { void TkGenerateActivateEvents(TkWindow *winPtr, int active) } -declare 8 x11 { +declare 6 x11 { int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } +declare 7 x11 { + int TkpWmSetState(TkWindow *winPtr, int state) +} declare 9 x11 { void TkWmCleanup(TkDisplay *dispPtr) } -declare 12 x11 { - int TkpWmSetState(TkWindow *winPtr, int state) +declare 37 x11 { + void TkCreateXEventSource(void) } # only needed by tktest: declare 38 x11 { @@ -673,6 +673,9 @@ declare 45 x11 { declare 0 win { char *TkAlignImageData(XImage *image, int alignment, int bitOrder) } +declare 1 win { + void TkWinCancelMouseTimer(void) +} declare 2 win { void TkGenerateActivateEvents(TkWindow *winPtr, int active) } @@ -689,20 +692,17 @@ declare 6 win { int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } declare 7 win { - void TkpSetCapture(TkWindow *winPtr) + int TkpWmSetState(TkWindow *winPtr, int state) } declare 8 win { void TkpSetCursor(TkpCursor cursor) } declare 9 win { - int TkpWmSetState(TkWindow *winPtr, int state) + void TkpSetCapture(TkWindow *winPtr) } declare 10 win { void TkSetPixmapColormap(Pixmap pixmap, Colormap colormap) } -declare 11 win { - void TkWinCancelMouseTimer(void) -} declare 12 win { void TkWinClipboardRender(TkDisplay *dispPtr, UINT format) } @@ -827,37 +827,39 @@ declare 47 win { ################################ # Aqua specific functions +declare 1 aqua { + void TkAboutDlg(void) +} declare 2 aqua { void TkGenerateActivateEvents(TkWindow *winPtr, int active) } declare 3 aqua { - void TkPointerDeadWindow(TkWindow *winPtr) + unsigned long TkpGetMS(void) } declare 4 aqua { - void TkpSetCapture(TkWindow *winPtr) + void TkPointerDeadWindow(TkWindow *winPtr) } declare 5 aqua { void TkpSetCursor(TkpCursor cursor) } declare 6 aqua { - void TkpWmSetState(TkWindow *winPtr, int state) + int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } declare 7 aqua { - void TkAboutDlg(void) + int TkpWmSetState(TkWindow *winPtr, int state) } declare 8 aqua { unsigned int TkMacOSXButtonKeyState(void) } declare 9 aqua { - void TkMacOSXClearMenubarActive(void) + void TkpSetCapture(TkWindow *winPtr) } declare 10 aqua { int TkMacOSXDispatchMenuEvent(int menuID, int index) } -# Now a static function -# declare 11 aqua { -# void TkMacOSXInstallCursor(int resizeOverride) -# } +declare 11 aqua { + void TkMacOSXClearMenubarActive(void) +} declare 12 aqua { void TkMacOSXHandleTearoffMenu(void) } @@ -874,16 +876,6 @@ declare 18 aqua { void TkMacOSXHandleMenuSelect(short theMenu, unsigned short theItem, int optionKeyPressed) } - -# removed duplicates from tkPlat table(tk.decls) -#declare 19 aqua { -# void TkMacOSXInitAppleEvents(Tcl_Interp *interp) -#} -# -#declare 20 aqua { -# void TkMacOSXInitMenus(Tcl_Interp *interp) -#} - declare 21 aqua { void TkMacOSXInvalidateWindow(MacDrawable *macWin, int flag) } @@ -896,10 +888,6 @@ declare 24 aqua { declare 25 aqua { void TkMacOSXMenuClick(void) } -# The corresponding Unregister was not a stub, and this should be static. -#declare 26 aqua { -# void TkMacOSXRegisterOffScreenWindow(Window window, void *portPtr) -#} declare 27 aqua { int TkMacOSXResizable(TkWindow *winPtr) } @@ -915,10 +903,6 @@ declare 31 aqua { declare 32 aqua { void TkMacOSXUpdateClipRgn(TkWindow *winPtr) } -# This was not implemented. Perhaps meant to be OffScreen ? -#declare 33 aqua { -# void TkMacOSXUnregisterMacWindow(void *portPtr) -#} declare 34 aqua { int TkMacOSXUseMenuID(short macID) } @@ -971,16 +955,10 @@ declare 51 aqua { declare 52 aqua { void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag) } -declare 53 aqua { - unsigned long TkpGetMS(void) -} # For Canvas3d, requested by Sean Woods declare 54 aqua { void *TkMacOSXDrawable(Drawable drawable) } -declare 55 aqua { - int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) -} ############################################################################## diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index b6c2543..c1ec37f 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -340,21 +340,15 @@ EXTERN int XSetRegion(Display *display, GC gc, Region rgn); EXTERN int XUnionRectWithRegion(XRectangle *rect, Region src, Region dr_return); /* Slot 120 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ /* 121 */ EXTERN Pixmap TkpCreateNativeBitmap(Display *display, const void *source); -#endif /* AQUA */ -#ifdef MAC_OSX_TK /* AQUA */ /* 122 */ EXTERN void TkpDefineNativeBitmaps(void); -#endif /* AQUA */ /* Slot 123 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ /* 124 */ EXTERN Pixmap TkpGetNativeAppBitmap(Display *display, const char *name, int *width, int *height); -#endif /* AQUA */ /* Slot 125 is reserved */ /* Slot 126 is reserved */ /* Slot 127 is reserved */ @@ -675,37 +669,10 @@ typedef struct TkIntStubs { int (*xSetRegion) (Display *display, GC gc, Region rgn); /* 118 */ int (*xUnionRectWithRegion) (XRectangle *rect, Region src, Region dr_return); /* 119 */ void (*reserved120)(void); -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - void (*reserved121)(void); -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - void (*reserved121)(void); -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - void (*reserved121)(void); /* Dummy entry for stubs table backwards compatibility */ Pixmap (*tkpCreateNativeBitmap) (Display *display, const void *source); /* 121 */ -#endif /* AQUA */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - void (*reserved122)(void); -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - void (*reserved122)(void); -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - void (*reserved122)(void); /* Dummy entry for stubs table backwards compatibility */ void (*tkpDefineNativeBitmaps) (void); /* 122 */ -#endif /* AQUA */ void (*reserved123)(void); -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - void (*reserved124)(void); -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - void (*reserved124)(void); -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - void (*reserved124)(void); /* Dummy entry for stubs table backwards compatibility */ Pixmap (*tkpGetNativeAppBitmap) (Display *display, const char *name, int *width, int *height); /* 124 */ -#endif /* AQUA */ void (*reserved125)(void); void (*reserved126)(void); void (*reserved127)(void); @@ -1012,19 +979,13 @@ extern const TkIntStubs *tkIntStubsPtr; #define XUnionRectWithRegion \ (tkIntStubsPtr->xUnionRectWithRegion) /* 119 */ /* Slot 120 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ #define TkpCreateNativeBitmap \ (tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */ -#endif /* AQUA */ -#ifdef MAC_OSX_TK /* AQUA */ #define TkpDefineNativeBitmaps \ (tkIntStubsPtr->tkpDefineNativeBitmaps) /* 122 */ -#endif /* AQUA */ /* Slot 123 is reserved */ -#ifdef MAC_OSX_TK /* AQUA */ #define TkpGetNativeAppBitmap \ (tkIntStubsPtr->tkpGetNativeAppBitmap) /* 124 */ -#endif /* AQUA */ /* Slot 125 is reserved */ /* Slot 126 is reserved */ /* Slot 127 is reserved */ @@ -1150,8 +1111,14 @@ extern const TkIntStubs *tkIntStubsPtr; #if !defined(MAC_OSX_TK) && !defined(USE_TK_STUBS) # undef TkpWillDrawWidget # undef TkpRedrawWidget +# undef TkpDefineNativeBitmaps +# undef TkpCreateNativeBitmap +# undef TkpGetNativeAppBitmap # define TkpWillDrawWidget(w) 0 # define TkpRedrawWidget(w) +# define TkpDefineNativeBitmaps() +# define TkpCreateNativeBitmap(display, source) None +# define TkpGetNativeAppBitmap(display, name, w, h) None #endif #endif /* _TKINTDECLS */ diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index aedad62..7a0cc65 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -38,7 +38,8 @@ extern "C" { /* 0 */ EXTERN char * TkAlignImageData(XImage *image, int alignment, int bitOrder); -/* Slot 1 is reserved */ +/* 1 */ +EXTERN void TkWinCancelMouseTimer(void); /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, int active); @@ -52,15 +53,14 @@ EXTERN void TkpPrintWindowId(char *buf, Window window); EXTERN int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr); /* 7 */ -EXTERN void TkpSetCapture(TkWindow *winPtr); +EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* 8 */ EXTERN void TkpSetCursor(TkpCursor cursor); /* 9 */ -EXTERN int TkpWmSetState(TkWindow *winPtr, int state); +EXTERN void TkpSetCapture(TkWindow *winPtr); /* 10 */ EXTERN void TkSetPixmapColormap(Pixmap pixmap, Colormap colormap); -/* 11 */ -EXTERN void TkWinCancelMouseTimer(void); +/* Slot 11 is reserved */ /* 12 */ EXTERN void TkWinClipboardRender(TkDisplay *dispPtr, UINT format); /* 13 */ @@ -146,27 +146,30 @@ EXTERN Tk_Window TkpGetCapture(void); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* Slot 0 is reserved */ -/* Slot 1 is reserved */ +/* 1 */ +EXTERN void TkAboutDlg(void); /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, int active); /* 3 */ -EXTERN void TkPointerDeadWindow(TkWindow *winPtr); +EXTERN unsigned long TkpGetMS(void); /* 4 */ -EXTERN void TkpSetCapture(TkWindow *winPtr); +EXTERN void TkPointerDeadWindow(TkWindow *winPtr); /* 5 */ EXTERN void TkpSetCursor(TkpCursor cursor); /* 6 */ -EXTERN void TkpWmSetState(TkWindow *winPtr, int state); +EXTERN int TkpScanWindowId(Tcl_Interp *interp, + const char *string, Window *idPtr); /* 7 */ -EXTERN void TkAboutDlg(void); +EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* 8 */ EXTERN unsigned int TkMacOSXButtonKeyState(void); /* 9 */ -EXTERN void TkMacOSXClearMenubarActive(void); +EXTERN void TkpSetCapture(TkWindow *winPtr); /* 10 */ EXTERN int TkMacOSXDispatchMenuEvent(int menuID, int index); -/* Slot 11 is reserved */ +/* 11 */ +EXTERN void TkMacOSXClearMenubarActive(void); /* 12 */ EXTERN void TkMacOSXHandleTearoffMenu(void); /* Slot 13 is reserved */ @@ -245,17 +248,12 @@ EXTERN int TkGenerateButtonEvent(int x, int y, Window window, EXTERN void TkGenWMDestroyEvent(Tk_Window tkwin); /* 52 */ EXTERN void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag); -/* 53 */ -EXTERN unsigned long TkpGetMS(void); +/* Slot 53 is reserved */ /* 54 */ EXTERN void * TkMacOSXDrawable(Drawable drawable); -/* 55 */ -EXTERN int TkpScanWindowId(Tcl_Interp *interp, - const char *string, Window *idPtr); #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ -/* 0 */ -EXTERN void TkCreateXEventSource(void); +/* Slot 0 is reserved */ /* Slot 1 is reserved */ /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, @@ -263,17 +261,17 @@ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, /* Slot 3 is reserved */ /* Slot 4 is reserved */ /* Slot 5 is reserved */ -/* Slot 6 is reserved */ -/* Slot 7 is reserved */ -/* 8 */ +/* 6 */ EXTERN int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr); +/* 7 */ +EXTERN int TkpWmSetState(TkWindow *winPtr, int state); +/* Slot 8 is reserved */ /* 9 */ EXTERN void TkWmCleanup(TkDisplay *dispPtr); /* Slot 10 is reserved */ /* Slot 11 is reserved */ -/* 12 */ -EXTERN int TkpWmSetState(TkWindow *winPtr, int state); +/* Slot 12 is reserved */ /* Slot 13 is reserved */ /* Slot 14 is reserved */ /* Slot 15 is reserved */ @@ -298,7 +296,8 @@ EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* Slot 34 is reserved */ /* Slot 35 is reserved */ /* Slot 36 is reserved */ -/* Slot 37 is reserved */ +/* 37 */ +EXTERN void TkCreateXEventSource(void); /* 38 */ EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); /* 39 */ @@ -324,17 +323,17 @@ typedef struct TkIntPlatStubs { #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ char * (*tkAlignImageData) (XImage *image, int alignment, int bitOrder); /* 0 */ - void (*reserved1)(void); + void (*tkWinCancelMouseTimer) (void); /* 1 */ void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ unsigned long (*tkpGetMS) (void); /* 3 */ void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 4 */ void (*tkpPrintWindowId) (char *buf, Window window); /* 5 */ int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ - void (*tkpSetCapture) (TkWindow *winPtr); /* 7 */ + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ void (*tkpSetCursor) (TkpCursor cursor); /* 8 */ - int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 9 */ + void (*tkpSetCapture) (TkWindow *winPtr); /* 9 */ void (*tkSetPixmapColormap) (Pixmap pixmap, Colormap colormap); /* 10 */ - void (*tkWinCancelMouseTimer) (void); /* 11 */ + void (*reserved11)(void); void (*tkWinClipboardRender) (TkDisplay *dispPtr, UINT format); /* 12 */ LRESULT (*tkWinEmbeddedEventProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* 13 */ void (*tkWinFillRect) (HDC dc, int x, int y, int width, int height, int pixel); /* 14 */ @@ -374,17 +373,17 @@ typedef struct TkIntPlatStubs { #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ void (*reserved0)(void); - void (*reserved1)(void); + void (*tkAboutDlg) (void); /* 1 */ void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ - void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 3 */ - void (*tkpSetCapture) (TkWindow *winPtr); /* 4 */ + unsigned long (*tkpGetMS) (void); /* 3 */ + void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 4 */ void (*tkpSetCursor) (TkpCursor cursor); /* 5 */ - void (*tkpWmSetState) (TkWindow *winPtr, int state); /* 6 */ - void (*tkAboutDlg) (void); /* 7 */ + int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ unsigned int (*tkMacOSXButtonKeyState) (void); /* 8 */ - void (*tkMacOSXClearMenubarActive) (void); /* 9 */ + void (*tkpSetCapture) (TkWindow *winPtr); /* 9 */ int (*tkMacOSXDispatchMenuEvent) (int menuID, int index); /* 10 */ - void (*reserved11)(void); + void (*tkMacOSXClearMenubarActive) (void); /* 11 */ void (*tkMacOSXHandleTearoffMenu) (void); /* 12 */ void (*reserved13)(void); int (*tkMacOSXDoHLEvent) (void *theEvent); /* 14 */ @@ -426,24 +425,23 @@ typedef struct TkIntPlatStubs { int (*tkGenerateButtonEvent) (int x, int y, Window window, unsigned int state); /* 50 */ void (*tkGenWMDestroyEvent) (Tk_Window tkwin); /* 51 */ void (*tkMacOSXSetDrawingEnabled) (TkWindow *winPtr, int flag); /* 52 */ - unsigned long (*tkpGetMS) (void); /* 53 */ + void (*reserved53)(void); void * (*tkMacOSXDrawable) (Drawable drawable); /* 54 */ - int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 55 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ - void (*tkCreateXEventSource) (void); /* 0 */ + void (*reserved0)(void); void (*reserved1)(void); void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ void (*reserved3)(void); void (*reserved4)(void); void (*reserved5)(void); - void (*reserved6)(void); - void (*reserved7)(void); - int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 8 */ + int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ + void (*reserved8)(void); void (*tkWmCleanup) (TkDisplay *dispPtr); /* 9 */ void (*reserved10)(void); void (*reserved11)(void); - int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 12 */ + void (*reserved12)(void); void (*reserved13)(void); void (*reserved14)(void); void (*reserved15)(void); @@ -468,7 +466,7 @@ typedef struct TkIntPlatStubs { void (*reserved34)(void); void (*reserved35)(void); void (*reserved36)(void); - void (*reserved37)(void); + void (*tkCreateXEventSource) (void); /* 37 */ int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */ void (*tkpSync) (Display *display); /* 39 */ Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ @@ -495,7 +493,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ #define TkAlignImageData \ (tkIntPlatStubsPtr->tkAlignImageData) /* 0 */ -/* Slot 1 is reserved */ +#define TkWinCancelMouseTimer \ + (tkIntPlatStubsPtr->tkWinCancelMouseTimer) /* 1 */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ #define TkpGetMS \ @@ -506,16 +505,15 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkpPrintWindowId) /* 5 */ #define TkpScanWindowId \ (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */ -#define TkpSetCapture \ - (tkIntPlatStubsPtr->tkpSetCapture) /* 7 */ +#define TkpWmSetState \ + (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ #define TkpSetCursor \ (tkIntPlatStubsPtr->tkpSetCursor) /* 8 */ -#define TkpWmSetState \ - (tkIntPlatStubsPtr->tkpWmSetState) /* 9 */ +#define TkpSetCapture \ + (tkIntPlatStubsPtr->tkpSetCapture) /* 9 */ #define TkSetPixmapColormap \ (tkIntPlatStubsPtr->tkSetPixmapColormap) /* 10 */ -#define TkWinCancelMouseTimer \ - (tkIntPlatStubsPtr->tkWinCancelMouseTimer) /* 11 */ +/* Slot 11 is reserved */ #define TkWinClipboardRender \ (tkIntPlatStubsPtr->tkWinClipboardRender) /* 12 */ #define TkWinEmbeddedEventProc \ @@ -589,26 +587,28 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* Slot 0 is reserved */ -/* Slot 1 is reserved */ +#define TkAboutDlg \ + (tkIntPlatStubsPtr->tkAboutDlg) /* 1 */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ +#define TkpGetMS \ + (tkIntPlatStubsPtr->tkpGetMS) /* 3 */ #define TkPointerDeadWindow \ - (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 3 */ -#define TkpSetCapture \ - (tkIntPlatStubsPtr->tkpSetCapture) /* 4 */ + (tkIntPlatStubsPtr->tkPointerDeadWindow) /* 4 */ #define TkpSetCursor \ (tkIntPlatStubsPtr->tkpSetCursor) /* 5 */ +#define TkpScanWindowId \ + (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */ #define TkpWmSetState \ - (tkIntPlatStubsPtr->tkpWmSetState) /* 6 */ -#define TkAboutDlg \ - (tkIntPlatStubsPtr->tkAboutDlg) /* 7 */ + (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ #define TkMacOSXButtonKeyState \ (tkIntPlatStubsPtr->tkMacOSXButtonKeyState) /* 8 */ -#define TkMacOSXClearMenubarActive \ - (tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 9 */ +#define TkpSetCapture \ + (tkIntPlatStubsPtr->tkpSetCapture) /* 9 */ #define TkMacOSXDispatchMenuEvent \ (tkIntPlatStubsPtr->tkMacOSXDispatchMenuEvent) /* 10 */ -/* Slot 11 is reserved */ +#define TkMacOSXClearMenubarActive \ + (tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 11 */ #define TkMacOSXHandleTearoffMenu \ (tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */ /* Slot 13 is reserved */ @@ -681,32 +681,28 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkGenWMDestroyEvent) /* 51 */ #define TkMacOSXSetDrawingEnabled \ (tkIntPlatStubsPtr->tkMacOSXSetDrawingEnabled) /* 52 */ -#define TkpGetMS \ - (tkIntPlatStubsPtr->tkpGetMS) /* 53 */ +/* Slot 53 is reserved */ #define TkMacOSXDrawable \ (tkIntPlatStubsPtr->tkMacOSXDrawable) /* 54 */ -#define TkpScanWindowId \ - (tkIntPlatStubsPtr->tkpScanWindowId) /* 55 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ -#define TkCreateXEventSource \ - (tkIntPlatStubsPtr->tkCreateXEventSource) /* 0 */ +/* Slot 0 is reserved */ /* Slot 1 is reserved */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ /* Slot 3 is reserved */ /* Slot 4 is reserved */ /* Slot 5 is reserved */ -/* Slot 6 is reserved */ -/* Slot 7 is reserved */ #define TkpScanWindowId \ - (tkIntPlatStubsPtr->tkpScanWindowId) /* 8 */ + (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */ +#define TkpWmSetState \ + (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ +/* Slot 8 is reserved */ #define TkWmCleanup \ (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */ /* Slot 10 is reserved */ /* Slot 11 is reserved */ -#define TkpWmSetState \ - (tkIntPlatStubsPtr->tkpWmSetState) /* 12 */ +/* Slot 12 is reserved */ /* Slot 13 is reserved */ /* Slot 14 is reserved */ /* Slot 15 is reserved */ @@ -731,7 +727,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 34 is reserved */ /* Slot 35 is reserved */ /* Slot 36 is reserved */ -/* Slot 37 is reserved */ +#define TkCreateXEventSource \ + (tkIntPlatStubsPtr->tkCreateXEventSource) /* 37 */ #define TkpCmapStressed \ (tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */ #define TkpSync \ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index ff2cc1c..e32ea2c 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -53,8 +53,14 @@ doNothing(void) } # undef TkpWillDrawWidget # undef TkpRedrawWidget +# undef TkpDefineNativeBitmaps +# undef TkpCreateNativeBitmap +# undef TkpGetNativeAppBitmap # define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing) # define TkpRedrawWidget ((void (*)(Tk_Window))(void *)doNothing) +# define TkpDefineNativeBitmaps ((void (*)())(void *)doNothing) +# define TkpCreateNativeBitmap ((Pixmap (*)(Display *, const void *))(void *)doNothing) +# define TkpGetNativeAppBitmap ((Pixmap (*)(Display *, const char*, int *, int *))(void *)doNothing) #endif #ifdef _WIN32 @@ -353,37 +359,10 @@ static const TkIntStubs tkIntStubs = { XSetRegion, /* 118 */ XUnionRectWithRegion, /* 119 */ 0, /* 120 */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - 0, /* 121 */ -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - 0, /* 121 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - 0, /* 121 */ /* Dummy entry for stubs table backwards compatibility */ TkpCreateNativeBitmap, /* 121 */ -#endif /* AQUA */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - 0, /* 122 */ -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - 0, /* 122 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - 0, /* 122 */ /* Dummy entry for stubs table backwards compatibility */ TkpDefineNativeBitmaps, /* 122 */ -#endif /* AQUA */ 0, /* 123 */ -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */ - 0, /* 124 */ -#endif /* X11 */ -#if defined(_WIN32) /* WIN */ - 0, /* 124 */ -#endif /* WIN */ -#ifdef MAC_OSX_TK /* AQUA */ - 0, /* 124 */ /* Dummy entry for stubs table backwards compatibility */ TkpGetNativeAppBitmap, /* 124 */ -#endif /* AQUA */ 0, /* 125 */ 0, /* 126 */ 0, /* 127 */ @@ -454,17 +433,17 @@ static const TkIntPlatStubs tkIntPlatStubs = { 0, #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ TkAlignImageData, /* 0 */ - 0, /* 1 */ + TkWinCancelMouseTimer, /* 1 */ TkGenerateActivateEvents, /* 2 */ TkpGetMS, /* 3 */ TkPointerDeadWindow, /* 4 */ TkpPrintWindowId, /* 5 */ TkpScanWindowId, /* 6 */ - TkpSetCapture, /* 7 */ + TkpWmSetState, /* 7 */ TkpSetCursor, /* 8 */ - TkpWmSetState, /* 9 */ + TkpSetCapture, /* 9 */ TkSetPixmapColormap, /* 10 */ - TkWinCancelMouseTimer, /* 11 */ + 0, /* 11 */ TkWinClipboardRender, /* 12 */ TkWinEmbeddedEventProc, /* 13 */ TkWinFillRect, /* 14 */ @@ -504,17 +483,17 @@ static const TkIntPlatStubs tkIntPlatStubs = { #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ 0, /* 0 */ - 0, /* 1 */ + TkAboutDlg, /* 1 */ TkGenerateActivateEvents, /* 2 */ - TkPointerDeadWindow, /* 3 */ - TkpSetCapture, /* 4 */ + TkpGetMS, /* 3 */ + TkPointerDeadWindow, /* 4 */ TkpSetCursor, /* 5 */ - TkpWmSetState, /* 6 */ - TkAboutDlg, /* 7 */ + TkpScanWindowId, /* 6 */ + TkpWmSetState, /* 7 */ TkMacOSXButtonKeyState, /* 8 */ - TkMacOSXClearMenubarActive, /* 9 */ + TkpSetCapture, /* 9 */ TkMacOSXDispatchMenuEvent, /* 10 */ - 0, /* 11 */ + TkMacOSXClearMenubarActive, /* 11 */ TkMacOSXHandleTearoffMenu, /* 12 */ 0, /* 13 */ TkMacOSXDoHLEvent, /* 14 */ @@ -556,24 +535,23 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkGenerateButtonEvent, /* 50 */ TkGenWMDestroyEvent, /* 51 */ TkMacOSXSetDrawingEnabled, /* 52 */ - TkpGetMS, /* 53 */ + 0, /* 53 */ TkMacOSXDrawable, /* 54 */ - TkpScanWindowId, /* 55 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ - TkCreateXEventSource, /* 0 */ + 0, /* 0 */ 0, /* 1 */ TkGenerateActivateEvents, /* 2 */ 0, /* 3 */ 0, /* 4 */ 0, /* 5 */ - 0, /* 6 */ - 0, /* 7 */ - TkpScanWindowId, /* 8 */ + TkpScanWindowId, /* 6 */ + TkpWmSetState, /* 7 */ + 0, /* 8 */ TkWmCleanup, /* 9 */ 0, /* 10 */ 0, /* 11 */ - TkpWmSetState, /* 12 */ + 0, /* 12 */ 0, /* 13 */ 0, /* 14 */ 0, /* 15 */ @@ -598,7 +576,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { 0, /* 34 */ 0, /* 35 */ 0, /* 36 */ - 0, /* 37 */ + TkCreateXEventSource, /* 37 */ TkpCmapStressed, /* 38 */ TkpSync, /* 39 */ TkUnixContainerId, /* 40 */ diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 547657b..cc8bcd2 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -6978,7 +6978,7 @@ TkpGetWrapperWindow( *---------------------------------------------------------------------- */ -void +int TkpWmSetState( TkWindow *winPtr, /* Toplevel window to operate on. */ int state) /* One of IconicState, ZoomState, NormalState, @@ -6989,7 +6989,7 @@ TkpWmSetState( wmPtr->hints.initial_state = state; if (wmPtr->flags & WM_NEVER_MAPPED) { - return; + goto setStateEnd; } macWin = TkMacOSXGetNSWindowForDrawable(winPtr->window); @@ -7033,6 +7033,8 @@ TkpWmSetState( */ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){} +setStateEnd: + return 1; } /* diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h index 1cd2e8a..097c7b8 100644 --- a/unix/tkUnixPort.h +++ b/unix/tkUnixPort.h @@ -146,15 +146,6 @@ #endif /* - * These calls implement native bitmaps which are not supported under - * UNIX. The macros eliminate the calls. - */ - -#define TkpDefineNativeBitmaps() -#define TkpCreateNativeBitmap(display, source) None -#define TkpGetNativeAppBitmap(display, name, w, h) None - -/* * This macro stores a representation of the window handle in a string. * This should perhaps use the real size of an XID. */ diff --git a/win/tkWinPort.h b/win/tkWinPort.h index d3471ca..fd43335 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -124,13 +124,4 @@ #define TkpGetPixel(p) (((((p)->red >> 8) & 0xff) \ | ((p)->green & 0xff00) | (((p)->blue << 8) & 0xff0000)) | 0x20000000) -/* - * These calls implement native bitmaps which are not currently - * supported under Windows. The macros eliminate the calls. - */ - -#define TkpDefineNativeBitmaps() -#define TkpCreateNativeBitmap(display, source) None -#define TkpGetNativeAppBitmap(display, name, w, h) None - #endif /* _WINPORT */ -- cgit v0.12 From 231909c746eb91d932c6723cd0b0f559ec1a93c3 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 16 Nov 2023 19:35:44 +0000 Subject: Fix the build. --- generic/tkStubInit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index e32ea2c..00ff9b3 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -58,7 +58,7 @@ doNothing(void) # undef TkpGetNativeAppBitmap # define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing) # define TkpRedrawWidget ((void (*)(Tk_Window))(void *)doNothing) -# define TkpDefineNativeBitmaps ((void (*)())(void *)doNothing) +# define TkpDefineNativeBitmaps ((void (*))(void *)doNothing) # define TkpCreateNativeBitmap ((Pixmap (*)(Display *, const void *))(void *)doNothing) # define TkpGetNativeAppBitmap ((Pixmap (*)(Display *, const char*, int *, int *))(void *)doNothing) #endif -- cgit v0.12 From e3e93e23861ed2c8e1213f89887559200797eefd Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 16 Nov 2023 19:48:55 +0000 Subject: Remove leftover comments no longer needed after previous commits removing deprecated code. --- generic/tk.h | 13 +------------ generic/tkInt.h | 4 ---- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index 9678a06..52e0e8a 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1500,8 +1500,7 @@ typedef struct Tk_ElementSpec { *---------------------------------------------------------------------- * * The definitions below provide backward compatibility for functions and - * types related to event handling that used to be in Tk but have moved to - * Tcl. + * types that used to be in Tk but have moved to Tcl. * *---------------------------------------------------------------------- */ @@ -1556,16 +1555,6 @@ typedef Tcl_Size (Tk_SelectionProc) (void *clientData, Tcl_Size offset, #include "tkDecls.h" -/* - *---------------------------------------------------------------------- - * - * Allow users to say that they don't want to alter their source to add extra - * arguments to Tk_PhotoPutBlock() et al. - * - * This goes after the inclusion of the stubbed-decls so that the declarations - * of what is actually there can be correct. - */ - #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/generic/tkInt.h b/generic/tkInt.h index dc44576..d503e95 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -545,10 +545,6 @@ typedef struct TkDisplay { * the display when we no longer have any Tk * applications using it. */ - /* - * The following field were all added for Tk8.3 - */ - Tk_Window warpWindow; Tk_Window warpMainwin; /* For finding the root window for warping * purposes. */ -- cgit v0.12 From 285546bf19f7b05f24343d7127cb846b168307d8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 16 Nov 2023 20:11:02 +0000 Subject: Fix the (C++) build --- generic/tkStubInit.c | 2 +- generic/ttk/ttkTreeview.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 00ff9b3..01275f3 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -58,7 +58,7 @@ doNothing(void) # undef TkpGetNativeAppBitmap # define TkpWillDrawWidget ((int (*)(Tk_Window))(void *)doNothing) # define TkpRedrawWidget ((void (*)(Tk_Window))(void *)doNothing) -# define TkpDefineNativeBitmaps ((void (*))(void *)doNothing) +# define TkpDefineNativeBitmaps ((void (*)(void))(void *)doNothing) # define TkpCreateNativeBitmap ((Pixmap (*)(Display *, const void *))(void *)doNothing) # define TkpGetNativeAppBitmap ((Pixmap (*)(Display *, const char*, int *, int *))(void *)doNothing) #endif diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 1197932..4079dc2 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -3269,7 +3269,7 @@ static int TreeviewDetachedCommand( Tcl_Obj *objPtr = Tcl_NewObj(); while (entryPtr != NULL) { - item = Tcl_GetHashValue(entryPtr); + item = (TreeItem *)Tcl_GetHashValue(entryPtr); entryPtr = Tcl_NextHashEntry(&search); if (IsDetached(tv, item)) { Tcl_ListObjAppendElement(NULL, objPtr, ItemID(tv, item)); -- cgit v0.12 From ed03e57742c3c506d5268415d5e054006e6d8c74 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 17 Nov 2023 08:53:59 +0000 Subject: Backout part of [c9a672c28cc8]: joining X11 tables gives symbol conflicts on Linux --- generic/tkInt.decls | 813 ++++++++++++++++++++++++++++++++++-------- generic/tkIntXlibDecls.h | 893 +++++++++++++++++++++++++++++++++++++++++++++++ generic/tkStubInit.c | 163 +++++++++ 3 files changed, 1714 insertions(+), 155 deletions(-) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index bf5e4ed..fbbab54 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -655,9 +655,6 @@ declare 41 x11 { declare 42 x11 { void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) } -declare 43 x11 { - void TkWmCleanup(TkDisplay *dispPtr) -} declare 44 x11 { void TkSendCleanup(TkDisplay *dispPtr) } @@ -698,11 +695,14 @@ declare 8 win { void TkpSetCursor(TkpCursor cursor) } declare 9 win { - void TkpSetCapture(TkWindow *winPtr) + void TkWmCleanup(TkDisplay *dispPtr) } declare 10 win { void TkSetPixmapColormap(Pixmap pixmap, Colormap colormap) } +declare 11 win { + void TkpSetCapture(TkWindow *winPtr) +} declare 12 win { void TkWinClipboardRender(TkDisplay *dispPtr, UINT format) } @@ -809,9 +809,6 @@ declare 41 win { declare 42 win { void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) } -declare 43 win { - void TkWmCleanup(TkDisplay *dispPtr) -} declare 44 win { void TkSendCleanup(TkDisplay *dispPtr) } @@ -852,13 +849,13 @@ declare 8 aqua { unsigned int TkMacOSXButtonKeyState(void) } declare 9 aqua { - void TkpSetCapture(TkWindow *winPtr) + void TkMacOSXClearMenubarActive(void) } declare 10 aqua { int TkMacOSXDispatchMenuEvent(int menuID, int index) } declare 11 aqua { - void TkMacOSXClearMenubarActive(void) + void TkpSetCapture(TkWindow *winPtr) } declare 12 aqua { void TkMacOSXHandleTearoffMenu(void) @@ -968,413 +965,413 @@ declare 54 aqua { interface tkIntXlib ################################ -# X functions +# X functions for Windows -declare 0 { +declare 0 win { int XSetDashes(Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n) } -declare 1 { +declare 1 win { XModifierKeymap *XGetModifierMapping(Display *d) } -declare 2 { +declare 2 win { 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) } -declare 3 { +declare 3 win { XImage *XGetImage(Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3) } -declare 4 { +declare 4 win { char *XGetAtomName(Display *d, Atom a) } -declare 5 { +declare 5 win { char *XKeysymToString(KeySym k) } -declare 6 { +declare 6 win { Colormap XCreateColormap(Display *d, Window w, Visual *v, int i) } -declare 7 { +declare 7 win { Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2) } -declare 8 { +declare 8 win { Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2) } -declare 9 { +declare 9 win { GContext XGContextFromGC(GC g) } -declare 10 { +declare 10 win { XHostAddress *XListHosts(Display *d, int *i, Bool *b) } # second parameter was of type KeyCode -declare 11 { +declare 11 win { KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i) } -declare 12 { +declare 12 win { KeySym XStringToKeysym(_Xconst char *c) } -declare 13 { +declare 13 win { Window XRootWindow(Display *d, int i) } -declare 14 { +declare 14 win { XErrorHandler XSetErrorHandler(XErrorHandler x) } -declare 15 { +declare 15 win { Status XIconifyWindow(Display *d, Window w, int i) } -declare 16 { +declare 16 win { Status XWithdrawWindow(Display *d, Window w, int i) } -declare 17 { +declare 17 win { Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip) } -declare 18 { +declare 18 win { Status XAllocColor(Display *d, Colormap c, XColor *xp) } -declare 19 { +declare 19 win { int XBell(Display *d, int i) } -declare 20 { +declare 20 win { int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3) } -declare 21 { +declare 21 win { int XChangeWindowAttributes(Display *d, Window w, unsigned long ul, XSetWindowAttributes *x) } -declare 22 { +declare 22 win { int XClearWindow(Display *d, Window w) } -declare 23 { +declare 23 win { int XConfigureWindow(Display *d, Window w, unsigned int i, XWindowChanges *x) } -declare 24 { +declare 24 win { int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } -declare 25 { +declare 25 win { int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul) } -declare 26 { +declare 26 win { Pixmap XCreateBitmapFromData(Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height) } -declare 27 { +declare 27 win { int XDefineCursor(Display *d, Window w, Cursor c) } -declare 28 { +declare 28 win { int XDeleteProperty(Display *d, Window w, Atom a) } -declare 29 { +declare 29 win { int XDestroyWindow(Display *d, Window w) } -declare 30 { +declare 30 win { int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } -declare 31 { +declare 31 win { int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2) } -declare 32 { +declare 32 win { int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2) } -declare 33 { +declare 33 win { int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } -declare 34 { +declare 34 win { int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3) } -declare 35 { +declare 35 win { int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i) } -declare 36 { +declare 36 win { int XForceScreenSaver(Display *d, int i) } -declare 37 { +declare 37 win { int XFreeColormap(Display *d, Colormap c) } -declare 38 { +declare 38 win { int XFreeColors(Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul) } -declare 39 { +declare 39 win { int XFreeCursor(Display *d, Cursor c) } -declare 40 { +declare 40 win { int XFreeModifiermap(XModifierKeymap *x) } -declare 41 { +declare 41 win { Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4) } -declare 42 { +declare 42 win { int XGetInputFocus(Display *d, Window *w, int *i) } -declare 43 { +declare 43 win { int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp) } -declare 44 { +declare 44 win { Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x) } -declare 45 { +declare 45 win { int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t) } -declare 46 { +declare 46 win { int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t) } -declare 47 { +declare 47 win { KeyCode XKeysymToKeycode(Display *d, KeySym k) } -declare 48 { +declare 48 win { Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2) } -declare 49 { +declare 49 win { int XMapWindow(Display *d, Window w) } -declare 50 { +declare 50 win { int XMoveResizeWindow(Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2) } -declare 51 { +declare 51 win { int XMoveWindow(Display *d, Window w, int i1, int i2) } -declare 52 { +declare 52 win { int XNextEvent(Display *d, XEvent *x) } -declare 53 { +declare 53 win { int XPutBackEvent(Display *d, XEvent *x) } -declare 54 { +declare 54 win { int XQueryColors(Display *d, Colormap c, XColor *x, int i) } -declare 55 { +declare 55 win { Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui) } -declare 56 { +declare 56 win { Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui) } -declare 57 { +declare 57 win { int XRaiseWindow(Display *d, Window w) } -declare 58 { +declare 58 win { int XRefreshKeyboardMapping(XMappingEvent *x) } -declare 59 { +declare 59 win { int XResizeWindow(Display *d, Window w, unsigned int ui1, unsigned int ui2) } -declare 60 { +declare 60 win { int XSelectInput(Display *d, Window w, long l) } -declare 61 { +declare 61 win { Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) } -declare 62 { +declare 62 win { int XSetCommand(Display *d, Window w, char **c, int i) } -declare 63 { +declare 63 win { int XSetIconName(Display *d, Window w, _Xconst char *c) } -declare 64 { +declare 64 win { int XSetInputFocus(Display *d, Window w, int i, Time t) } -declare 65 { +declare 65 win { int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) } -declare 66 { +declare 66 win { int XSetWindowBackground(Display *d, Window w, unsigned long ul) } -declare 67 { +declare 67 win { int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) } -declare 68 { +declare 68 win { int XSetWindowBorder(Display *d, Window w, unsigned long ul) } -declare 69 { +declare 69 win { int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) } -declare 70 { +declare 70 win { int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) } -declare 71 { +declare 71 win { int XSetWindowColormap(Display *d, Window w, Colormap c) } -declare 72 { +declare 72 win { Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3) } -declare 73 { +declare 73 win { int XUngrabKeyboard(Display *d, Time t) } -declare 74 { +declare 74 win { int XUngrabPointer(Display *d, Time t) } -declare 75 { +declare 75 win { int XUnmapWindow(Display *d, Window w) } -declare 76 { +declare 76 win { int XWindowEvent(Display *d, Window w, long l, XEvent *x) } -declare 77 { +declare 77 win { void XDestroyIC(XIC x) } -declare 78 { +declare 78 win { Bool XFilterEvent(XEvent *x, Window w) } -declare 79 { +declare 79 win { int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s) } -declare 80 { +declare 80 win { int TkPutImage(unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height) } -declare 81 { +declare 81 win { int XSetClipRectangles(Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering) } -declare 82 { +declare 82 win { Status XParseColor(Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr) } -declare 83 { +declare 83 win { GC XCreateGC(Display *display, Drawable d, unsigned long valuemask, XGCValues *values) } -declare 84 { +declare 84 win { int XFreeGC(Display *display, GC gc) } -declare 85 { +declare 85 win { Atom XInternAtom(Display *display, _Xconst char *atom_name, Bool only_if_exists) } -declare 86 { +declare 86 win { int XSetBackground(Display *display, GC gc, unsigned long foreground) } -declare 87 { +declare 87 win { int XSetForeground(Display *display, GC gc, unsigned long foreground) } -declare 88 { +declare 88 win { int XSetClipMask(Display *display, GC gc, Pixmap pixmap) } -declare 89 { +declare 89 win { int XSetClipOrigin(Display *display, GC gc, int clip_x_origin, int clip_y_origin) } -declare 90 { +declare 90 win { int XSetTSOrigin(Display *display, GC gc, int ts_x_origin, int ts_y_origin) } -declare 91 { +declare 91 win { int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values) } -declare 92 { +declare 92 win { int XSetFont(Display *display, GC gc, Font font) } -declare 93 { +declare 93 win { int XSetArcMode(Display *display, GC gc, int arc_mode) } -declare 94 { +declare 94 win { int XSetStipple(Display *display, GC gc, Pixmap stipple) } -declare 95 { +declare 95 win { int XSetFillRule(Display *display, GC gc, int fill_rule) } -declare 96 { +declare 96 win { int XSetFillStyle(Display *display, GC gc, int fill_style) } -declare 97 { +declare 97 win { int XSetFunction(Display *display, GC gc, int function) } -declare 98 { +declare 98 win { int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style) } -declare 99 { +declare 99 win { int _XInitImageFuncPtrs(XImage *image) } -declare 100 { +declare 100 win { XIC XCreateIC(XIM xim, ...) } -declare 101 { +declare 101 win { XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return) } -declare 102 { +declare 102 win { void XSetWMClientMachine(Display *display, Window w, XTextProperty *text_prop) } -declare 103 { +declare 103 win { Status XStringListToTextProperty(char **list, int count, XTextProperty *text_prop_return) } -declare 104 { +declare 104 win { int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2) } -declare 105 { +declare 105 win { int XWarpPointer(Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy) } -declare 106 { +declare 106 win { int XFillRectangle(Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height) } # New in Tk 8.6 -declare 107 { +declare 107 win { int XFlush(Display *display) } -declare 108 { +declare 108 win { int XGrabServer(Display *display) } -declare 109 { +declare 109 win { int XUngrabServer(Display *display) } -declare 110 { +declare 110 win { int XFree(void *data) } -declare 111 { +declare 111 win { int XNoOp(Display *display) } -declare 112 { +declare 112 win { XAfterFunction XSynchronize(Display *display, Bool onoff) } -declare 113 { +declare 113 win { int XSync(Display *display, Bool discard) } -declare 114 { +declare 114 win { VisualID XVisualIDFromVisual(Visual *visual) } # For tktreectrl -declare 120 { +declare 120 win { int XOffsetRegion(Region rgn, int dx, int dy) } -declare 121 { +declare 121 win { int XUnionRegion(Region srca, Region srcb, Region dr_return) } # For 3dcanvas -declare 122 { +declare 122 win { Window XCreateWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clazz, @@ -1383,92 +1380,598 @@ declare 122 { } # Various, e.g. for stub-enabled BLT -declare 129 { +declare 129 win { int XLowerWindow(Display *d, Window w) } -declare 130 { +declare 130 win { int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) } -declare 131 { +declare 131 win { int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) } -declare 132 { +declare 132 win { int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n) } -declare 133 { +declare 133 win { int XDrawSegments(Display *d, Drawable dr, GC gc, XSegment *s, int n) } -declare 134 { +declare 134 win { int XDrawPoint(Display *d, Drawable dr, GC gc, int x, int y) } -declare 135 { +declare 135 win { int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m) } -declare 136 { +declare 136 win { int XReparentWindow(Display *d, Window w, Window p, int x, int y) } -declare 137 { +declare 137 win { int XPutImage(Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h) } -declare 138 { +declare 138 win { Region XPolygonRegion(XPoint *pts, int n, int rule) } -declare 139 { +declare 139 win { int XPointInRegion(Region rgn, int x, int y) } # For XIM -declare 140 { +declare 140 win { XVaNestedList XVaCreateNestedList(int dummy, ...) } -declare 141 { +declare 141 win { char *XSetICValues(XIC xic, ...) } -declare 142 { +declare 142 win { char *XGetICValues(XIC xic, ...) } -declare 143 { +declare 143 win { void XSetICFocus(XIC xic) } -declare 147 { +declare 147 win { void XFreeFontSet(Display *display, XFontSet fontset) } -declare 148 { +declare 148 win { int XCloseIM(XIM im) } -declare 149 { +declare 149 win { Bool XRegisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data) } -declare 150 { +declare 150 win { Bool XUnregisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data) } -declare 151 { +declare 151 win { char *XSetLocaleModifiers(const char *modifier_list) } -declare 152 { +declare 152 win { XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, char *res_class) } -declare 153 { +declare 153 win { char *XGetIMValues(XIM im, ...) } -declare 154 { +declare 154 win { char *XSetIMValues(XIM im, ...) } -declare 155 { +declare 155 win { XFontSet XCreateFontSet(Display *display, _Xconst char *base_font_name_list, char ***missing_charset_list, int *missing_charset_count, char **def_string) } -declare 156 { +declare 156 win { void XFreeStringList(char **list) } -declare 157 { +declare 157 win { KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, int i) } -declare 158 { +declare 158 win { + Display *XkbOpenDisplay(const char *name, int *ev_rtrn, int *err_rtrn, + int *major_rtrn, int *minor_rtrn, int *reason) +} + +################################ +# X functions for MacOSX + +declare 0 macosx { + int XSetDashes(Display *display, GC gc, int dash_offset, + _Xconst char *dash_list, int n) +} +declare 1 macosx { + XModifierKeymap *XGetModifierMapping(Display *d) +} +declare 2 macosx { + 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) +} +declare 3 macosx { + XImage *XGetImage(Display *d, Drawable dr, int i1, int i2, + unsigned int ui1, unsigned int ui2, unsigned long ul, int i3) +} +declare 4 macosx { + char *XGetAtomName(Display *d, Atom a) +} +declare 5 macosx { + char *XKeysymToString(KeySym k) +} +declare 6 macosx { + Colormap XCreateColormap(Display *d, Window w, Visual *v, int i) +} +declare 7 macosx { + Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, + XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2) +} +declare 8 macosx { + Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, + unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, + XColor _Xconst *x2) +} +declare 9 macosx { + GContext XGContextFromGC(GC g) +} +declare 10 macosx { + XHostAddress *XListHosts(Display *d, int *i, Bool *b) +} +# second parameter was of type KeyCode +declare 11 macosx { + KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i) +} +declare 12 macosx { + KeySym XStringToKeysym(_Xconst char *c) +} +declare 13 macosx { + Window XRootWindow(Display *d, int i) +} +declare 14 macosx { + XErrorHandler XSetErrorHandler(XErrorHandler x) +} +declare 15 macosx { + Status XIconifyWindow(Display *d, Window w, int i) +} +declare 16 macosx { + Status XWithdrawWindow(Display *d, Window w, int i) +} +declare 17 macosx { + Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip) +} +declare 18 macosx { + Status XAllocColor(Display *d, Colormap c, XColor *xp) +} +declare 19 macosx { + int XBell(Display *d, int i) +} +declare 20 macosx { + int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, + int i2, _Xconst unsigned char *c, int i3) +} +declare 21 macosx { + int XChangeWindowAttributes(Display *d, Window w, unsigned long ul, + XSetWindowAttributes *x) +} +declare 22 macosx { + int XClearWindow(Display *d, Window w) +} +declare 23 macosx { + int XConfigureWindow(Display *d, Window w, unsigned int i, + XWindowChanges *x) +} +declare 24 macosx { + int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) +} +declare 25 macosx { + int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4, unsigned long ul) +} +declare 26 macosx { + Pixmap XCreateBitmapFromData(Display *display, Drawable d, + _Xconst char *data, unsigned int width, unsigned int height) +} +declare 27 macosx { + int XDefineCursor(Display *d, Window w, Cursor c) +} +declare 28 macosx { + int XDeleteProperty(Display *d, Window w, Atom a) +} +declare 29 macosx { + int XDestroyWindow(Display *d, Window w) +} +declare 30 macosx { + int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, + unsigned int ui1, unsigned int ui2, int i3, int i4) +} +declare 31 macosx { + int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2) +} +declare 32 macosx { + int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2, + unsigned int ui1, unsigned int ui2) +} +declare 33 macosx { + int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, + unsigned int ui1, unsigned int ui2, int i3, int i4) +} +declare 34 macosx { + int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, + int i1, int i2, int i3) +} +declare 35 macosx { + int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i) +} +declare 36 macosx { + int XForceScreenSaver(Display *d, int i) +} +declare 37 macosx { + int XFreeColormap(Display *d, Colormap c) +} +declare 38 macosx { + int XFreeColors(Display *d, Colormap c, + unsigned long *ulp, int i, unsigned long ul) +} +declare 39 macosx { + int XFreeCursor(Display *d, Cursor c) +} +declare 40 macosx { + int XFreeModifiermap(XModifierKeymap *x) +} +declare 41 macosx { + Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, + int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, + unsigned int *ui4) +} +declare 42 macosx { + int XGetInputFocus(Display *d, Window *w, int *i) +} +declare 43 macosx { + int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2, + Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, + unsigned long *ulp2, unsigned char **cpp) +} +declare 44 macosx { + Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x) +} +declare 45 macosx { + int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t) +} +declare 46 macosx { + int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, + int i1, int i2, Window w2, Cursor c, Time t) +} +declare 47 macosx { + KeyCode XKeysymToKeycode(Display *d, KeySym k) +} +declare 48 macosx { + Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2, + XColor *x1, XColor *x2) +} +declare 49 macosx { + int XMapWindow(Display *d, Window w) +} +declare 50 macosx { + int XMoveResizeWindow(Display *d, Window w, int i1, int i2, + unsigned int ui1, unsigned int ui2) +} +declare 51 macosx { + int XMoveWindow(Display *d, Window w, int i1, int i2) +} +declare 52 macosx { + int XNextEvent(Display *d, XEvent *x) +} +declare 53 macosx { + int XPutBackEvent(Display *d, XEvent *x) +} +declare 54 macosx { + int XQueryColors(Display *d, Colormap c, XColor *x, int i) +} +declare 55 macosx { + Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, + int *i1, int *i2, int *i3, int *i4, unsigned int *ui) +} +declare 56 macosx { + Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3, + Window **w4, unsigned int *ui) +} +declare 57 macosx { + int XRaiseWindow(Display *d, Window w) +} +declare 58 macosx { + int XRefreshKeyboardMapping(XMappingEvent *x) +} +declare 59 macosx { + int XResizeWindow(Display *d, Window w, unsigned int ui1, + unsigned int ui2) +} +declare 60 macosx { + int XSelectInput(Display *d, Window w, long l) +} +declare 61 macosx { + Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) +} +declare 62 macosx { + int XSetCommand(Display *d, Window w, char **c, int i) +} +declare 63 macosx { + int XSetIconName(Display *d, Window w, _Xconst char *c) +} +declare 64 macosx { + int XSetInputFocus(Display *d, Window w, int i, Time t) +} +declare 65 macosx { + int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) +} +declare 66 macosx { + int XSetWindowBackground(Display *d, Window w, unsigned long ul) +} +declare 67 macosx { + int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) +} +declare 68 macosx { + int XSetWindowBorder(Display *d, Window w, unsigned long ul) +} +declare 69 macosx { + int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) +} +declare 70 macosx { + int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) +} +declare 71 macosx { + int XSetWindowColormap(Display *d, Window w, Colormap c) +} +declare 72 macosx { + Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1, + int i2, int *i3, int *i4, Window *w3) +} +declare 73 macosx { + int XUngrabKeyboard(Display *d, Time t) +} +declare 74 macosx { + int XUngrabPointer(Display *d, Time t) +} +declare 75 macosx { + int XUnmapWindow(Display *d, Window w) +} +declare 76 macosx { + int XWindowEvent(Display *d, Window w, long l, XEvent *x) +} +declare 77 macosx { + void XDestroyIC(XIC x) +} +declare 78 macosx { + Bool XFilterEvent(XEvent *x, Window w) +} +declare 79 macosx { + int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i, + KeySym *k, Status *s) +} +declare 80 macosx { + int TkPutImage(unsigned long *colors, int ncolors, Display *display, + Drawable d, GC gc, XImage *image, int src_x, int src_y, + int dest_x, int dest_y, unsigned int width, unsigned int height) +} +declare 81 macosx { + int XSetClipRectangles(Display *display, GC gc, int clip_x_origin, + int clip_y_origin, XRectangle rectangles[], int n, int ordering) +} +declare 82 macosx { + Status XParseColor(Display *display, Colormap map, + _Xconst char *spec, XColor *colorPtr) +} +declare 83 macosx { + GC XCreateGC(Display *display, Drawable d, + unsigned long valuemask, XGCValues *values) +} +declare 84 macosx { + int XFreeGC(Display *display, GC gc) +} +declare 85 macosx { + Atom XInternAtom(Display *display, _Xconst char *atom_name, + Bool only_if_exists) +} +declare 86 macosx { + int XSetBackground(Display *display, GC gc, unsigned long foreground) +} +declare 87 macosx { + int XSetForeground(Display *display, GC gc, unsigned long foreground) +} +declare 88 macosx { + int XSetClipMask(Display *display, GC gc, Pixmap pixmap) +} +declare 89 macosx { + int XSetClipOrigin(Display *display, GC gc, + int clip_x_origin, int clip_y_origin) +} +declare 90 macosx { + int XSetTSOrigin(Display *display, GC gc, + int ts_x_origin, int ts_y_origin) +} +declare 91 macosx { + int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values) +} +declare 92 macosx { + int XSetFont(Display *display, GC gc, Font font) +} +declare 93 macosx { + int XSetArcMode(Display *display, GC gc, int arc_mode) +} +declare 94 macosx { + int XSetStipple(Display *display, GC gc, Pixmap stipple) +} +declare 95 macosx { + int XSetFillRule(Display *display, GC gc, int fill_rule) +} +declare 96 macosx { + int XSetFillStyle(Display *display, GC gc, int fill_style) +} +declare 97 macosx { + int XSetFunction(Display *display, GC gc, int function) +} +declare 98 macosx { + int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, + int line_style, int cap_style, int join_style) +} +declare 99 macosx { + int _XInitImageFuncPtrs(XImage *image) +} +declare 100 macosx { + XIC XCreateIC(XIM xim, ...) +} +declare 101 macosx { + XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask, + XVisualInfo *vinfo_template, int *nitems_return) +} +declare 102 macosx { + void XSetWMClientMachine(Display *display, Window w, + XTextProperty *text_prop) +} +declare 103 macosx { + Status XStringListToTextProperty(char **list, int count, + XTextProperty *text_prop_return) +} +declare 104 macosx { + int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, + int x2, int y2) +} +declare 105 macosx { + int XWarpPointer(Display *d, Window s, Window dw, int sx, int sy, + unsigned int sw, unsigned int sh, int dx, int dy) +} +declare 106 macosx { + int XFillRectangle(Display *display, Drawable d, GC gc, + int x, int y, unsigned int width, unsigned int height) +} + +# New in Tk 8.6 +declare 107 macosx { + int XFlush(Display *display) +} +declare 108 macosx { + int XGrabServer(Display *display) +} +declare 109 macosx { + int XUngrabServer(Display *display) +} +declare 110 macosx { + int XFree(void *data) +} +declare 111 macosx { + int XNoOp(Display *display) +} +declare 112 macosx { + XAfterFunction XSynchronize(Display *display, Bool onoff) +} +declare 113 macosx { + int XSync(Display *display, Bool discard) +} +declare 114 macosx { + VisualID XVisualIDFromVisual(Visual *visual) +} + +# For tktreectrl +declare 120 macosx { + int XOffsetRegion(Region rgn, int dx, int dy) +} +declare 121 macosx { + int XUnionRegion(Region srca, Region srcb, Region dr_return) +} + +# For 3dcanvas +declare 122 macosx { + Window XCreateWindow(Display *display, Window parent, int x, int y, + unsigned int width, unsigned int height, + unsigned int border_width, int depth, unsigned int clazz, + Visual *visual, unsigned long value_mask, + XSetWindowAttributes *attributes) +} + +# Various, e.g. for stub-enabled BLT +declare 129 macosx { + int XLowerWindow(Display *d, Window w) +} +declare 130 macosx { + int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) +} +declare 131 macosx { + int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, int n) +} +declare 132 macosx { + int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n) +} +declare 133 macosx { + int XDrawSegments(Display *d, Drawable dr, GC gc, XSegment *s, int n) +} +declare 134 macosx { + int XDrawPoint(Display *d, Drawable dr, GC gc, int x, int y) +} +declare 135 macosx { + int XDrawPoints(Display *d, Drawable dr, GC gc, XPoint *p, int n, int m) +} +declare 136 macosx { + int XReparentWindow(Display *d, Window w, Window p, int x, int y) +} +declare 137 macosx { + int XPutImage(Display *d, Drawable dr, GC gc, XImage *im, + int sx, int sy, int dx, int dy, + unsigned int w, unsigned int h) +} +declare 138 macosx { + Region XPolygonRegion(XPoint *pts, int n, int rule) +} +declare 139 macosx { + int XPointInRegion(Region rgn, int x, int y) +} +# For XIM +declare 140 macosx { + XVaNestedList XVaCreateNestedList(int dummy, ...) +} +declare 141 macosx { + char *XSetICValues(XIC xic, ...) +} +declare 142 macosx { + char *XGetICValues(XIC xic, ...) +} +declare 143 macosx { + void XSetICFocus(XIC xic) +} +declare 147 macosx { + void XFreeFontSet(Display *display, XFontSet fontset) +} +declare 148 macosx { + int XCloseIM(XIM im) +} +declare 149 macosx { + Bool XRegisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, + char *res_name, char *res_class, XIDProc callback, XPointer client_data) +} +declare 150 macosx { + Bool XUnregisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd, + char *res_name, char *res_class, XIDProc callback, XPointer client_data) +} +declare 151 macosx { + char *XSetLocaleModifiers(const char *modifier_list) +} +declare 152 macosx { + XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, + char *res_class) +} +declare 153 macosx { + char *XGetIMValues(XIM im, ...) +} +declare 154 macosx { + char *XSetIMValues(XIM im, ...) +} +declare 155 macosx { + XFontSet XCreateFontSet(Display *display, _Xconst char *base_font_name_list, + char ***missing_charset_list, int *missing_charset_count, char **def_string) +} +declare 156 macosx { + void XFreeStringList(char **list) +} +declare 157 macosx { + KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, int i) +} +declare 158 macosx { Display *XkbOpenDisplay(const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason) } diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 6c247ca..2f56d80 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -56,6 +56,7 @@ extern "C" { * Exported function declarations: */ +#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ /* 0 */ EXTERN int XSetDashes(Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n); @@ -474,11 +475,594 @@ EXTERN KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, EXTERN Display * XkbOpenDisplay(const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason); +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +/* 0 */ +EXTERN int XSetDashes(Display *display, GC gc, int dash_offset, + _Xconst char *dash_list, int n); +/* 1 */ +EXTERN XModifierKeymap * XGetModifierMapping(Display *d); +/* 2 */ +EXTERN 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); +/* 3 */ +EXTERN XImage * XGetImage(Display *d, Drawable dr, int i1, int i2, + unsigned int ui1, unsigned int ui2, + unsigned long ul, int i3); +/* 4 */ +EXTERN char * XGetAtomName(Display *d, Atom a); +/* 5 */ +EXTERN char * XKeysymToString(KeySym k); +/* 6 */ +EXTERN Colormap XCreateColormap(Display *d, Window w, Visual *v, + int i); +/* 7 */ +EXTERN Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2, + XColor *x1, XColor *x2, unsigned int ui1, + unsigned int ui2); +/* 8 */ +EXTERN Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, + unsigned int ui1, unsigned int ui2, + XColor _Xconst *x1, XColor _Xconst *x2); +/* 9 */ +EXTERN GContext XGContextFromGC(GC g); +/* 10 */ +EXTERN XHostAddress * XListHosts(Display *d, int *i, Bool *b); +/* 11 */ +EXTERN KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i); +/* 12 */ +EXTERN KeySym XStringToKeysym(_Xconst char *c); +/* 13 */ +EXTERN Window XRootWindow(Display *d, int i); +/* 14 */ +EXTERN XErrorHandler XSetErrorHandler(XErrorHandler x); +/* 15 */ +EXTERN Status XIconifyWindow(Display *d, Window w, int i); +/* 16 */ +EXTERN Status XWithdrawWindow(Display *d, Window w, int i); +/* 17 */ +EXTERN Status XGetWMColormapWindows(Display *d, Window w, + Window **wpp, int *ip); +/* 18 */ +EXTERN Status XAllocColor(Display *d, Colormap c, XColor *xp); +/* 19 */ +EXTERN int XBell(Display *d, int i); +/* 20 */ +EXTERN int XChangeProperty(Display *d, Window w, Atom a1, + Atom a2, int i1, int i2, + _Xconst unsigned char *c, int i3); +/* 21 */ +EXTERN int XChangeWindowAttributes(Display *d, Window w, + unsigned long ul, XSetWindowAttributes *x); +/* 22 */ +EXTERN int XClearWindow(Display *d, Window w); +/* 23 */ +EXTERN int XConfigureWindow(Display *d, Window w, + unsigned int i, XWindowChanges *x); +/* 24 */ +EXTERN int XCopyArea(Display *d, Drawable dr1, Drawable dr2, + GC g, int i1, int i2, unsigned int ui1, + unsigned int ui2, int i3, int i4); +/* 25 */ +EXTERN int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, + GC g, int i1, int i2, unsigned int ui1, + unsigned int ui2, int i3, int i4, + unsigned long ul); +/* 26 */ +EXTERN Pixmap XCreateBitmapFromData(Display *display, Drawable d, + _Xconst char *data, unsigned int width, + unsigned int height); +/* 27 */ +EXTERN int XDefineCursor(Display *d, Window w, Cursor c); +/* 28 */ +EXTERN int XDeleteProperty(Display *d, Window w, Atom a); +/* 29 */ +EXTERN int XDestroyWindow(Display *d, Window w); +/* 30 */ +EXTERN int XDrawArc(Display *d, Drawable dr, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4); +/* 31 */ +EXTERN int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, + int i1, int i2); +/* 32 */ +EXTERN int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2); +/* 33 */ +EXTERN int XFillArc(Display *d, Drawable dr, GC g, int i1, + int i2, unsigned int ui1, unsigned int ui2, + int i3, int i4); +/* 34 */ +EXTERN int XFillPolygon(Display *d, Drawable dr, GC g, + XPoint *x, int i1, int i2, int i3); +/* 35 */ +EXTERN int XFillRectangles(Display *d, Drawable dr, GC g, + XRectangle *x, int i); +/* 36 */ +EXTERN int XForceScreenSaver(Display *d, int i); +/* 37 */ +EXTERN int XFreeColormap(Display *d, Colormap c); +/* 38 */ +EXTERN int XFreeColors(Display *d, Colormap c, + unsigned long *ulp, int i, unsigned long ul); +/* 39 */ +EXTERN int XFreeCursor(Display *d, Cursor c); +/* 40 */ +EXTERN int XFreeModifiermap(XModifierKeymap *x); +/* 41 */ +EXTERN Status XGetGeometry(Display *d, Drawable dr, Window *w, + int *i1, int *i2, unsigned int *ui1, + unsigned int *ui2, unsigned int *ui3, + unsigned int *ui4); +/* 42 */ +EXTERN int XGetInputFocus(Display *d, Window *w, int *i); +/* 43 */ +EXTERN int XGetWindowProperty(Display *d, Window w, Atom a1, + long l1, long l2, Bool b, Atom a2, Atom *ap, + int *ip, unsigned long *ulp1, + unsigned long *ulp2, unsigned char **cpp); +/* 44 */ +EXTERN Status XGetWindowAttributes(Display *d, Window w, + XWindowAttributes *x); +/* 45 */ +EXTERN int XGrabKeyboard(Display *d, Window w, Bool b, int i1, + int i2, Time t); +/* 46 */ +EXTERN int XGrabPointer(Display *d, Window w1, Bool b, + unsigned int ui, int i1, int i2, Window w2, + Cursor c, Time t); +/* 47 */ +EXTERN KeyCode XKeysymToKeycode(Display *d, KeySym k); +/* 48 */ +EXTERN Status XLookupColor(Display *d, Colormap c1, + _Xconst char *c2, XColor *x1, XColor *x2); +/* 49 */ +EXTERN int XMapWindow(Display *d, Window w); +/* 50 */ +EXTERN int XMoveResizeWindow(Display *d, Window w, int i1, + int i2, unsigned int ui1, unsigned int ui2); +/* 51 */ +EXTERN int XMoveWindow(Display *d, Window w, int i1, int i2); +/* 52 */ +EXTERN int XNextEvent(Display *d, XEvent *x); +/* 53 */ +EXTERN int XPutBackEvent(Display *d, XEvent *x); +/* 54 */ +EXTERN int XQueryColors(Display *d, Colormap c, XColor *x, + int i); +/* 55 */ +EXTERN Bool XQueryPointer(Display *d, Window w1, Window *w2, + Window *w3, int *i1, int *i2, int *i3, + int *i4, unsigned int *ui); +/* 56 */ +EXTERN Status XQueryTree(Display *d, Window w1, Window *w2, + Window *w3, Window **w4, unsigned int *ui); +/* 57 */ +EXTERN int XRaiseWindow(Display *d, Window w); +/* 58 */ +EXTERN int XRefreshKeyboardMapping(XMappingEvent *x); +/* 59 */ +EXTERN int XResizeWindow(Display *d, Window w, unsigned int ui1, + unsigned int ui2); +/* 60 */ +EXTERN int XSelectInput(Display *d, Window w, long l); +/* 61 */ +EXTERN Status XSendEvent(Display *d, Window w, Bool b, long l, + XEvent *x); +/* 62 */ +EXTERN int XSetCommand(Display *d, Window w, char **c, int i); +/* 63 */ +EXTERN int XSetIconName(Display *d, Window w, _Xconst char *c); +/* 64 */ +EXTERN int XSetInputFocus(Display *d, Window w, int i, Time t); +/* 65 */ +EXTERN int XSetSelectionOwner(Display *d, Atom a, Window w, + Time t); +/* 66 */ +EXTERN int XSetWindowBackground(Display *d, Window w, + unsigned long ul); +/* 67 */ +EXTERN int XSetWindowBackgroundPixmap(Display *d, Window w, + Pixmap p); +/* 68 */ +EXTERN int XSetWindowBorder(Display *d, Window w, + unsigned long ul); +/* 69 */ +EXTERN int XSetWindowBorderPixmap(Display *d, Window w, + Pixmap p); +/* 70 */ +EXTERN int XSetWindowBorderWidth(Display *d, Window w, + unsigned int ui); +/* 71 */ +EXTERN int XSetWindowColormap(Display *d, Window w, Colormap c); +/* 72 */ +EXTERN Bool XTranslateCoordinates(Display *d, Window w1, + Window w2, int i1, int i2, int *i3, int *i4, + Window *w3); +/* 73 */ +EXTERN int XUngrabKeyboard(Display *d, Time t); +/* 74 */ +EXTERN int XUngrabPointer(Display *d, Time t); +/* 75 */ +EXTERN int XUnmapWindow(Display *d, Window w); +/* 76 */ +EXTERN int XWindowEvent(Display *d, Window w, long l, XEvent *x); +/* 77 */ +EXTERN void XDestroyIC(XIC x); +/* 78 */ +EXTERN Bool XFilterEvent(XEvent *x, Window w); +/* 79 */ +EXTERN int XmbLookupString(XIC xi, XKeyPressedEvent *xk, + char *c, int i, KeySym *k, Status *s); +/* 80 */ +EXTERN int TkPutImage(unsigned long *colors, int ncolors, + Display *display, Drawable d, GC gc, + XImage *image, int src_x, int src_y, + int dest_x, int dest_y, unsigned int width, + unsigned int height); +/* 81 */ +EXTERN int XSetClipRectangles(Display *display, GC gc, + int clip_x_origin, int clip_y_origin, + XRectangle rectangles[], int n, int ordering); +/* 82 */ +EXTERN Status XParseColor(Display *display, Colormap map, + _Xconst char *spec, XColor *colorPtr); +/* 83 */ +EXTERN GC XCreateGC(Display *display, Drawable d, + unsigned long valuemask, XGCValues *values); +/* 84 */ +EXTERN int XFreeGC(Display *display, GC gc); +/* 85 */ +EXTERN Atom XInternAtom(Display *display, + _Xconst char *atom_name, Bool only_if_exists); +/* 86 */ +EXTERN int XSetBackground(Display *display, GC gc, + unsigned long foreground); +/* 87 */ +EXTERN int XSetForeground(Display *display, GC gc, + unsigned long foreground); +/* 88 */ +EXTERN int XSetClipMask(Display *display, GC gc, Pixmap pixmap); +/* 89 */ +EXTERN int XSetClipOrigin(Display *display, GC gc, + int clip_x_origin, int clip_y_origin); +/* 90 */ +EXTERN int XSetTSOrigin(Display *display, GC gc, + int ts_x_origin, int ts_y_origin); +/* 91 */ +EXTERN int XChangeGC(Display *d, GC gc, unsigned long mask, + XGCValues *values); +/* 92 */ +EXTERN int XSetFont(Display *display, GC gc, Font font); +/* 93 */ +EXTERN int XSetArcMode(Display *display, GC gc, int arc_mode); +/* 94 */ +EXTERN int XSetStipple(Display *display, GC gc, Pixmap stipple); +/* 95 */ +EXTERN int XSetFillRule(Display *display, GC gc, int fill_rule); +/* 96 */ +EXTERN int XSetFillStyle(Display *display, GC gc, + int fill_style); +/* 97 */ +EXTERN int XSetFunction(Display *display, GC gc, int function); +/* 98 */ +EXTERN int XSetLineAttributes(Display *display, GC gc, + unsigned int line_width, int line_style, + int cap_style, int join_style); +/* 99 */ +EXTERN int _XInitImageFuncPtrs(XImage *image); +/* 100 */ +EXTERN XIC XCreateIC(XIM xim, ...); +/* 101 */ +EXTERN XVisualInfo * XGetVisualInfo(Display *display, long vinfo_mask, + XVisualInfo *vinfo_template, + int *nitems_return); +/* 102 */ +EXTERN void XSetWMClientMachine(Display *display, Window w, + XTextProperty *text_prop); +/* 103 */ +EXTERN Status XStringListToTextProperty(char **list, int count, + XTextProperty *text_prop_return); +/* 104 */ +EXTERN int XDrawLine(Display *d, Drawable dr, GC g, int x1, + int y1, int x2, int y2); +/* 105 */ +EXTERN int XWarpPointer(Display *d, Window s, Window dw, int sx, + int sy, unsigned int sw, unsigned int sh, + int dx, int dy); +/* 106 */ +EXTERN int XFillRectangle(Display *display, Drawable d, GC gc, + int x, int y, unsigned int width, + unsigned int height); +/* 107 */ +EXTERN int XFlush(Display *display); +/* 108 */ +EXTERN int XGrabServer(Display *display); +/* 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); +/* Slot 115 is reserved */ +/* Slot 116 is reserved */ +/* Slot 117 is reserved */ +/* Slot 118 is reserved */ +/* Slot 119 is reserved */ +/* 120 */ +EXTERN int XOffsetRegion(Region rgn, int dx, int dy); +/* 121 */ +EXTERN int XUnionRegion(Region srca, Region srcb, + Region dr_return); +/* 122 */ +EXTERN Window XCreateWindow(Display *display, Window parent, int x, + int y, unsigned int width, + unsigned int height, + unsigned int border_width, int depth, + unsigned int clazz, Visual *visual, + unsigned long value_mask, + XSetWindowAttributes *attributes); +/* Slot 123 is reserved */ +/* Slot 124 is reserved */ +/* Slot 125 is reserved */ +/* Slot 126 is reserved */ +/* Slot 127 is reserved */ +/* Slot 128 is reserved */ +/* 129 */ +EXTERN int XLowerWindow(Display *d, Window w); +/* 130 */ +EXTERN int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, + int n); +/* 131 */ +EXTERN int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, + int n); +/* 132 */ +EXTERN int XDrawRectangles(Display *d, Drawable dr, GC gc, + XRectangle *r, int n); +/* 133 */ +EXTERN int XDrawSegments(Display *d, Drawable dr, GC gc, + XSegment *s, int n); +/* 134 */ +EXTERN int XDrawPoint(Display *d, Drawable dr, GC gc, int x, + int y); +/* 135 */ +EXTERN int XDrawPoints(Display *d, Drawable dr, GC gc, + XPoint *p, int n, int m); +/* 136 */ +EXTERN int XReparentWindow(Display *d, Window w, Window p, + int x, int y); +/* 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); +/* 138 */ +EXTERN Region XPolygonRegion(XPoint *pts, int n, int rule); +/* 139 */ +EXTERN int XPointInRegion(Region rgn, int x, int y); +/* 140 */ +EXTERN XVaNestedList XVaCreateNestedList(int dummy, ...); +/* 141 */ +EXTERN char * XSetICValues(XIC xic, ...); +/* 142 */ +EXTERN char * XGetICValues(XIC xic, ...); +/* 143 */ +EXTERN void XSetICFocus(XIC xic); +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ +/* 147 */ +EXTERN void XFreeFontSet(Display *display, XFontSet fontset); +/* 148 */ +EXTERN int XCloseIM(XIM im); +/* 149 */ +EXTERN Bool XRegisterIMInstantiateCallback(Display *dpy, + struct _XrmHashBucketRec *rbd, + char *res_name, char *res_class, + XIDProc callback, XPointer client_data); +/* 150 */ +EXTERN Bool XUnregisterIMInstantiateCallback(Display *dpy, + struct _XrmHashBucketRec *rbd, + char *res_name, char *res_class, + XIDProc callback, XPointer client_data); +/* 151 */ +EXTERN char * XSetLocaleModifiers(const char *modifier_list); +/* 152 */ +EXTERN XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, + char *res_name, char *res_class); +/* 153 */ +EXTERN char * XGetIMValues(XIM im, ...); +/* 154 */ +EXTERN char * XSetIMValues(XIM im, ...); +/* 155 */ +EXTERN XFontSet XCreateFontSet(Display *display, + _Xconst char *base_font_name_list, + char ***missing_charset_list, + int *missing_charset_count, + char **def_string); +/* 156 */ +EXTERN void XFreeStringList(char **list); +/* 157 */ +EXTERN KeySym XkbKeycodeToKeysym(Display *d, unsigned int k, int g, + int i); +/* 158 */ +EXTERN Display * XkbOpenDisplay(const char *name, int *ev_rtrn, + int *err_rtrn, int *major_rtrn, + int *minor_rtrn, int *reason); +#endif /* MACOSX */ typedef struct TkIntXlibStubs { int magic; void *hooks; +#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ + 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 */ + XImage * (*xGetImage) (Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3); /* 3 */ + char * (*xGetAtomName) (Display *d, Atom a); /* 4 */ + char * (*xKeysymToString) (KeySym k); /* 5 */ + Colormap (*xCreateColormap) (Display *d, Window w, Visual *v, int i); /* 6 */ + Cursor (*xCreatePixmapCursor) (Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2); /* 7 */ + Cursor (*xCreateGlyphCursor) (Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2); /* 8 */ + GContext (*xGContextFromGC) (GC g); /* 9 */ + XHostAddress * (*xListHosts) (Display *d, int *i, Bool *b); /* 10 */ + KeySym (*xKeycodeToKeysym) (Display *d, unsigned int k, int i); /* 11 */ + KeySym (*xStringToKeysym) (_Xconst char *c); /* 12 */ + Window (*xRootWindow) (Display *d, int i); /* 13 */ + XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 14 */ + Status (*xIconifyWindow) (Display *d, Window w, int i); /* 15 */ + Status (*xWithdrawWindow) (Display *d, Window w, int i); /* 16 */ + Status (*xGetWMColormapWindows) (Display *d, Window w, Window **wpp, int *ip); /* 17 */ + Status (*xAllocColor) (Display *d, Colormap c, XColor *xp); /* 18 */ + int (*xBell) (Display *d, int i); /* 19 */ + int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 20 */ + int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 21 */ + int (*xClearWindow) (Display *d, Window w); /* 22 */ + int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 23 */ + int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 24 */ + int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 25 */ + Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 26 */ + int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 27 */ + int (*xDeleteProperty) (Display *d, Window w, Atom a); /* 28 */ + int (*xDestroyWindow) (Display *d, Window w); /* 29 */ + int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 30 */ + int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 31 */ + int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 32 */ + int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 33 */ + int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 34 */ + int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 35 */ + int (*xForceScreenSaver) (Display *d, int i); /* 36 */ + int (*xFreeColormap) (Display *d, Colormap c); /* 37 */ + int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 38 */ + int (*xFreeCursor) (Display *d, Cursor c); /* 39 */ + int (*xFreeModifiermap) (XModifierKeymap *x); /* 40 */ + Status (*xGetGeometry) (Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4); /* 41 */ + int (*xGetInputFocus) (Display *d, Window *w, int *i); /* 42 */ + int (*xGetWindowProperty) (Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp); /* 43 */ + Status (*xGetWindowAttributes) (Display *d, Window w, XWindowAttributes *x); /* 44 */ + int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 45 */ + int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 46 */ + KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 47 */ + Status (*xLookupColor) (Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2); /* 48 */ + int (*xMapWindow) (Display *d, Window w); /* 49 */ + int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 50 */ + int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 51 */ + int (*xNextEvent) (Display *d, XEvent *x); /* 52 */ + int (*xPutBackEvent) (Display *d, XEvent *x); /* 53 */ + int (*xQueryColors) (Display *d, Colormap c, XColor *x, int i); /* 54 */ + Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 55 */ + Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 56 */ + int (*xRaiseWindow) (Display *d, Window w); /* 57 */ + int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 58 */ + int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 59 */ + int (*xSelectInput) (Display *d, Window w, long l); /* 60 */ + Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 61 */ + int (*xSetCommand) (Display *d, Window w, char **c, int i); /* 62 */ + int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 63 */ + int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 64 */ + int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 65 */ + int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 66 */ + int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 67 */ + int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 68 */ + int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 69 */ + int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 70 */ + int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 71 */ + Bool (*xTranslateCoordinates) (Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3); /* 72 */ + int (*xUngrabKeyboard) (Display *d, Time t); /* 73 */ + int (*xUngrabPointer) (Display *d, Time t); /* 74 */ + int (*xUnmapWindow) (Display *d, Window w); /* 75 */ + int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 76 */ + void (*xDestroyIC) (XIC x); /* 77 */ + Bool (*xFilterEvent) (XEvent *x, Window w); /* 78 */ + int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 79 */ + int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 80 */ + int (*xSetClipRectangles) (Display *display, GC gc, int clip_x_origin, int clip_y_origin, XRectangle rectangles[], int n, int ordering); /* 81 */ + Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 82 */ + GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 83 */ + int (*xFreeGC) (Display *display, GC gc); /* 84 */ + Atom (*xInternAtom) (Display *display, _Xconst char *atom_name, Bool only_if_exists); /* 85 */ + int (*xSetBackground) (Display *display, GC gc, unsigned long foreground); /* 86 */ + int (*xSetForeground) (Display *display, GC gc, unsigned long foreground); /* 87 */ + int (*xSetClipMask) (Display *display, GC gc, Pixmap pixmap); /* 88 */ + int (*xSetClipOrigin) (Display *display, GC gc, int clip_x_origin, int clip_y_origin); /* 89 */ + int (*xSetTSOrigin) (Display *display, GC gc, int ts_x_origin, int ts_y_origin); /* 90 */ + int (*xChangeGC) (Display *d, GC gc, unsigned long mask, XGCValues *values); /* 91 */ + int (*xSetFont) (Display *display, GC gc, Font font); /* 92 */ + int (*xSetArcMode) (Display *display, GC gc, int arc_mode); /* 93 */ + int (*xSetStipple) (Display *display, GC gc, Pixmap stipple); /* 94 */ + int (*xSetFillRule) (Display *display, GC gc, int fill_rule); /* 95 */ + int (*xSetFillStyle) (Display *display, GC gc, int fill_style); /* 96 */ + int (*xSetFunction) (Display *display, GC gc, int function); /* 97 */ + int (*xSetLineAttributes) (Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); /* 98 */ + int (*_XInitImageFuncPtrs) (XImage *image); /* 99 */ + XIC (*xCreateIC) (XIM xim, ...); /* 100 */ + XVisualInfo * (*xGetVisualInfo) (Display *display, long vinfo_mask, XVisualInfo *vinfo_template, int *nitems_return); /* 101 */ + void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 102 */ + Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 103 */ + int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 104 */ + 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 */ + void (*reserved115)(void); + void (*reserved116)(void); + void (*reserved117)(void); + void (*reserved118)(void); + void (*reserved119)(void); + int (*xOffsetRegion) (Region rgn, int dx, int dy); /* 120 */ + int (*xUnionRegion) (Region srca, Region srcb, Region dr_return); /* 121 */ + Window (*xCreateWindow) (Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clazz, Visual *visual, unsigned long value_mask, XSetWindowAttributes *attributes); /* 122 */ + void (*reserved123)(void); + void (*reserved124)(void); + void (*reserved125)(void); + void (*reserved126)(void); + void (*reserved127)(void); + void (*reserved128)(void); + int (*xLowerWindow) (Display *d, Window w); /* 129 */ + int (*xFillArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 130 */ + int (*xDrawArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 131 */ + int (*xDrawRectangles) (Display *d, Drawable dr, GC gc, XRectangle *r, int n); /* 132 */ + int (*xDrawSegments) (Display *d, Drawable dr, GC gc, XSegment *s, int n); /* 133 */ + int (*xDrawPoint) (Display *d, Drawable dr, GC gc, int x, int y); /* 134 */ + int (*xDrawPoints) (Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); /* 135 */ + int (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */ + 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 */ + Region (*xPolygonRegion) (XPoint *pts, int n, int rule); /* 138 */ + int (*xPointInRegion) (Region rgn, int x, int y); /* 139 */ + XVaNestedList (*xVaCreateNestedList) (int dummy, ...); /* 140 */ + char * (*xSetICValues) (XIC xic, ...); /* 141 */ + char * (*xGetICValues) (XIC xic, ...); /* 142 */ + void (*xSetICFocus) (XIC xic); /* 143 */ + void (*reserved144)(void); + void (*reserved145)(void); + void (*reserved146)(void); + void (*xFreeFontSet) (Display *display, XFontSet fontset); /* 147 */ + int (*xCloseIM) (XIM im); /* 148 */ + Bool (*xRegisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 149 */ + Bool (*xUnregisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 150 */ + char * (*xSetLocaleModifiers) (const char *modifier_list); /* 151 */ + XIM (*xOpenIM) (Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, char *res_class); /* 152 */ + char * (*xGetIMValues) (XIM im, ...); /* 153 */ + char * (*xSetIMValues) (XIM im, ...); /* 154 */ + XFontSet (*xCreateFontSet) (Display *display, _Xconst char *base_font_name_list, char ***missing_charset_list, int *missing_charset_count, char **def_string); /* 155 */ + void (*xFreeStringList) (char **list); /* 156 */ + KeySym (*xkbKeycodeToKeysym) (Display *d, unsigned int k, int g, int i); /* 157 */ + Display * (*xkbOpenDisplay) (const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason); /* 158 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ 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 */ @@ -638,6 +1222,7 @@ typedef struct TkIntXlibStubs { void (*xFreeStringList) (char **list); /* 156 */ KeySym (*xkbKeycodeToKeysym) (Display *d, unsigned int k, int g, int i); /* 157 */ Display * (*xkbOpenDisplay) (const char *name, int *ev_rtrn, int *err_rtrn, int *major_rtrn, int *minor_rtrn, int *reason); /* 158 */ +#endif /* MACOSX */ } TkIntXlibStubs; extern const TkIntXlibStubs *tkIntXlibStubsPtr; @@ -652,6 +1237,313 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; * Inline function declarations: */ +#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ +#define XSetDashes \ + (tkIntXlibStubsPtr->xSetDashes) /* 0 */ +#define XGetModifierMapping \ + (tkIntXlibStubsPtr->xGetModifierMapping) /* 1 */ +#define XCreateImage \ + (tkIntXlibStubsPtr->xCreateImage) /* 2 */ +#define XGetImage \ + (tkIntXlibStubsPtr->xGetImage) /* 3 */ +#define XGetAtomName \ + (tkIntXlibStubsPtr->xGetAtomName) /* 4 */ +#define XKeysymToString \ + (tkIntXlibStubsPtr->xKeysymToString) /* 5 */ +#define XCreateColormap \ + (tkIntXlibStubsPtr->xCreateColormap) /* 6 */ +#define XCreatePixmapCursor \ + (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 7 */ +#define XCreateGlyphCursor \ + (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 8 */ +#define XGContextFromGC \ + (tkIntXlibStubsPtr->xGContextFromGC) /* 9 */ +#define XListHosts \ + (tkIntXlibStubsPtr->xListHosts) /* 10 */ +#define XKeycodeToKeysym \ + (tkIntXlibStubsPtr->xKeycodeToKeysym) /* 11 */ +#define XStringToKeysym \ + (tkIntXlibStubsPtr->xStringToKeysym) /* 12 */ +#define XRootWindow \ + (tkIntXlibStubsPtr->xRootWindow) /* 13 */ +#define XSetErrorHandler \ + (tkIntXlibStubsPtr->xSetErrorHandler) /* 14 */ +#define XIconifyWindow \ + (tkIntXlibStubsPtr->xIconifyWindow) /* 15 */ +#define XWithdrawWindow \ + (tkIntXlibStubsPtr->xWithdrawWindow) /* 16 */ +#define XGetWMColormapWindows \ + (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 17 */ +#define XAllocColor \ + (tkIntXlibStubsPtr->xAllocColor) /* 18 */ +#define XBell \ + (tkIntXlibStubsPtr->xBell) /* 19 */ +#define XChangeProperty \ + (tkIntXlibStubsPtr->xChangeProperty) /* 20 */ +#define XChangeWindowAttributes \ + (tkIntXlibStubsPtr->xChangeWindowAttributes) /* 21 */ +#define XClearWindow \ + (tkIntXlibStubsPtr->xClearWindow) /* 22 */ +#define XConfigureWindow \ + (tkIntXlibStubsPtr->xConfigureWindow) /* 23 */ +#define XCopyArea \ + (tkIntXlibStubsPtr->xCopyArea) /* 24 */ +#define XCopyPlane \ + (tkIntXlibStubsPtr->xCopyPlane) /* 25 */ +#define XCreateBitmapFromData \ + (tkIntXlibStubsPtr->xCreateBitmapFromData) /* 26 */ +#define XDefineCursor \ + (tkIntXlibStubsPtr->xDefineCursor) /* 27 */ +#define XDeleteProperty \ + (tkIntXlibStubsPtr->xDeleteProperty) /* 28 */ +#define XDestroyWindow \ + (tkIntXlibStubsPtr->xDestroyWindow) /* 29 */ +#define XDrawArc \ + (tkIntXlibStubsPtr->xDrawArc) /* 30 */ +#define XDrawLines \ + (tkIntXlibStubsPtr->xDrawLines) /* 31 */ +#define XDrawRectangle \ + (tkIntXlibStubsPtr->xDrawRectangle) /* 32 */ +#define XFillArc \ + (tkIntXlibStubsPtr->xFillArc) /* 33 */ +#define XFillPolygon \ + (tkIntXlibStubsPtr->xFillPolygon) /* 34 */ +#define XFillRectangles \ + (tkIntXlibStubsPtr->xFillRectangles) /* 35 */ +#define XForceScreenSaver \ + (tkIntXlibStubsPtr->xForceScreenSaver) /* 36 */ +#define XFreeColormap \ + (tkIntXlibStubsPtr->xFreeColormap) /* 37 */ +#define XFreeColors \ + (tkIntXlibStubsPtr->xFreeColors) /* 38 */ +#define XFreeCursor \ + (tkIntXlibStubsPtr->xFreeCursor) /* 39 */ +#define XFreeModifiermap \ + (tkIntXlibStubsPtr->xFreeModifiermap) /* 40 */ +#define XGetGeometry \ + (tkIntXlibStubsPtr->xGetGeometry) /* 41 */ +#define XGetInputFocus \ + (tkIntXlibStubsPtr->xGetInputFocus) /* 42 */ +#define XGetWindowProperty \ + (tkIntXlibStubsPtr->xGetWindowProperty) /* 43 */ +#define XGetWindowAttributes \ + (tkIntXlibStubsPtr->xGetWindowAttributes) /* 44 */ +#define XGrabKeyboard \ + (tkIntXlibStubsPtr->xGrabKeyboard) /* 45 */ +#define XGrabPointer \ + (tkIntXlibStubsPtr->xGrabPointer) /* 46 */ +#define XKeysymToKeycode \ + (tkIntXlibStubsPtr->xKeysymToKeycode) /* 47 */ +#define XLookupColor \ + (tkIntXlibStubsPtr->xLookupColor) /* 48 */ +#define XMapWindow \ + (tkIntXlibStubsPtr->xMapWindow) /* 49 */ +#define XMoveResizeWindow \ + (tkIntXlibStubsPtr->xMoveResizeWindow) /* 50 */ +#define XMoveWindow \ + (tkIntXlibStubsPtr->xMoveWindow) /* 51 */ +#define XNextEvent \ + (tkIntXlibStubsPtr->xNextEvent) /* 52 */ +#define XPutBackEvent \ + (tkIntXlibStubsPtr->xPutBackEvent) /* 53 */ +#define XQueryColors \ + (tkIntXlibStubsPtr->xQueryColors) /* 54 */ +#define XQueryPointer \ + (tkIntXlibStubsPtr->xQueryPointer) /* 55 */ +#define XQueryTree \ + (tkIntXlibStubsPtr->xQueryTree) /* 56 */ +#define XRaiseWindow \ + (tkIntXlibStubsPtr->xRaiseWindow) /* 57 */ +#define XRefreshKeyboardMapping \ + (tkIntXlibStubsPtr->xRefreshKeyboardMapping) /* 58 */ +#define XResizeWindow \ + (tkIntXlibStubsPtr->xResizeWindow) /* 59 */ +#define XSelectInput \ + (tkIntXlibStubsPtr->xSelectInput) /* 60 */ +#define XSendEvent \ + (tkIntXlibStubsPtr->xSendEvent) /* 61 */ +#define XSetCommand \ + (tkIntXlibStubsPtr->xSetCommand) /* 62 */ +#define XSetIconName \ + (tkIntXlibStubsPtr->xSetIconName) /* 63 */ +#define XSetInputFocus \ + (tkIntXlibStubsPtr->xSetInputFocus) /* 64 */ +#define XSetSelectionOwner \ + (tkIntXlibStubsPtr->xSetSelectionOwner) /* 65 */ +#define XSetWindowBackground \ + (tkIntXlibStubsPtr->xSetWindowBackground) /* 66 */ +#define XSetWindowBackgroundPixmap \ + (tkIntXlibStubsPtr->xSetWindowBackgroundPixmap) /* 67 */ +#define XSetWindowBorder \ + (tkIntXlibStubsPtr->xSetWindowBorder) /* 68 */ +#define XSetWindowBorderPixmap \ + (tkIntXlibStubsPtr->xSetWindowBorderPixmap) /* 69 */ +#define XSetWindowBorderWidth \ + (tkIntXlibStubsPtr->xSetWindowBorderWidth) /* 70 */ +#define XSetWindowColormap \ + (tkIntXlibStubsPtr->xSetWindowColormap) /* 71 */ +#define XTranslateCoordinates \ + (tkIntXlibStubsPtr->xTranslateCoordinates) /* 72 */ +#define XUngrabKeyboard \ + (tkIntXlibStubsPtr->xUngrabKeyboard) /* 73 */ +#define XUngrabPointer \ + (tkIntXlibStubsPtr->xUngrabPointer) /* 74 */ +#define XUnmapWindow \ + (tkIntXlibStubsPtr->xUnmapWindow) /* 75 */ +#define XWindowEvent \ + (tkIntXlibStubsPtr->xWindowEvent) /* 76 */ +#define XDestroyIC \ + (tkIntXlibStubsPtr->xDestroyIC) /* 77 */ +#define XFilterEvent \ + (tkIntXlibStubsPtr->xFilterEvent) /* 78 */ +#define XmbLookupString \ + (tkIntXlibStubsPtr->xmbLookupString) /* 79 */ +#define TkPutImage \ + (tkIntXlibStubsPtr->tkPutImage) /* 80 */ +#define XSetClipRectangles \ + (tkIntXlibStubsPtr->xSetClipRectangles) /* 81 */ +#define XParseColor \ + (tkIntXlibStubsPtr->xParseColor) /* 82 */ +#define XCreateGC \ + (tkIntXlibStubsPtr->xCreateGC) /* 83 */ +#define XFreeGC \ + (tkIntXlibStubsPtr->xFreeGC) /* 84 */ +#define XInternAtom \ + (tkIntXlibStubsPtr->xInternAtom) /* 85 */ +#define XSetBackground \ + (tkIntXlibStubsPtr->xSetBackground) /* 86 */ +#define XSetForeground \ + (tkIntXlibStubsPtr->xSetForeground) /* 87 */ +#define XSetClipMask \ + (tkIntXlibStubsPtr->xSetClipMask) /* 88 */ +#define XSetClipOrigin \ + (tkIntXlibStubsPtr->xSetClipOrigin) /* 89 */ +#define XSetTSOrigin \ + (tkIntXlibStubsPtr->xSetTSOrigin) /* 90 */ +#define XChangeGC \ + (tkIntXlibStubsPtr->xChangeGC) /* 91 */ +#define XSetFont \ + (tkIntXlibStubsPtr->xSetFont) /* 92 */ +#define XSetArcMode \ + (tkIntXlibStubsPtr->xSetArcMode) /* 93 */ +#define XSetStipple \ + (tkIntXlibStubsPtr->xSetStipple) /* 94 */ +#define XSetFillRule \ + (tkIntXlibStubsPtr->xSetFillRule) /* 95 */ +#define XSetFillStyle \ + (tkIntXlibStubsPtr->xSetFillStyle) /* 96 */ +#define XSetFunction \ + (tkIntXlibStubsPtr->xSetFunction) /* 97 */ +#define XSetLineAttributes \ + (tkIntXlibStubsPtr->xSetLineAttributes) /* 98 */ +#define _XInitImageFuncPtrs \ + (tkIntXlibStubsPtr->_XInitImageFuncPtrs) /* 99 */ +#define XCreateIC \ + (tkIntXlibStubsPtr->xCreateIC) /* 100 */ +#define XGetVisualInfo \ + (tkIntXlibStubsPtr->xGetVisualInfo) /* 101 */ +#define XSetWMClientMachine \ + (tkIntXlibStubsPtr->xSetWMClientMachine) /* 102 */ +#define XStringListToTextProperty \ + (tkIntXlibStubsPtr->xStringListToTextProperty) /* 103 */ +#define XDrawLine \ + (tkIntXlibStubsPtr->xDrawLine) /* 104 */ +#define XWarpPointer \ + (tkIntXlibStubsPtr->xWarpPointer) /* 105 */ +#define XFillRectangle \ + (tkIntXlibStubsPtr->xFillRectangle) /* 106 */ +#define XFlush \ + (tkIntXlibStubsPtr->xFlush) /* 107 */ +#define XGrabServer \ + (tkIntXlibStubsPtr->xGrabServer) /* 108 */ +#define XUngrabServer \ + (tkIntXlibStubsPtr->xUngrabServer) /* 109 */ +#define XFree \ + (tkIntXlibStubsPtr->xFree) /* 110 */ +#define XNoOp \ + (tkIntXlibStubsPtr->xNoOp) /* 111 */ +#define XSynchronize \ + (tkIntXlibStubsPtr->xSynchronize) /* 112 */ +#define XSync \ + (tkIntXlibStubsPtr->xSync) /* 113 */ +#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 */ +#define XOffsetRegion \ + (tkIntXlibStubsPtr->xOffsetRegion) /* 120 */ +#define XUnionRegion \ + (tkIntXlibStubsPtr->xUnionRegion) /* 121 */ +#define XCreateWindow \ + (tkIntXlibStubsPtr->xCreateWindow) /* 122 */ +/* Slot 123 is reserved */ +/* Slot 124 is reserved */ +/* Slot 125 is reserved */ +/* Slot 126 is reserved */ +/* Slot 127 is reserved */ +/* Slot 128 is reserved */ +#define XLowerWindow \ + (tkIntXlibStubsPtr->xLowerWindow) /* 129 */ +#define XFillArcs \ + (tkIntXlibStubsPtr->xFillArcs) /* 130 */ +#define XDrawArcs \ + (tkIntXlibStubsPtr->xDrawArcs) /* 131 */ +#define XDrawRectangles \ + (tkIntXlibStubsPtr->xDrawRectangles) /* 132 */ +#define XDrawSegments \ + (tkIntXlibStubsPtr->xDrawSegments) /* 133 */ +#define XDrawPoint \ + (tkIntXlibStubsPtr->xDrawPoint) /* 134 */ +#define XDrawPoints \ + (tkIntXlibStubsPtr->xDrawPoints) /* 135 */ +#define XReparentWindow \ + (tkIntXlibStubsPtr->xReparentWindow) /* 136 */ +#define XPutImage \ + (tkIntXlibStubsPtr->xPutImage) /* 137 */ +#define XPolygonRegion \ + (tkIntXlibStubsPtr->xPolygonRegion) /* 138 */ +#define XPointInRegion \ + (tkIntXlibStubsPtr->xPointInRegion) /* 139 */ +#define XVaCreateNestedList \ + (tkIntXlibStubsPtr->xVaCreateNestedList) /* 140 */ +#define XSetICValues \ + (tkIntXlibStubsPtr->xSetICValues) /* 141 */ +#define XGetICValues \ + (tkIntXlibStubsPtr->xGetICValues) /* 142 */ +#define XSetICFocus \ + (tkIntXlibStubsPtr->xSetICFocus) /* 143 */ +/* Slot 144 is reserved */ +/* Slot 145 is reserved */ +/* Slot 146 is reserved */ +#define XFreeFontSet \ + (tkIntXlibStubsPtr->xFreeFontSet) /* 147 */ +#define XCloseIM \ + (tkIntXlibStubsPtr->xCloseIM) /* 148 */ +#define XRegisterIMInstantiateCallback \ + (tkIntXlibStubsPtr->xRegisterIMInstantiateCallback) /* 149 */ +#define XUnregisterIMInstantiateCallback \ + (tkIntXlibStubsPtr->xUnregisterIMInstantiateCallback) /* 150 */ +#define XSetLocaleModifiers \ + (tkIntXlibStubsPtr->xSetLocaleModifiers) /* 151 */ +#define XOpenIM \ + (tkIntXlibStubsPtr->xOpenIM) /* 152 */ +#define XGetIMValues \ + (tkIntXlibStubsPtr->xGetIMValues) /* 153 */ +#define XSetIMValues \ + (tkIntXlibStubsPtr->xSetIMValues) /* 154 */ +#define XCreateFontSet \ + (tkIntXlibStubsPtr->xCreateFontSet) /* 155 */ +#define XFreeStringList \ + (tkIntXlibStubsPtr->xFreeStringList) /* 156 */ +#define XkbKeycodeToKeysym \ + (tkIntXlibStubsPtr->xkbKeycodeToKeysym) /* 157 */ +#define XkbOpenDisplay \ + (tkIntXlibStubsPtr->xkbOpenDisplay) /* 158 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ #define XSetDashes \ (tkIntXlibStubsPtr->xSetDashes) /* 0 */ #define XGetModifierMapping \ @@ -956,6 +1848,7 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xkbKeycodeToKeysym) /* 157 */ #define XkbOpenDisplay \ (tkIntXlibStubsPtr->xkbOpenDisplay) /* 158 */ +#endif /* MACOSX */ #endif /* defined(USE_TK_STUBS) */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 01275f3..faff8d8 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -591,6 +591,168 @@ static const TkIntPlatStubs tkIntPlatStubs = { static const TkIntXlibStubs tkIntXlibStubs = { TCL_STUB_MAGIC, 0, +#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ + XSetDashes, /* 0 */ + XGetModifierMapping, /* 1 */ + XCreateImage, /* 2 */ + XGetImage, /* 3 */ + XGetAtomName, /* 4 */ + XKeysymToString, /* 5 */ + XCreateColormap, /* 6 */ + XCreatePixmapCursor, /* 7 */ + XCreateGlyphCursor, /* 8 */ + XGContextFromGC, /* 9 */ + XListHosts, /* 10 */ + XKeycodeToKeysym, /* 11 */ + XStringToKeysym, /* 12 */ + XRootWindow, /* 13 */ + XSetErrorHandler, /* 14 */ + XIconifyWindow, /* 15 */ + XWithdrawWindow, /* 16 */ + XGetWMColormapWindows, /* 17 */ + XAllocColor, /* 18 */ + XBell, /* 19 */ + XChangeProperty, /* 20 */ + XChangeWindowAttributes, /* 21 */ + XClearWindow, /* 22 */ + XConfigureWindow, /* 23 */ + XCopyArea, /* 24 */ + XCopyPlane, /* 25 */ + XCreateBitmapFromData, /* 26 */ + XDefineCursor, /* 27 */ + XDeleteProperty, /* 28 */ + XDestroyWindow, /* 29 */ + XDrawArc, /* 30 */ + XDrawLines, /* 31 */ + XDrawRectangle, /* 32 */ + XFillArc, /* 33 */ + XFillPolygon, /* 34 */ + XFillRectangles, /* 35 */ + XForceScreenSaver, /* 36 */ + XFreeColormap, /* 37 */ + XFreeColors, /* 38 */ + XFreeCursor, /* 39 */ + XFreeModifiermap, /* 40 */ + XGetGeometry, /* 41 */ + XGetInputFocus, /* 42 */ + XGetWindowProperty, /* 43 */ + XGetWindowAttributes, /* 44 */ + XGrabKeyboard, /* 45 */ + XGrabPointer, /* 46 */ + XKeysymToKeycode, /* 47 */ + XLookupColor, /* 48 */ + XMapWindow, /* 49 */ + XMoveResizeWindow, /* 50 */ + XMoveWindow, /* 51 */ + XNextEvent, /* 52 */ + XPutBackEvent, /* 53 */ + XQueryColors, /* 54 */ + XQueryPointer, /* 55 */ + XQueryTree, /* 56 */ + XRaiseWindow, /* 57 */ + XRefreshKeyboardMapping, /* 58 */ + XResizeWindow, /* 59 */ + XSelectInput, /* 60 */ + XSendEvent, /* 61 */ + XSetCommand, /* 62 */ + XSetIconName, /* 63 */ + XSetInputFocus, /* 64 */ + XSetSelectionOwner, /* 65 */ + XSetWindowBackground, /* 66 */ + XSetWindowBackgroundPixmap, /* 67 */ + XSetWindowBorder, /* 68 */ + XSetWindowBorderPixmap, /* 69 */ + XSetWindowBorderWidth, /* 70 */ + XSetWindowColormap, /* 71 */ + XTranslateCoordinates, /* 72 */ + XUngrabKeyboard, /* 73 */ + XUngrabPointer, /* 74 */ + XUnmapWindow, /* 75 */ + XWindowEvent, /* 76 */ + XDestroyIC, /* 77 */ + XFilterEvent, /* 78 */ + XmbLookupString, /* 79 */ + TkPutImage, /* 80 */ + XSetClipRectangles, /* 81 */ + XParseColor, /* 82 */ + XCreateGC, /* 83 */ + XFreeGC, /* 84 */ + XInternAtom, /* 85 */ + XSetBackground, /* 86 */ + XSetForeground, /* 87 */ + XSetClipMask, /* 88 */ + XSetClipOrigin, /* 89 */ + XSetTSOrigin, /* 90 */ + XChangeGC, /* 91 */ + XSetFont, /* 92 */ + XSetArcMode, /* 93 */ + XSetStipple, /* 94 */ + XSetFillRule, /* 95 */ + XSetFillStyle, /* 96 */ + XSetFunction, /* 97 */ + XSetLineAttributes, /* 98 */ + _XInitImageFuncPtrs, /* 99 */ + XCreateIC, /* 100 */ + XGetVisualInfo, /* 101 */ + XSetWMClientMachine, /* 102 */ + XStringListToTextProperty, /* 103 */ + XDrawLine, /* 104 */ + XWarpPointer, /* 105 */ + XFillRectangle, /* 106 */ + XFlush, /* 107 */ + XGrabServer, /* 108 */ + XUngrabServer, /* 109 */ + XFree, /* 110 */ + XNoOp, /* 111 */ + XSynchronize, /* 112 */ + XSync, /* 113 */ + XVisualIDFromVisual, /* 114 */ + 0, /* 115 */ + 0, /* 116 */ + 0, /* 117 */ + 0, /* 118 */ + 0, /* 119 */ + XOffsetRegion, /* 120 */ + XUnionRegion, /* 121 */ + XCreateWindow, /* 122 */ + 0, /* 123 */ + 0, /* 124 */ + 0, /* 125 */ + 0, /* 126 */ + 0, /* 127 */ + 0, /* 128 */ + XLowerWindow, /* 129 */ + XFillArcs, /* 130 */ + XDrawArcs, /* 131 */ + XDrawRectangles, /* 132 */ + XDrawSegments, /* 133 */ + XDrawPoint, /* 134 */ + XDrawPoints, /* 135 */ + XReparentWindow, /* 136 */ + XPutImage, /* 137 */ + XPolygonRegion, /* 138 */ + XPointInRegion, /* 139 */ + XVaCreateNestedList, /* 140 */ + XSetICValues, /* 141 */ + XGetICValues, /* 142 */ + XSetICFocus, /* 143 */ + 0, /* 144 */ + 0, /* 145 */ + 0, /* 146 */ + XFreeFontSet, /* 147 */ + XCloseIM, /* 148 */ + XRegisterIMInstantiateCallback, /* 149 */ + XUnregisterIMInstantiateCallback, /* 150 */ + XSetLocaleModifiers, /* 151 */ + XOpenIM, /* 152 */ + XGetIMValues, /* 153 */ + XSetIMValues, /* 154 */ + XCreateFontSet, /* 155 */ + XFreeStringList, /* 156 */ + XkbKeycodeToKeysym, /* 157 */ + XkbOpenDisplay, /* 158 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ XSetDashes, /* 0 */ XGetModifierMapping, /* 1 */ XCreateImage, /* 2 */ @@ -750,6 +912,7 @@ static const TkIntXlibStubs tkIntXlibStubs = { XFreeStringList, /* 156 */ XkbKeycodeToKeysym, /* 157 */ XkbOpenDisplay, /* 158 */ +#endif /* MACOSX */ }; static const TkPlatStubs tkPlatStubs = { -- cgit v0.12 From 2289bae37280a207daadd8d4510a2b73fddc7129 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 17 Nov 2023 09:55:46 +0000 Subject: Re-generate internal stubs --- generic/tkIntPlatDecls.h | 48 +++++++++++++++++++++++------------------------- generic/tkStubInit.c | 12 ++++++------ 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 7a0cc65..474deba 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -57,10 +57,11 @@ EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* 8 */ EXTERN void TkpSetCursor(TkpCursor cursor); /* 9 */ -EXTERN void TkpSetCapture(TkWindow *winPtr); +EXTERN void TkWmCleanup(TkDisplay *dispPtr); /* 10 */ EXTERN void TkSetPixmapColormap(Pixmap pixmap, Colormap colormap); -/* Slot 11 is reserved */ +/* 11 */ +EXTERN void TkpSetCapture(TkWindow *winPtr); /* 12 */ EXTERN void TkWinClipboardRender(TkDisplay *dispPtr, UINT format); /* 13 */ @@ -133,8 +134,7 @@ EXTERN Window TkUnixContainerId(TkWindow *winPtr); EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); /* 42 */ EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); -/* 43 */ -EXTERN void TkWmCleanup(TkDisplay *dispPtr); +/* Slot 43 is reserved */ /* 44 */ EXTERN void TkSendCleanup(TkDisplay *dispPtr); /* 45 */ @@ -165,11 +165,11 @@ EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* 8 */ EXTERN unsigned int TkMacOSXButtonKeyState(void); /* 9 */ -EXTERN void TkpSetCapture(TkWindow *winPtr); +EXTERN void TkMacOSXClearMenubarActive(void); /* 10 */ EXTERN int TkMacOSXDispatchMenuEvent(int menuID, int index); /* 11 */ -EXTERN void TkMacOSXClearMenubarActive(void); +EXTERN void TkpSetCapture(TkWindow *winPtr); /* 12 */ EXTERN void TkMacOSXHandleTearoffMenu(void); /* Slot 13 is reserved */ @@ -308,8 +308,7 @@ EXTERN Window TkUnixContainerId(TkWindow *winPtr); EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); /* 42 */ EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); -/* 43 */ -EXTERN void TkWmCleanup(TkDisplay *dispPtr); +/* Slot 43 is reserved */ /* 44 */ EXTERN void TkSendCleanup(TkDisplay *dispPtr); /* 45 */ @@ -331,9 +330,9 @@ typedef struct TkIntPlatStubs { int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ void (*tkpSetCursor) (TkpCursor cursor); /* 8 */ - void (*tkpSetCapture) (TkWindow *winPtr); /* 9 */ + void (*tkWmCleanup) (TkDisplay *dispPtr); /* 9 */ void (*tkSetPixmapColormap) (Pixmap pixmap, Colormap colormap); /* 10 */ - void (*reserved11)(void); + void (*tkpSetCapture) (TkWindow *winPtr); /* 11 */ void (*tkWinClipboardRender) (TkDisplay *dispPtr, UINT format); /* 12 */ LRESULT (*tkWinEmbeddedEventProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* 13 */ void (*tkWinFillRect) (HDC dc, int x, int y, int width, int height, int pixel); /* 14 */ @@ -365,7 +364,7 @@ typedef struct TkIntPlatStubs { Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 41 */ void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ - void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */ + void (*reserved43)(void); void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */ int (*tkpTestsendCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 45 */ void (*reserved46)(void); @@ -381,9 +380,9 @@ typedef struct TkIntPlatStubs { int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ unsigned int (*tkMacOSXButtonKeyState) (void); /* 8 */ - void (*tkpSetCapture) (TkWindow *winPtr); /* 9 */ + void (*tkMacOSXClearMenubarActive) (void); /* 9 */ int (*tkMacOSXDispatchMenuEvent) (int menuID, int index); /* 10 */ - void (*tkMacOSXClearMenubarActive) (void); /* 11 */ + void (*tkpSetCapture) (TkWindow *winPtr); /* 11 */ void (*tkMacOSXHandleTearoffMenu) (void); /* 12 */ void (*reserved13)(void); int (*tkMacOSXDoHLEvent) (void *theEvent); /* 14 */ @@ -472,7 +471,7 @@ typedef struct TkIntPlatStubs { Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 41 */ void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ - void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */ + void (*reserved43)(void); void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */ int (*tkpTestsendCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 45 */ #endif /* X11 */ @@ -509,11 +508,12 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ #define TkpSetCursor \ (tkIntPlatStubsPtr->tkpSetCursor) /* 8 */ -#define TkpSetCapture \ - (tkIntPlatStubsPtr->tkpSetCapture) /* 9 */ +#define TkWmCleanup \ + (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */ #define TkSetPixmapColormap \ (tkIntPlatStubsPtr->tkSetPixmapColormap) /* 10 */ -/* Slot 11 is reserved */ +#define TkpSetCapture \ + (tkIntPlatStubsPtr->tkpSetCapture) /* 11 */ #define TkWinClipboardRender \ (tkIntPlatStubsPtr->tkWinClipboardRender) /* 12 */ #define TkWinEmbeddedEventProc \ @@ -575,8 +575,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 41 */ #define TkUnixSetMenubar \ (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 42 */ -#define TkWmCleanup \ - (tkIntPlatStubsPtr->tkWmCleanup) /* 43 */ +/* Slot 43 is reserved */ #define TkSendCleanup \ (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */ #define TkpTestsendCmd \ @@ -603,12 +602,12 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ #define TkMacOSXButtonKeyState \ (tkIntPlatStubsPtr->tkMacOSXButtonKeyState) /* 8 */ -#define TkpSetCapture \ - (tkIntPlatStubsPtr->tkpSetCapture) /* 9 */ +#define TkMacOSXClearMenubarActive \ + (tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 9 */ #define TkMacOSXDispatchMenuEvent \ (tkIntPlatStubsPtr->tkMacOSXDispatchMenuEvent) /* 10 */ -#define TkMacOSXClearMenubarActive \ - (tkIntPlatStubsPtr->tkMacOSXClearMenubarActive) /* 11 */ +#define TkpSetCapture \ + (tkIntPlatStubsPtr->tkpSetCapture) /* 11 */ #define TkMacOSXHandleTearoffMenu \ (tkIntPlatStubsPtr->tkMacOSXHandleTearoffMenu) /* 12 */ /* Slot 13 is reserved */ @@ -739,8 +738,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 41 */ #define TkUnixSetMenubar \ (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 42 */ -#define TkWmCleanup \ - (tkIntPlatStubsPtr->tkWmCleanup) /* 43 */ +/* Slot 43 is reserved */ #define TkSendCleanup \ (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */ #define TkpTestsendCmd \ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index faff8d8..f733637 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -441,9 +441,9 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkpScanWindowId, /* 6 */ TkpWmSetState, /* 7 */ TkpSetCursor, /* 8 */ - TkpSetCapture, /* 9 */ + TkWmCleanup, /* 9 */ TkSetPixmapColormap, /* 10 */ - 0, /* 11 */ + TkpSetCapture, /* 11 */ TkWinClipboardRender, /* 12 */ TkWinEmbeddedEventProc, /* 13 */ TkWinFillRect, /* 14 */ @@ -475,7 +475,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkUnixContainerId, /* 40 */ TkUnixDoOneXEvent, /* 41 */ TkUnixSetMenubar, /* 42 */ - TkWmCleanup, /* 43 */ + 0, /* 43 */ TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ 0, /* 46 */ @@ -491,9 +491,9 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkpScanWindowId, /* 6 */ TkpWmSetState, /* 7 */ TkMacOSXButtonKeyState, /* 8 */ - TkpSetCapture, /* 9 */ + TkMacOSXClearMenubarActive, /* 9 */ TkMacOSXDispatchMenuEvent, /* 10 */ - TkMacOSXClearMenubarActive, /* 11 */ + TkpSetCapture, /* 11 */ TkMacOSXHandleTearoffMenu, /* 12 */ 0, /* 13 */ TkMacOSXDoHLEvent, /* 14 */ @@ -582,7 +582,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkUnixContainerId, /* 40 */ TkUnixDoOneXEvent, /* 41 */ TkUnixSetMenubar, /* 42 */ - TkWmCleanup, /* 43 */ + 0, /* 43 */ TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ #endif /* X11 */ -- cgit v0.12 From c57617d6e3b8b231eb25649e5c1bf49d831404a3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 17 Nov 2023 15:27:20 +0000 Subject: Shuffle (internal) stub-entries, so now same functionnames occupy the same stub-entry number, independant from platform. --- generic/tkInt.decls | 35 ++++++++-------- generic/tkIntPlatDecls.h | 106 +++++++++++++++++++++++------------------------ generic/tkStubInit.c | 26 ++++++------ 3 files changed, 83 insertions(+), 84 deletions(-) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index fbbab54..e16a72b 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -624,20 +624,17 @@ interface tkIntPlat ################################ # Unix specific functions +declare 0 x11 { + void TkCreateXEventSource(void) +} declare 2 x11 { void TkGenerateActivateEvents(TkWindow *winPtr, int active) } declare 6 x11 { int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } -declare 7 x11 { - int TkpWmSetState(TkWindow *winPtr, int state) -} declare 9 x11 { - void TkWmCleanup(TkDisplay *dispPtr) -} -declare 37 x11 { - void TkCreateXEventSource(void) + int TkpWmSetState(TkWindow *winPtr, int state) } # only needed by tktest: declare 38 x11 { @@ -655,6 +652,9 @@ declare 41 x11 { declare 42 x11 { void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) } +declare 43 x11 { + void TkWmCleanup(TkDisplay *dispPtr) +} declare 44 x11 { void TkSendCleanup(TkDisplay *dispPtr) } @@ -668,10 +668,7 @@ declare 45 x11 { # Windows specific functions declare 0 win { - char *TkAlignImageData(XImage *image, int alignment, int bitOrder) -} -declare 1 win { - void TkWinCancelMouseTimer(void) + void TkCreateXEventSource(void) } declare 2 win { void TkGenerateActivateEvents(TkWindow *winPtr, int active) @@ -689,19 +686,19 @@ declare 6 win { int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr) } declare 7 win { - int TkpWmSetState(TkWindow *winPtr, int state) + void TkpSetCapture(TkWindow *winPtr) } declare 8 win { void TkpSetCursor(TkpCursor cursor) } declare 9 win { - void TkWmCleanup(TkDisplay *dispPtr) + int TkpWmSetState(TkWindow *winPtr, int state) } declare 10 win { void TkSetPixmapColormap(Pixmap pixmap, Colormap colormap) } declare 11 win { - void TkpSetCapture(TkWindow *winPtr) + void TkWinCancelMouseTimer(void) } declare 12 win { void TkWinClipboardRender(TkDisplay *dispPtr, UINT format) @@ -773,6 +770,9 @@ declare 32 win { Tcl_Obj *TkWinGetMenuSystemDefault(Tk_Window tkwin, const char *dbName, const char *className) } +declare 33 win { + char *TkAlignImageData(XImage *image, int alignment, int bitOrder) +} # new for 8.4.1 @@ -790,10 +790,6 @@ declare 36 win { UINT message, WPARAM wParam, LPARAM lParam) } -# new for 8.4.20+/8.5.12+, Cygwin only -declare 37 win { - void TkCreateXEventSource(void) -} declare 38 win { int TkpCmapStressed(Tk_Window tkwin, Colormap colormap) } @@ -809,6 +805,9 @@ declare 41 win { declare 42 win { void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar) } +declare 43 win { + void TkWmCleanup(TkDisplay *dispPtr) +} declare 44 win { void TkSendCleanup(TkDisplay *dispPtr) } diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 474deba..e470575 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -36,10 +36,8 @@ extern "C" { #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ /* 0 */ -EXTERN char * TkAlignImageData(XImage *image, int alignment, - int bitOrder); -/* 1 */ -EXTERN void TkWinCancelMouseTimer(void); +EXTERN void TkCreateXEventSource(void); +/* Slot 1 is reserved */ /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, int active); @@ -53,15 +51,15 @@ EXTERN void TkpPrintWindowId(char *buf, Window window); EXTERN int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr); /* 7 */ -EXTERN int TkpWmSetState(TkWindow *winPtr, int state); +EXTERN void TkpSetCapture(TkWindow *winPtr); /* 8 */ EXTERN void TkpSetCursor(TkpCursor cursor); /* 9 */ -EXTERN void TkWmCleanup(TkDisplay *dispPtr); +EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* 10 */ EXTERN void TkSetPixmapColormap(Pixmap pixmap, Colormap colormap); /* 11 */ -EXTERN void TkpSetCapture(TkWindow *winPtr); +EXTERN void TkWinCancelMouseTimer(void); /* 12 */ EXTERN void TkWinClipboardRender(TkDisplay *dispPtr, UINT format); /* 13 */ @@ -114,7 +112,9 @@ EXTERN void TkWinDialogDebug(int debug); /* 32 */ EXTERN Tcl_Obj * TkWinGetMenuSystemDefault(Tk_Window tkwin, const char *dbName, const char *className); -/* Slot 33 is reserved */ +/* 33 */ +EXTERN char * TkAlignImageData(XImage *image, int alignment, + int bitOrder); /* 34 */ EXTERN void TkWinSetHINSTANCE(HINSTANCE hInstance); /* 35 */ @@ -122,8 +122,7 @@ EXTERN int TkWinGetPlatformTheme(void); /* 36 */ EXTERN LRESULT __stdcall TkWinChildProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); -/* 37 */ -EXTERN void TkCreateXEventSource(void); +/* Slot 37 is reserved */ /* 38 */ EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); /* 39 */ @@ -134,7 +133,8 @@ EXTERN Window TkUnixContainerId(TkWindow *winPtr); EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); /* 42 */ EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); -/* Slot 43 is reserved */ +/* 43 */ +EXTERN void TkWmCleanup(TkDisplay *dispPtr); /* 44 */ EXTERN void TkSendCleanup(TkDisplay *dispPtr); /* 45 */ @@ -253,7 +253,8 @@ EXTERN void TkMacOSXSetDrawingEnabled(TkWindow *winPtr, int flag); EXTERN void * TkMacOSXDrawable(Drawable drawable); #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ -/* Slot 0 is reserved */ +/* 0 */ +EXTERN void TkCreateXEventSource(void); /* Slot 1 is reserved */ /* 2 */ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, @@ -264,11 +265,10 @@ EXTERN void TkGenerateActivateEvents(TkWindow *winPtr, /* 6 */ EXTERN int TkpScanWindowId(Tcl_Interp *interp, const char *string, Window *idPtr); -/* 7 */ -EXTERN int TkpWmSetState(TkWindow *winPtr, int state); +/* Slot 7 is reserved */ /* Slot 8 is reserved */ /* 9 */ -EXTERN void TkWmCleanup(TkDisplay *dispPtr); +EXTERN int TkpWmSetState(TkWindow *winPtr, int state); /* Slot 10 is reserved */ /* Slot 11 is reserved */ /* Slot 12 is reserved */ @@ -296,8 +296,7 @@ EXTERN void TkWmCleanup(TkDisplay *dispPtr); /* Slot 34 is reserved */ /* Slot 35 is reserved */ /* Slot 36 is reserved */ -/* 37 */ -EXTERN void TkCreateXEventSource(void); +/* Slot 37 is reserved */ /* 38 */ EXTERN int TkpCmapStressed(Tk_Window tkwin, Colormap colormap); /* 39 */ @@ -308,7 +307,8 @@ EXTERN Window TkUnixContainerId(TkWindow *winPtr); EXTERN int TkUnixDoOneXEvent(Tcl_Time *timePtr); /* 42 */ EXTERN void TkUnixSetMenubar(Tk_Window tkwin, Tk_Window menubar); -/* Slot 43 is reserved */ +/* 43 */ +EXTERN void TkWmCleanup(TkDisplay *dispPtr); /* 44 */ EXTERN void TkSendCleanup(TkDisplay *dispPtr); /* 45 */ @@ -321,18 +321,18 @@ typedef struct TkIntPlatStubs { void *hooks; #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ - char * (*tkAlignImageData) (XImage *image, int alignment, int bitOrder); /* 0 */ - void (*tkWinCancelMouseTimer) (void); /* 1 */ + void (*tkCreateXEventSource) (void); /* 0 */ + void (*reserved1)(void); void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ unsigned long (*tkpGetMS) (void); /* 3 */ void (*tkPointerDeadWindow) (TkWindow *winPtr); /* 4 */ void (*tkpPrintWindowId) (char *buf, Window window); /* 5 */ int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ - int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ + void (*tkpSetCapture) (TkWindow *winPtr); /* 7 */ void (*tkpSetCursor) (TkpCursor cursor); /* 8 */ - void (*tkWmCleanup) (TkDisplay *dispPtr); /* 9 */ + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 9 */ void (*tkSetPixmapColormap) (Pixmap pixmap, Colormap colormap); /* 10 */ - void (*tkpSetCapture) (TkWindow *winPtr); /* 11 */ + void (*tkWinCancelMouseTimer) (void); /* 11 */ void (*tkWinClipboardRender) (TkDisplay *dispPtr, UINT format); /* 12 */ LRESULT (*tkWinEmbeddedEventProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* 13 */ void (*tkWinFillRect) (HDC dc, int x, int y, int width, int height, int pixel); /* 14 */ @@ -354,17 +354,17 @@ typedef struct TkIntPlatStubs { void (*tkWinSetForegroundWindow) (TkWindow *winPtr); /* 30 */ void (*tkWinDialogDebug) (int debug); /* 31 */ Tcl_Obj * (*tkWinGetMenuSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 32 */ - void (*reserved33)(void); + char * (*tkAlignImageData) (XImage *image, int alignment, int bitOrder); /* 33 */ void (*tkWinSetHINSTANCE) (HINSTANCE hInstance); /* 34 */ int (*tkWinGetPlatformTheme) (void); /* 35 */ LRESULT (__stdcall *tkWinChildProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* 36 */ - void (*tkCreateXEventSource) (void); /* 37 */ + void (*reserved37)(void); int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */ void (*tkpSync) (Display *display); /* 39 */ Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 41 */ void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ - void (*reserved43)(void); + void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */ void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */ int (*tkpTestsendCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 45 */ void (*reserved46)(void); @@ -428,16 +428,16 @@ typedef struct TkIntPlatStubs { void * (*tkMacOSXDrawable) (Drawable drawable); /* 54 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ - void (*reserved0)(void); + void (*tkCreateXEventSource) (void); /* 0 */ void (*reserved1)(void); void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 2 */ void (*reserved3)(void); void (*reserved4)(void); void (*reserved5)(void); int (*tkpScanWindowId) (Tcl_Interp *interp, const char *string, Window *idPtr); /* 6 */ - int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 7 */ + void (*reserved7)(void); void (*reserved8)(void); - void (*tkWmCleanup) (TkDisplay *dispPtr); /* 9 */ + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 9 */ void (*reserved10)(void); void (*reserved11)(void); void (*reserved12)(void); @@ -465,13 +465,13 @@ typedef struct TkIntPlatStubs { void (*reserved34)(void); void (*reserved35)(void); void (*reserved36)(void); - void (*tkCreateXEventSource) (void); /* 37 */ + void (*reserved37)(void); int (*tkpCmapStressed) (Tk_Window tkwin, Colormap colormap); /* 38 */ void (*tkpSync) (Display *display); /* 39 */ Window (*tkUnixContainerId) (TkWindow *winPtr); /* 40 */ int (*tkUnixDoOneXEvent) (Tcl_Time *timePtr); /* 41 */ void (*tkUnixSetMenubar) (Tk_Window tkwin, Tk_Window menubar); /* 42 */ - void (*reserved43)(void); + void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */ void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */ int (*tkpTestsendCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 45 */ #endif /* X11 */ @@ -490,10 +490,9 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; */ #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ -#define TkAlignImageData \ - (tkIntPlatStubsPtr->tkAlignImageData) /* 0 */ -#define TkWinCancelMouseTimer \ - (tkIntPlatStubsPtr->tkWinCancelMouseTimer) /* 1 */ +#define TkCreateXEventSource \ + (tkIntPlatStubsPtr->tkCreateXEventSource) /* 0 */ +/* Slot 1 is reserved */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ #define TkpGetMS \ @@ -504,16 +503,16 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkpPrintWindowId) /* 5 */ #define TkpScanWindowId \ (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */ -#define TkpWmSetState \ - (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ +#define TkpSetCapture \ + (tkIntPlatStubsPtr->tkpSetCapture) /* 7 */ #define TkpSetCursor \ (tkIntPlatStubsPtr->tkpSetCursor) /* 8 */ -#define TkWmCleanup \ - (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */ +#define TkpWmSetState \ + (tkIntPlatStubsPtr->tkpWmSetState) /* 9 */ #define TkSetPixmapColormap \ (tkIntPlatStubsPtr->tkSetPixmapColormap) /* 10 */ -#define TkpSetCapture \ - (tkIntPlatStubsPtr->tkpSetCapture) /* 11 */ +#define TkWinCancelMouseTimer \ + (tkIntPlatStubsPtr->tkWinCancelMouseTimer) /* 11 */ #define TkWinClipboardRender \ (tkIntPlatStubsPtr->tkWinClipboardRender) /* 12 */ #define TkWinEmbeddedEventProc \ @@ -556,15 +555,15 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkWinDialogDebug) /* 31 */ #define TkWinGetMenuSystemDefault \ (tkIntPlatStubsPtr->tkWinGetMenuSystemDefault) /* 32 */ -/* Slot 33 is reserved */ +#define TkAlignImageData \ + (tkIntPlatStubsPtr->tkAlignImageData) /* 33 */ #define TkWinSetHINSTANCE \ (tkIntPlatStubsPtr->tkWinSetHINSTANCE) /* 34 */ #define TkWinGetPlatformTheme \ (tkIntPlatStubsPtr->tkWinGetPlatformTheme) /* 35 */ #define TkWinChildProc \ (tkIntPlatStubsPtr->tkWinChildProc) /* 36 */ -#define TkCreateXEventSource \ - (tkIntPlatStubsPtr->tkCreateXEventSource) /* 37 */ +/* Slot 37 is reserved */ #define TkpCmapStressed \ (tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */ #define TkpSync \ @@ -575,7 +574,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 41 */ #define TkUnixSetMenubar \ (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 42 */ -/* Slot 43 is reserved */ +#define TkWmCleanup \ + (tkIntPlatStubsPtr->tkWmCleanup) /* 43 */ #define TkSendCleanup \ (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */ #define TkpTestsendCmd \ @@ -685,7 +685,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkMacOSXDrawable) /* 54 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ -/* Slot 0 is reserved */ +#define TkCreateXEventSource \ + (tkIntPlatStubsPtr->tkCreateXEventSource) /* 0 */ /* Slot 1 is reserved */ #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 2 */ @@ -694,11 +695,10 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 5 is reserved */ #define TkpScanWindowId \ (tkIntPlatStubsPtr->tkpScanWindowId) /* 6 */ -#define TkpWmSetState \ - (tkIntPlatStubsPtr->tkpWmSetState) /* 7 */ +/* Slot 7 is reserved */ /* Slot 8 is reserved */ -#define TkWmCleanup \ - (tkIntPlatStubsPtr->tkWmCleanup) /* 9 */ +#define TkpWmSetState \ + (tkIntPlatStubsPtr->tkpWmSetState) /* 9 */ /* Slot 10 is reserved */ /* Slot 11 is reserved */ /* Slot 12 is reserved */ @@ -726,8 +726,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; /* Slot 34 is reserved */ /* Slot 35 is reserved */ /* Slot 36 is reserved */ -#define TkCreateXEventSource \ - (tkIntPlatStubsPtr->tkCreateXEventSource) /* 37 */ +/* Slot 37 is reserved */ #define TkpCmapStressed \ (tkIntPlatStubsPtr->tkpCmapStressed) /* 38 */ #define TkpSync \ @@ -738,7 +737,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkUnixDoOneXEvent) /* 41 */ #define TkUnixSetMenubar \ (tkIntPlatStubsPtr->tkUnixSetMenubar) /* 42 */ -/* Slot 43 is reserved */ +#define TkWmCleanup \ + (tkIntPlatStubsPtr->tkWmCleanup) /* 43 */ #define TkSendCleanup \ (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */ #define TkpTestsendCmd \ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index f733637..dc7947f 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -432,18 +432,18 @@ static const TkIntPlatStubs tkIntPlatStubs = { TCL_STUB_MAGIC, 0, #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */ - TkAlignImageData, /* 0 */ - TkWinCancelMouseTimer, /* 1 */ + TkCreateXEventSource, /* 0 */ + 0, /* 1 */ TkGenerateActivateEvents, /* 2 */ TkpGetMS, /* 3 */ TkPointerDeadWindow, /* 4 */ TkpPrintWindowId, /* 5 */ TkpScanWindowId, /* 6 */ - TkpWmSetState, /* 7 */ + TkpSetCapture, /* 7 */ TkpSetCursor, /* 8 */ - TkWmCleanup, /* 9 */ + TkpWmSetState, /* 9 */ TkSetPixmapColormap, /* 10 */ - TkpSetCapture, /* 11 */ + TkWinCancelMouseTimer, /* 11 */ TkWinClipboardRender, /* 12 */ TkWinEmbeddedEventProc, /* 13 */ TkWinFillRect, /* 14 */ @@ -465,17 +465,17 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkWinSetForegroundWindow, /* 30 */ TkWinDialogDebug, /* 31 */ TkWinGetMenuSystemDefault, /* 32 */ - 0, /* 33 */ + TkAlignImageData, /* 33 */ TkWinSetHINSTANCE, /* 34 */ TkWinGetPlatformTheme, /* 35 */ TkWinChildProc, /* 36 */ - TkCreateXEventSource, /* 37 */ + 0, /* 37 */ TkpCmapStressed, /* 38 */ TkpSync, /* 39 */ TkUnixContainerId, /* 40 */ TkUnixDoOneXEvent, /* 41 */ TkUnixSetMenubar, /* 42 */ - 0, /* 43 */ + TkWmCleanup, /* 43 */ TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ 0, /* 46 */ @@ -539,16 +539,16 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkMacOSXDrawable, /* 54 */ #endif /* AQUA */ #if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */ - 0, /* 0 */ + TkCreateXEventSource, /* 0 */ 0, /* 1 */ TkGenerateActivateEvents, /* 2 */ 0, /* 3 */ 0, /* 4 */ 0, /* 5 */ TkpScanWindowId, /* 6 */ - TkpWmSetState, /* 7 */ + 0, /* 7 */ 0, /* 8 */ - TkWmCleanup, /* 9 */ + TkpWmSetState, /* 9 */ 0, /* 10 */ 0, /* 11 */ 0, /* 12 */ @@ -576,13 +576,13 @@ static const TkIntPlatStubs tkIntPlatStubs = { 0, /* 34 */ 0, /* 35 */ 0, /* 36 */ - TkCreateXEventSource, /* 37 */ + 0, /* 37 */ TkpCmapStressed, /* 38 */ TkpSync, /* 39 */ TkUnixContainerId, /* 40 */ TkUnixDoOneXEvent, /* 41 */ TkUnixSetMenubar, /* 42 */ - 0, /* 43 */ + TkWmCleanup, /* 43 */ TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ #endif /* X11 */ -- cgit v0.12 From 4c1b179b64fba69b4a89e48e346aad8d87425fca Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 17 Nov 2023 21:45:51 +0000 Subject: TkpMakeWindow -> Tk_MakeWindow (2x) --- macosx/tkMacOSXEmbed.c | 2 +- win/tkWinWindow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 443b34f..7f89a50 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -61,7 +61,7 @@ static void EmbedWindowDeleted(TkWindow *winPtr); /* *---------------------------------------------------------------------- * - * TkpMakeWindow -- + * Tk_MakeWindow -- * * Creates an X Window (Mac subwindow). * diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c index b4eed29..53432d7 100644 --- a/win/tkWinWindow.c +++ b/win/tkWinWindow.c @@ -232,7 +232,7 @@ TkpScanWindowId( /* *---------------------------------------------------------------------- * - * TkpMakeWindow -- + * Tk_MakeWindow -- * * Creates a Windows window object based on the current attributes of the * specified TkWindow. -- cgit v0.12