Update to tk 8.5.19

This commit is contained in:
Zachary Ware
2017-11-24 17:53:51 -06:00
parent 27e7dfc7da
commit c67b328f06
325 changed files with 12511 additions and 12047 deletions

View File

@@ -413,8 +413,8 @@ typedef struct
static Tk_OptionSpec CheckbuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-variable", "variable", "Variable",
"", Tk_Offset(Checkbutton, checkbutton.variableObj), -1,
TK_OPTION_DONT_SET_DEFAULT,0,0},
NULL, Tk_Offset(Checkbutton, checkbutton.variableObj), -1,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-onvalue", "onValue", "OnValue",
"1", Tk_Offset(Checkbutton, checkbutton.onValueObj), -1,
0,0,0},

View File

@@ -23,6 +23,10 @@ extern const char *TtkInitializeStubs(
#define TTK_STUBS_EPOCH 0
#define TTK_STUBS_REVISION 31
#ifdef __cplusplus
extern "C" {
#endif
/*
* Exported function declarations:
*/
@@ -178,10 +182,8 @@ typedef struct TtkStubs {
int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient); /* 40 */
} TtkStubs;
#ifdef __cplusplus
extern "C" {
#endif
extern const TtkStubs *ttkStubsPtr;
#ifdef __cplusplus
}
#endif

View File

@@ -187,7 +187,6 @@ proc genStubs::declare {args} {
variable revision
incr revision
if {[llength $args] == 2} {
lassign $args index decl
set status current
@@ -214,7 +213,25 @@ proc genStubs::declare {args} {
if {$index > $stubs($curName,lastNum)} {
set stubs($curName,lastNum) $index
}
return
}
# genStubs::export --
#
# This function is used in the declarations file to declare a symbol
# that is exported from the library but is not in the stubs table.
#
# Arguments:
# decl The C function declaration, or {} for an undefined
# entry.
#
# Results:
# None.
proc genStubs::export {args} {
if {[llength $args] != 1} {
puts stderr "wrong # args: export $args"
}
return
}
@@ -410,7 +427,6 @@ proc genStubs::parseArg {arg} {
proc genStubs::makeDecl {name decl index} {
variable scspec
lassign $decl rtype fname args
append text "/* $index */\n"
@@ -731,6 +747,8 @@ proc genStubs::emitHeader {name} {
append text "#define ${CAPName}_STUBS_EPOCH $epoch\n"
append text "#define ${CAPName}_STUBS_REVISION $revision\n"
append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
emitDeclarations $name text
if {[info exists hooks($name)]} {
@@ -752,8 +770,7 @@ proc genStubs::emitHeader {name} {
append text "} ${capName}Stubs;\n\n"
append text "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
append text "extern const ${capName}Stubs *${name}StubsPtr;\n"
append text "extern const ${capName}Stubs *${name}StubsPtr;\n\n"
append text "#ifdef __cplusplus\n}\n#endif\n"
emitMacros $name text
@@ -778,10 +795,9 @@ proc genStubs::emitInit {name textVar} {
variable interfaces
variable epoch
variable revision
upvar $textVar text
set root 1
set root 1
set capName [string toupper [string index $name 0]]
append capName [string range $name 1 end]
set CAPName [string toupper $name]

View File

@@ -293,6 +293,7 @@ static void ImageCleanup(ImageElement *image)
TtkFreeImageSpec(image->imageSpec);
}
#ifndef MAC_OSX_TK
/*
* StippleOver --
* Draw a stipple over the image area, to make it look "grayed-out"
@@ -317,6 +318,7 @@ static void StippleOver(
Tk_FreeBitmapFromObj(tkwin, image->stippleObj);
}
}
#endif
static void ImageDraw(
ImageElement *image, Tk_Window tkwin,Drawable d,Ttk_Box b,Ttk_State state)
@@ -347,6 +349,8 @@ static void ImageDraw(
* Do not stipple at all under Aqua, just draw the image: it shows up
* as a white rectangle otherwise.
*/
if (state & TTK_STATE_DISABLED) {
if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) {
#ifndef MAC_OSX_TK
@@ -484,6 +488,7 @@ static Ttk_ElementOptionSpec LabelElementOptions[] = {
* Calculate the text, image, and total width and height.
*/
#undef MAX
#define MAX(a,b) ((a) > (b) ? a : b);
static void LabelSetup(
LabelElement *c, Tk_Window tkwin, Ttk_State state)

View File

@@ -902,7 +902,7 @@ static int NotebookAddCommand(
if (tab->state == TAB_STATE_HIDDEN) {
tab->state = TAB_STATE_NORMAL;
}
if (ConfigureTab(interp, nb, tab, slaveWindow, objc-4,objv+4) != TCL_OK) {
if (ConfigureTab(interp, nb, tab, slaveWindow, objc-3,objv+3) != TCL_OK) {
return TCL_ERROR;
}